10984 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. "
Bobby Fischer Lacked Creativity ?....How Dare Me !
by The_Ghostess_Lola 8 minutes ago
7/1/2015 - Mate in 3
by primepawn 11 minutes ago
Guess the game # 1
by Robert0905 14 minutes ago
Do you know rules of castling:Tim krabbe
by shameer217 16 minutes ago
To play online or not to play online..
by dragonair234 31 minutes ago
More blunders and some good stuff
by chessman1504 31 minutes ago
Unusual chess puzzle!
by timurtolibayev 37 minutes ago
Fischer vs. Byrne 1963 US Championship
by chessmicky 43 minutes ago
Hurt/Heal World Chess Champions
by Joker-Jamal 46 minutes ago
Reliable open? - 1000 rating not stupid questions
by Joker-Jamal 47 minutes ago
Why Join | Chess Topics |
Help & Support |
© 2015 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!