How can we write chess engines in C. Many peoples are writing. What is actually needed for writing them. I mean what to know (C conceepts) before writing them?
Help please.....
Printable View
How can we write chess engines in C. Many peoples are writing. What is actually needed for writing them. I mean what to know (C conceepts) before writing them?
Help please.....
Search Engine?
Quzah.
Chess engines are tough little devils.Quote:
Originally Posted by sankarv
You need to have a move generator function, to fill a 3d array of possible moves for that level in the search. A minimal display (you'll use one of the more professional looking displays later).
You'll need a makemove and unmakemove functions to allow your search to make a move, then possibly discover it's not a good one or even illegal, and unmake that move and try another move.
Another function to determine if you're in check from this board position, or if the game is over from stalemate or checkmate. Naturally, a depth first Alpha-Beta search, and perhaps the most difficult thing of all - your evaluation functions!
A good first look at a C chess "engine" is FirstChess, which is designed for learning ONLY.
Then google for Tom's Simple Chess Program (which isn't so simple but none of them are too simple), and check it out. Both are in C.
Then goto the Winboard forum and TalkChess forum and learn from the collection of experts gathered there. Be SURE to checkout Bruce Moreland's links there. He's the author of "Ferret", and his websites are probably the best on the net for chess programming info.
http://www.talkchess.com/ , and you want the programming/technical forum. Many of the best chess programmer's in the world, yak right there. Several who contribute regularly, are former world champs. Many others are very serious competitors at the highest levels.
At the Winboard forum (which is one of the professional display interfaces previously mentioned), you'll find tons of links to open source amateur chess engines, and like talkchess, idea's after idea's and answers after answers.
Good luck!
Adak