Currently I haven't implemented 3rd-party referee engine yet, so the only way to do it would be to play with legality testing off, with all the obvious disadvantages that brings.Don wrote:Some people be playing round robin matches between many players - so it cannot just always be one of the 2 players. I don't how you handle matches in xboard between 2 random programs - you tell me how it's handled. If I create a "foobar chess" engine and talk 10 friends into creating their own and talk you into supporting it with xboard, what happens when a round robin is played?
But the plan is to allow XBoard to connect to 3 engines in stead of 2, where the third engine is fixed at startup, or at least not under control of any tournament manager. This third engine (when specified), would then be used as the referee for every tourney game. The other two engines would be loaded according to the tourney schedule, and play each other, while the third engine is looking over their shoulder for any misbehavior.
This is precisely my suggestion in the case where you just don't have the time or inclination to build in independent support for that game. It's like the old days, when I did Rexchess it was both engine and interface.Well, I did not suggest to put engine and interface in the same process or program. If anything, I want them separated more strictly than usual. I want the interface to only involve itself with display, user input, recording the game and passing on moves between players and referee. Everything that has to do with the game rules should go into an engine (which can be a player or a referee).
Biggest problem is notation, btw. To write SAN requires rule knowledge. So an ignorant GUI could not generate or parse it. So we would need new protocol for that. Whenever a move is sent for legality checking to the referee, the referee could respond either by "Illegal move" (existing protocol) or "Legal move LONGALGEBRAICFORM SANFORM" (new protocol). Then you also would not have to use 'ping' to detect that there was no complaint. The referee should understand both SAN and long algebraic, so it could be used to do the conversion either way.
The referee could also send board updates (as FEN) after receiving a move, to implement side effects not obvious from the move notation (like colorflipping of the sandwiched pieces in Reversi).
Indeed. Apart from the trust problem this already works. The WinBoard-Nebiyu package on my website bundles the WinBoard 'Alien Edition' with Daniel Shawul's Nebiyu engine, and together they can be used to play many non-Chesslike games that are played on a board of squares. Amongst those are Checkers / International Draughts, Amazons, Go, Ultima, Reversi, Amazons (plus many genuine Chess variants). Works like a charm. What is not possible is hexagonal boards (I am still brooding if this couldn't be done by offsetting ranks half a square from each other horizontally).You are not that far from a universal system like zillions of games. As it is now you have to do some programming work to support a new game - like you did with my schess program. But ideally you should not have to set up a new games - although there must be some constraints - you obvious cannot play monopoly or poker with your system, but any two player game of perfect information played on an NxN board with fairly well defined piece movements should be possible.
Piece drops were already supported by XBoard even before I got involved with it. (Crazyhouse was one of the supported variants, because FICS and ICC feature it.) I just added the interface to make them graphically (displaying the captured pieces next to the board, so the user can grab them from there). Nebiyu also supports a number of variants with piece drops (amongst which Shogi and mini-Shogi).You should be able to load up the engine and start playing if the game fits the constraints. The engines tell you how a piece should be physically moved, what the notation looks like and so on. You need to cover piece drops and perhaps a few other things we are not used to in western chess but it should be possible - without looking like a big hack. One wrinkle of course is piece graphics but those could be user supplied/contributed.