11119 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. "
Chess book for travelling
by jarrasch 3 minutes ago
5/25/2015 - Mate or Queen
by a_wesome 4 minutes ago
Millionaire Chess 2!!
by Flechettes 4 minutes ago
The Cheating Shoe
by devansh123 5 minutes ago
Can someone explain this move order by the 2500 computer?
by eoramas 6 minutes ago
New chess Forum
by devansh123 7 minutes ago
Is Kasparov better than anand
by devansh123 11 minutes ago
2015 FIDE Grand Prix, Khanty-Mansiysk - Round 9 Results
by Flechettes 12 minutes ago
Strongest chess player of all time?
by devansh123 14 minutes ago
by Rotfish 24 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!