04-04-2024, 02:08 PM
I also believe that everyone should do what they enjoy.
The kids are lost to Small Basic because no school or book author relies on a product that is no longer supported.
However, maybe they can come back if they find interesting projects.
The AI championship would be something like this, for example.
However, I don't think the technical implementation with server and files is recommended because the file system is involved.
If several programs share files, blockages can occur.
I therefore propose a method that is used in the chess world when two chess programs play against each other.
There is a game interface (Arena<->"Nature") which addresses the two competitors directly via an ASCII interface (STDIN/STDOUT) (Dragon<->"RabbitMind" against Stockfish<->"SnakeMind").
However, the commands (UCI) must be precisely defined, which is the responsibility of the game developer.
In the following example I tried to start the engines with LDProcess, which succeeded, but I cannot send any commands because access to STDIN/STDOUT is not possible. If it were possible with LDProcess in a future version of the extension,
a direct exchange between the programs could take place.
The clipboard text is an excerpt from the communication between the ARENA GUI and the chess engine "Dragon".
The kids are lost to Small Basic because no school or book author relies on a product that is no longer supported.
However, maybe they can come back if they find interesting projects.
The AI championship would be something like this, for example.
However, I don't think the technical implementation with server and files is recommended because the file system is involved.
If several programs share files, blockages can occur.
I therefore propose a method that is used in the chess world when two chess programs play against each other.
There is a game interface (Arena<->"Nature") which addresses the two competitors directly via an ASCII interface (STDIN/STDOUT) (Dragon<->"RabbitMind" against Stockfish<->"SnakeMind").
However, the commands (UCI) must be precisely defined, which is the responsibility of the game developer.
In the following example I tried to start the engines with LDProcess, which succeeded, but I cannot send any commands because access to STDIN/STDOUT is not possible. If it were possible with LDProcess in a future version of the extension,
a direct exchange between the programs could take place.
The clipboard text is an excerpt from the communication between the ARENA GUI and the chess engine "Dragon".
Code:
'Textwindow.WriteLine( LDProcess.GetProcesses())
engine = Program.Directory + "\engines\dragon\dragon_46.exe" 'Chess-Engine
argu[0] = "uci"
ret1 = LDProcess.Start(engine,argu[0])
Textwindow.WriteLine( "Engine: " + engine + " Return: " + ret1)
Program.Delay(1000)
ret2 = LDProcess.Start(engine,"go")
Textwindow.WriteLine( "Engine: " + engine + " Return: " + ret2)
TextWindow.WriteLine( LDClipboard.GetText())
Program.Delay(10000)
stop1 = LDProcess.Stop(ret1)
stop2 = LDProcess.Stop(ret2)
TextWindow.WriteLine( "engine1 stopped: " + stop1 + " engine2 stopped: " + stop2)