Thread: creating chess game...

  1. #16
    Registered User
    Join Date
    Jan 2008
    Posts
    225
    Forget chess! first clear up your basic skills. Using AI in chess is extremely difficult i would say. It would take months or even years of your effort. You can plan for 2 player Chess though. It's relatively easy compared to AI version

  2. #17
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Hmm I coded up a chess AI (level of a candidate master, bugfree as far as I can tell) in ~1 month (few hours every day). I was learning basic things like minimax along the way (A LOT of reading), too. So it's definitely doable as a newbie project (I only had about 1 year of programming experience at that time).

    I agree the OP should get a stronger grasp on C++ first, though.

  3. #18
    Registered User
    Join Date
    Jan 2008
    Posts
    225
    Minimax algo is way ancient and probably discarded in field of AI. Also you can't generate all possible moves through minimax. It will be too expensive. If you let go this thing i agree it can be done by newbie

  4. #19
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    XOR swap is the only algorithm I would know that's truly discarded and it's way more ancient than minimax. XOR swap was obsoleted by modern processing instructions. Algorithms aren't discarded like old scientific theories.

  5. #20
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    99% of all current chess AIs use minimax (there are some experimental ones using other algorithms and they are not nearly as strong). Using naive minimax you can look ahead about 5 plies (half moves). With alpha-beta prunning (an optimization for minimax) you can get to ~8 (compared to the theoretical 5x2 = 10 for optimal move ordering). There are many other very effective optimizations - hash tables for better move ordering (which increases the effectiveness of alpha-beta), transposition table (there are many ways to reach the same positions, no need to search them over and over), null-move prunning (if you don't make a move, let your opponent move twice in a row, and you still have a fail-high, don't bother searching this move)... With all those things and some other minor optimizations, you can get to 12-15 plies (with selective extensions on interesting lines, and reductions on boring lines). With a good static evaluation function, it is about master strength. On a supercomputer (like Deep Blue), 20 plies is not uncommon.

    Minimax is still the way to go for many board games (chess, othello, TTT, checkers, etc). One notable exception is Go. There has been very little success of minimax with Go, because of the huge branching factor.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need book to program game into multiplayer...
    By edomingox in forum Game Programming
    Replies: 3
    Last Post: 10-02-2008, 09:26 AM
  2. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03:46 PM
  3. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 12:48 AM
  4. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  5. chess game
    By meka in forum C++ Programming
    Replies: 1
    Last Post: 12-06-2001, 02:33 PM