Sign in to follow this  
CoolProgrammer

Chess engine

Recommended Posts

I didn't know where to put this, so I posted it here. I am thinking of maybe making a 3D chess game, but I don't know, and am not going to take the time to learn and chess AI stuff to create a chess engine. Does anyone know of any open-source chess engines and how I would go about using them if there is no good documentation. Thanks

Share this post


Link to post
Share on other sites
A chess engine viewed as a black box with a set of inputs and outputs is pretty basic. You input/manage a board state (which includes whose turn it is and other things relevant for the game) and get a move back. Now, the actual format of the board state moves are described vary from a case to case basis, but with a knowledge of chess you should pretty quickly be able to figure that out even without documentation.

Share this post


Link to post
Share on other sites
If you want a 3rd party engine to run it, here are some ideas. These are for Linux but there is nothing Linux centric about the underlying algorithms, so they should be rather portable or even ported already. Look at Crafty first.

Share this post


Link to post
Share on other sites
Every modern engine uses one of two protocols to talk to a GUI: UCI (Universal Chess Interface) or XBoard/WinBoard (basically imitate whatever GNU Chess happens to use).
There are many free ones, several of them open source: GNU Chess, Crafty, Toga... It would be best if you would allow your users to install their own engines (most GUIs do this).

I personally prefer UCI, which is very well designed.

I don't know what Ricardo is talking about...

[Edited by - alvaro on November 9, 2009 12:49:19 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by alvaro
I don't know what Ricardo is talking about...

Presumably the Queen can path directly to the enemy King, turning the game from a turn-based strategy into a first-person shooter. >_>;;;

Share this post


Link to post
Share on other sites
K thanks, I will check into Crafty.
My problem is I don't know how to communicate with chess engines using the UCI or xBoard/Winboard protocol. I have done a little looking and haven't found anything usefull. So if anyone can give me links or help that would be great.
Thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by CoolProgrammer
K thanks, I will check into Crafty.
My problem is I don't know how to communicate with chess engines using the UCI or xBoard/Winboard protocol. I have done a little looking and haven't found anything usefull. So if anyone can give me links or help that would be great.
Thanks

Your program needs to create a couple of pipes and start a process that executes the engine, talking to it through the pipes. This page might help you, although it's Unix specific. I am sure you can find how to do it in Windows. I once figured out how to do this by reading the code of a web server that implemented the CGI interface.

Once you manage to launch the engine, talk to it and listen to it, you can read the UCI specification.

If you are not an experienced programmer this might seem hard, but you will learn a lot of important lessons in the process. Good luck.

[Edited by - alvaro on November 11, 2009 8:20:08 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this