14084 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. "
"2nd Gashimov Memorial, Round 3 | Host: GM Evgeny Miroshnichenko"
Worst Tactics Training Rating Ever
by now_and_zen 10 minutes ago
4/19/2015 - Mate in 3
by damongross 10 minutes ago
by doublebruce 14 minutes ago
Every fool can win in blitz chess !
by VibrantMoves 15 minutes ago
How did I do?
by corum 25 minutes ago
What's On Your Bookshelf?
by Crazychessplaya 28 minutes ago
What would be the rating of a top chess player in the late 1800s today
by Ziryab 33 minutes ago
Improve Quality of Blitz Chess
by grobgomez 37 minutes ago
Resigners who say "gg" are the Bodhisattvas of the chess world
by Swedra 38 minutes ago
by pushpendra999 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!