WinBoard, exotic version
Posted: Sat Jan 15, 2011 7:24 pm
Mainly because Daniel Shawul was developing an engine that, next to Chess variants, could also play some board games that are not Chess variants, (such as Checkers, Go, Reversi), I made some enhancements in WinBoard to make it (somewhat) usable as a GUI for such games too. There are several problems with such games you do not have in Chess:
1) Moves can have side effects, i.e. the afect other sqares than the from- and to-square. (Like e.p. capture in Chess.)
2) Moves are not always fully characterized by from- and to-square, but take a complex path (the exact path determining the side effects), such as multiple captures in Checkers.
3) In some games you can move multiple pieces per turn (like Castling in Chess)
(2) and (3) are most easily handled by considering them as special cases of doing multiple moves per turn, each 'leg' of the move being a simple move (perhaps with side effects). In (2) you would do multiple moves with the same piece, in (3) with different pieces. So I built into WB a general mechanism toplay multiple moves per turn (which could also be used in Chess variants, e.g. to enter non-standard castlings):
When you keep control pressed during a move, the side to move will not change after it, and you are allowed to enter another move for the same side. An engine can achieve the same effect by suffixing a hyphen to the move in its move command. It can then send a continuation move in another move command. In the other direction, to the engine, WB will send a multi-move in a single line, all (long algebraic) moves separated by hyphens.
As to the side effects:
I defined three new variants, each with a different side effect to the moves. This is similar to variant atomic, where the side effect is to destroy all pieces near a capture square. These are variants are variant checkers, go and reversi.
[d]1nbqk2r/2ppp1pp/BN6/rpK3P1/p1pnbN2/P7/1PPP1PPP/2BQR3 w k - 0 1
In the above diagram, playing b4 would result in the disappearence of Pa4, Pb5 and Ra5 in variant go:
[d]1nbqk2r/2ppp1pp/BN6/2K3P1/1PpnbN2/P7/2PP1PPP/2BQR3 b k b3 0 1
The same move in variant reversi would flip the color of b5, Pc4, Nd4 and Be4:
[d]1nbqk2r/2ppp1pp/BN6/rPK3P1/pPPNBN2/P7/2PP1PPP/2BQR3 b k b3 0 1
Finally, playing Re1xe7 would make Be4 disappear in variant checkers:
[d]1nbqk2r/2ppR1pp/BN6/rpK3P1/p1pn1N2/P7/1PPP1PPP/2BQ4 b k - 0 1
You can obviously only play the latter with legality checking off, which is for which these variants are intended, as WB knows nothing of the rules for these games. The engine would have to enforce the rules (which in WB protocol is possible). WB does not even have an initial setup for them, you would have to paste that in, or let it be loaded automatically from file. Likely the pieces you use move in ways that would violate their use as a Chess piece. Like in Checkers:
[d]1p1p1p1p/p1p1p1p1/1p1p1p1p/8/8/P1P1P1P1/1P1P1P1P/P1P1P1P1 w - - 0 1
Also added is variant amazons, for which the rules are so simple and Chess-like that even WB knows them. You must do two moves per turn here, and WB knows it (even when you do nor press control, and do not use hyphens). After you moved a piece, WB waits for you to click a square where to throw the arrow. The engine would have to send the arrow tracjectory in long algebraic (from + to-square).
To allow even more general side effects, there is variant alien, where the engine is in total control: after every move it can send a setup command with a FEN to define the new board position.
Finally variant dark is in progress of being added to support Dark Chess. The GUI part already works (so you can play in dark mode against a normal engine), but the back-end still has to be fixed for proper communication with a Dark-Chess engine.
I am not sure any of this should go in the main line. Anyway, the beta version is at
http://hgm.nubati.net/WinBoard-4.5.beta.zip
1) Moves can have side effects, i.e. the afect other sqares than the from- and to-square. (Like e.p. capture in Chess.)
2) Moves are not always fully characterized by from- and to-square, but take a complex path (the exact path determining the side effects), such as multiple captures in Checkers.
3) In some games you can move multiple pieces per turn (like Castling in Chess)
(2) and (3) are most easily handled by considering them as special cases of doing multiple moves per turn, each 'leg' of the move being a simple move (perhaps with side effects). In (2) you would do multiple moves with the same piece, in (3) with different pieces. So I built into WB a general mechanism toplay multiple moves per turn (which could also be used in Chess variants, e.g. to enter non-standard castlings):
When you keep control pressed during a move, the side to move will not change after it, and you are allowed to enter another move for the same side. An engine can achieve the same effect by suffixing a hyphen to the move in its move command. It can then send a continuation move in another move command. In the other direction, to the engine, WB will send a multi-move in a single line, all (long algebraic) moves separated by hyphens.
As to the side effects:
I defined three new variants, each with a different side effect to the moves. This is similar to variant atomic, where the side effect is to destroy all pieces near a capture square. These are variants are variant checkers, go and reversi.
[d]1nbqk2r/2ppp1pp/BN6/rpK3P1/p1pnbN2/P7/1PPP1PPP/2BQR3 w k - 0 1
In the above diagram, playing b4 would result in the disappearence of Pa4, Pb5 and Ra5 in variant go:
[d]1nbqk2r/2ppp1pp/BN6/2K3P1/1PpnbN2/P7/2PP1PPP/2BQR3 b k b3 0 1
The same move in variant reversi would flip the color of b5, Pc4, Nd4 and Be4:
[d]1nbqk2r/2ppp1pp/BN6/rPK3P1/pPPNBN2/P7/2PP1PPP/2BQR3 b k b3 0 1
Finally, playing Re1xe7 would make Be4 disappear in variant checkers:
[d]1nbqk2r/2ppR1pp/BN6/rpK3P1/p1pn1N2/P7/1PPP1PPP/2BQ4 b k - 0 1
You can obviously only play the latter with legality checking off, which is for which these variants are intended, as WB knows nothing of the rules for these games. The engine would have to enforce the rules (which in WB protocol is possible). WB does not even have an initial setup for them, you would have to paste that in, or let it be loaded automatically from file. Likely the pieces you use move in ways that would violate their use as a Chess piece. Like in Checkers:
[d]1p1p1p1p/p1p1p1p1/1p1p1p1p/8/8/P1P1P1P1/1P1P1P1P/P1P1P1P1 w - - 0 1
Also added is variant amazons, for which the rules are so simple and Chess-like that even WB knows them. You must do two moves per turn here, and WB knows it (even when you do nor press control, and do not use hyphens). After you moved a piece, WB waits for you to click a square where to throw the arrow. The engine would have to send the arrow tracjectory in long algebraic (from + to-square).
To allow even more general side effects, there is variant alien, where the engine is in total control: after every move it can send a setup command with a FEN to define the new board position.
Finally variant dark is in progress of being added to support Dark Chess. The GUI part already works (so you can play in dark mode against a normal engine), but the back-end still has to be fixed for proper communication with a Dark-Chess engine.
I am not sure any of this should go in the main line. Anyway, the beta version is at
http://hgm.nubati.net/WinBoard-4.5.beta.zip