Archived

This topic is now archived and is closed to further replies.

The One

Basic chess

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites