Check out Alice Chess, our featured variant for June, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Wed, Oct 22, 2008 01:04 PM UTC:
| Fergus:
|| Software standards for integrating Game Courier with a GUI or
|| a game engine would have to arise from an actual project of trying to
|| integrate Game Courier with some actual piece of software, and I would
|| have to work with the programmer on this,  ...

| Well, so WinBoard is the GUI, and I am your man! :-)

I would like to start with integrating Game Courier with a game engine. I have some ideas for how this can be done. First, Game Courier has its own programming language, GAME Code, and all calls to game engines would be done through lines of GAME Code. It would be coded into an individual preset whether it uses an external game engine.

The first thing a game engine would be used for is to check the legality of a move. When a player moves, a line of GAME Code would send the moves and any other information the engine needs to the external engine. Since this is done within the context of a GAME Code program written for a specific game, it would be easy to customize the information it gives to the engine, depending upon what the engine needs. An engine for one game only might just require the moves, while a more customizable engine might require more data. At the bare minimum, the engine would indicate whether all the moves passed to it are legal. With this confirmation from the engine, the GAME Code program could move the pieces around on the Game Courier board without checking the legality of the moves any further. Hopefully, the engine could give some detailed error messages when a move is illegal, such as mentioning the specific illegal move and explaining why it is illegal. If not, Game Courier could call the engine multiple times with longer sequences of moves, so that it can itself identify the specific illegal move. It's also possible that the engine could return FEN code, and some lines of GAME Code would just update the board to match the new FEN without actually performing the moves the player gave. This would allow the use of game specific notation that even Game Courier cannot understand.

The second thing a game engine would be used for is to play a game. As long as the engine moves fast enough, it could feed its moves directly to Game Courier when it gets called by the GAME Code. If its going to take longer, PHP might have a problem with the time it takes to get a response and stop execution before it returns a move. If so, another means will be needed to tell when the engine has moved, perhaps by using JavaScript.