10192 Players currently online!
Man vs. Machine - good luck!
Turn-based games at any time!
Vote for the best move to win!
Do you have what it takes?
Sharpen your tactical vision!
Get advice and game insights!
Learn from top players & pros!
View millions of master games!
Your virtual chess coach!
Perfect your opening moves!
Test your skills vs. computer!
Find the right private coach!
Can you solve it each day?
Bring it all together!
Beginners, start here!
Make friends & play team games!
News from the world of chess!
Search all Chess.com members!
Find local clubs & events!
Who's the best of your friends?
Read what members are saying!
Has anyone here written a chess playing computer program?
I'm pretty sure someone has. They aren't too difficult to make, unless you want to make a powerful one. There are websites all over that will assist you, if you plan on doing it yourself.
I haven't, but if you are trying to make one I would take a look at Crafty because it is open source so maybe you can see some of the ideas. I'm no computer expert though.
Do you know where I can get a copy of the Crafty Source Code, please?
I made one a while ago using VB but it was shit at playing Chess!
I wrote one a few years ago with Java for a class project but the assignment was just to make the game, not the AI, so it wasn't very good...
Check here http://www.craftychess.com/
Thanks for the 'Crafty' link. Sure is a lot of code there!
I'm also interested in the 'weak' programs - that's more like what I'd go through if I get as far as writing something.
Are there any good websites explaining how to write a simple chess playing program? With examples of code, maybe in C or BASIC
I've thought about doing the same thing, but with Python. I think two of the important things you have to consider is that you must link your engine with an openings database and an endgame tablebase for it to be at least competitive. That leaves the middlegame!
In evaluating a middlegame position, you'd have to decide what sort of search algorithm to use - brute force? Not efficient enough. Minimax algorithm? This is a good bet, but it's still not so efficient. (look 'er up if you haven't heard of it) Crafty appears to consider first all checks, captures, and promotions. So the engine should consider any tactics first, then look at positional moves. I'll look into Crafty's source a bit more to see how the moves are evaluated.
The Crafty source code appears to be written in C++, that may help you a bit.
EDIT: found in the "evaluate" file -
"Evaluate() is used to evaluate the chess board. Broadly, it addresses four (4) distinct areas:
(1) material score which is simply a summing of piece types multiplied by piece values;
(2) pawn scoring which considers placement of pawns and also evaluates passed pawns, particularly in endgame situations;
(3) piece scoring which evaluates the placement of each piece as well as things like piece mobility;
(4) king safety which considers the pawn shelter around the king along with material present to facilitate an attack. "
My chess tournament- Part 14
by rohan_agarwal a few minutes ago
Time per move limitation
by TheBrucie94 a few minutes ago
Making the Chess.com Forums Better
by chess_gg 3 minutes ago
Why Won't People Resign Then Give Me a Rematch In This Opening I Just Invented
by TheBrucie94 3 minutes ago
how to play chess 960
by RonaldJosephCote 5 minutes ago
by RonaldJosephCote 10 minutes ago
If chess players are so smart why they are not millionaires/billionaires?
by RonaldJosephCote 13 minutes ago
[HURT HEAL] Double Queen Pawn Openings
by ThrillerFan 16 minutes ago
King's Gambit A Challenge From Ponz
by learningthemoves 19 minutes ago
*Mangus Carlsen's moves*
by TheCarlsenCrusher1 20 minutes ago
Why Join | Chess Topics |
Help & Support |
© 2014 Chess.com
• Chess - English
We are working hard to make Chess.com available in over 70 languages. Check back over the year as we develop the technology to add more, and we will try our best to notify you when your language is ready for translating!