Basic chess

Started by
3 comments, last by The One 20 years, 11 months ago
Does anybody know how do some basic chess AI? Or does anybody know where to get tuts for this? Keep in mind that i''m new to game programing in c++. Thanks.
Advertisement
If u r new to C++, then u should probably get a *lot* of experience before u begin with chess. Making chess is not as easy as it may seem to u. For ur information, there ARE quite a few tuts on making chess but dont jump to them now.

Regards.
Check out this page: http://www.gamedev.net/reference/list.asp?categoryid=18. There is a Chess Programming Series listed there about halfway down, it''s a great resource.
I would start with a much simplier game that doesn''t involved all kinds of special rules / moves, and hard to find end-of-game conditions. Mancala would probably be the simpliest.

But, if you want chess, I would recommened checking out this program: Tom Kerrigan''s Simple Chess Program (TSCP). As quoted from his site: "It''s only ~2,000 lines of heavily-commented C code. If you want to learn how to write your own chess program, or if you want to see AI search algorithms in action, studying TSCP is probably the best way to start."

Jason Doucette - my online résumé page: www.jasondoucette.com
projects, real-time graphics, artificial intelligence, world records, wallpapers/desktops
"Great minds discuss ideas, average minds discuss events, small minds discuss people." - Admiral Hyman G. Rickover
Jason Doucette / Xona.comDuality: ZF — Xbox 360 classic arcade shmup featuring Dual Play
I agree that if you''re not solid in the basics of programming, and don''t understand the basic data structures, basic program flow (including recursion, which is very important), and feel very comfortable with C/C++, chess is probably not the place to start.

I''ve been programming chess software for years now, and I''m still finding subtle things I missed about the quirks of chess and the weird rules it has.

Even in a simple game playing program (tic-tac-toe, connect-4, etc.) you will probably have a hard enough time trying to understand a minmax search with simple evaluation. Try implementing minmax based AI for tic-tac-toe or connect-4, and after you''ve done that, try to improve the efficiency of the algorithm. First use alpha-beta instead of minmax, then try to get better move ordering, maybe implement a transposition table, and so on. There are tons of ways to improve the efficiency of a minmax search. The basic ideas that work for chess will work for other turn based board games, so if you can learn about how the algorithms work by writing a simpler game, you will have a much easier time writing a chess program.

This topic is closed to new replies.

Advertisement