Check out Janggi (Korean Chess), our featured variant for December, 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]
H. G. Muller wrote on Tue, Nov 4, 2008 07:43 PM UTC:
I started this thread to discuss the possibility to conver standard software for Internet Chess Servers (such as used by FICS and ICC) to support a broader variety of Chess variants. On the Source-Forge website I found a piece of software called 'chessd'. This is an open-source ICS program. According to Wikipedia it is the one that FICS uses. It is coded in plain C. I inspected the code. Most of the server tasks are completely game independent, and involve managing the list of players, their logging in, the updating of their ratings, the mechanism by which they seek opponents for games, etc. The game-dependent code seems to be concentrated in 3 program files (plus the corresponding header files), for so far I could locate it: board.c algcheck.c movecheck.c The code in these files occupies itself with parsing input moves, initializing and updating the game state (board, holdings, 50-move counter, castling rights), and printing the game state (as boards in varous formats, or move lists). Everything is hard-coded in these files: the size of the board, the piece types. For every piece type there is a dedicated routine to generate its moves. I would like to add fields 'files' and 'ranks' to the game state, and have the code use these in every place here it no uses '8' as the board end. And then add a table that initializes these variables when etting up the board for the chosen variant. (Chessd does already support variants, but they are all on 8x8, and all with only orthodox pieces. Bughouse is supported, which means there already is code to update holdings, and link games together to a team match. So the variant is already kept track of, making it relatively easy to choose pieces and board format and array in a variant-dependent way.) I would like to replace all code to generate piece moves by a single, table-driven move generator, that should at least be able to handle arbitrary leapers, sliders/riders and their compounds. Basically everything that Fairy-Max supports, and perhaps much more. The system to represent one piece by a single letter is deeply engrained in the protocol, so it might be necessary to implement a variant-dependent translation of letters <-> piece types. It al looks doable, although a bit tedious, as I have to go through the entire code using visual inspection to recognize loops over rank or files, and decide how to generaize them. What I would like to know from people of this site, is which variants (and by inference, which pieces) should best be included. Preferably variants without any un-chesslike rules. I don't want to start too ambitiously, and limit the initially supported variants to those that fall into a general pattern. So preferably no pieces with weird side effects, such as immobilizers, or pieces whose allowed moves depend on their positon on the board, or on proximity of other piece types, or on the history of the game. Divergent pieces are OK, hoppers like Cannon and Grasshopper are OK, Falcon would be OK. What variants would be suitable, within those boundary conditions? My personal favorites would be Knightmate, Shatranj, Courier, Shogi, Capablanca, Unspeakable, some subsets of Superchess&Monarch (because WinBoard, which is an ICS cient, already supports all those).