Setting up a chess server

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Setting up a chess server

Postby gusblake » 04 Dec 2009, 13:29

Hi,
I want to set up my own free chess server to rival Yahoo (not in terms of player base, of course, but quality - no ads and more functionality), and I was thinking about using Winboard as a backend, doing all the move verification and PGN/FEN generation.

My preferred method of doing this would be with PHP but a lower level language can be used if necessary.

Moves would be sent to the serverside program in the format of "e2e4". The program would then communicate with Winboard - this is the bit I don't know how to do - who would either say "illegal move" or send back the updated board position and history.

Can anyone more experienced in programming with Winboard tell me what they think?

I have already set up a very basic test server but none of the rules of chess are implemented, which is where I think Winboard should come in. You can see this test at www.threeguesses.co.uk/chess.

Cheers,
Gus
gusblake
 
Posts: 2
Joined: 03 Dec 2009, 22:48

Re: Setting up a chess server

Postby Edmund » 05 Dec 2009, 15:18

Hello,

I wouldn't use Winboard for move-verification. It should be much easier to include the rules of the game into the serverprogram itself.

regards,
Edmund
Edmund
 
Posts: 38
Joined: 25 May 2008, 15:17

Re: Setting up a chess server

Postby gusblake » 05 Dec 2009, 22:16

Thanks for you reply.

So do you think it would be impossible to gain control of the winboard interface programmatically, or just complicated? Do you know how it would be done if it is possible?

Gus
gusblake
 
Posts: 2
Joined: 03 Dec 2009, 22:48

Re: Setting up a chess server

Postby Edmund » 06 Dec 2009, 01:17

I am no expert on the source of Winboard just an Engine programmer and thus know how easy it is to program a move legality check oneself. The best person to talk to concerning winboard is probably H.G.Muller.

When trying to gain control over Winboard, you should have a look on the following page with all the command-line options: http://www.gnu.org/software/xboard/manual/html_node/Options.html#Options

So by the commandline options you can run winboard and automatically load a pgn on startup. The problem now is, how to tell winboard the move to be verified. One option I see is to have winboard load a pseudo-engine that does nothing else then sending the move to be checked. Then - with the right options set - winboard will append the move to the pgn, but also verify the move/adjuncate the game.

Seems a little bit awkward to me, but at the moment I cant see an easier approach.

Another way would be to change the code of winboard to suit your needs.

regards,
Edmund
Edmund
 
Posts: 38
Joined: 25 May 2008, 15:17

Re: Setting up a chess server

Postby matematiko » 06 Dec 2009, 01:20

Check in sourceforge a project named YtoICS
http://sourceforge.net/projects/ytoics/

This project is no longer developed and it does not work any more, but, YtoICS is an ICS emulator that served as the middle man between Yahoo Chess Server and WinBoard.

These three files in the repository are very interesting and they concern move validation and endgame detection (checkmate, draw,three fold,50 move rule):
http://ytoics.cvs.sourceforge.net/viewvc/ytoics/ytoics/YtoICS/

three fold needs minor corrections and the 50 move rule as well.

These modules are written in perl. To understand how they are used/invoked you might want to take a look at the main .pl file YtoICS.pl:
http://ytoics.cvs.sourceforge.net/viewvc/*checkout*/ytoics/ytoics/ytoics.pl

Cheers,
One that does not live to serve, does not deserve to live.
matematiko
 
Posts: 219
Joined: 07 Dec 2008, 17:11
Location: Texas

Re: Setting up a chess server

Postby H.G.Muller » 20 Dec 2009, 11:56

When you want to set up your own Chess server, why not simply use existing software? There exists a browser-based server called Chessd, developed by a Brazilean group, and I thin it can use an ordinary browser for client (perhaps it must be Jave enabled, I am nt sure). It seems that this is sort of what you want.

Of course there also is the Lasker ICS (confusingly enough also referred to as Chessd) that I use for my server, but it is FICS-like, and thus requires a special client (such as WinBoard) to have an interface of acceptable user-friendliness, that has to be downloaded first. (Unless you want to play through telnet on an ascii board.) I opted for the latter, because I wanted to support variants like Gothic Chess and Xiangqi, which are already supported by WinBoard but which woud require development of a new client as wel as a server in the other systems.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 5 guests