12405 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?
Backgammon, Yatzy, and more!
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. "
The importance of getting players out of preparation
by abrahampenrose a few minutes ago
Mate in 1
by BigDoggProblem 3 minutes ago
Who will Win FIDE Women´s Grand Prix? 3-15 October 2015
by beauti_kanta 7 minutes ago
10/8/2015 - Tolush - Alatortsev, Moscow 1948
by silverhawkz 10 minutes ago
Average Time/Move Limits
by alghul 13 minutes ago
My excursion into Russian/Soviet Chess Sets
by goodknightmike 21 minutes ago
Chess movies OTHER than pawn sacrifice
by onthehouse 21 minutes ago
So, I just miniatured a titled master...
by nobodyreally 22 minutes ago
Will I be able to reach Master level?
by Ziryab 23 minutes ago
The will to fight.
by Alvin_Cruz 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!