Advertisement

Chess AI

Started by January 22, 2007 08:25 AM
10 comments, last by GameDev.net 17 years, 10 months ago
Quote: Original post by daniel_i_l
You must be good, how did you beat it? (could you post the steps?)

Well, I spent several hours a day for a few months playing this game with friends while we were supposed to be learning Math in college. :)

The game I posted earlier (to show the bug), is one where I was about to beat the computer.

Quote: It would be relativly easy to let the player start and the other things you mentioned but i really dont have time to mess around with it now. maybe during the next break i'll improve the interface and fix that bug.
the current search depth is 8 but it usually searches much less due to AB and other pruning algorithms.

That's a pretty fast depth-8 search! I programmed a simple player this morning but I haven't done much with move ordering and I didn't implement transposition tables, so it's kind of slow. I'll see if I can beef it up a little (better evaluation, better search) and I'll post the code somewhere.

Quote:
I see it much clearly now, so now the only thing is to write it.
i dont need to write a very smart and clever AI , i just have to write it so it moves reasonably.


Define reasonably :=)
If your program would just be able to make a random but legal move, would that qualify as reasonable? Then you'd just have to determine if your king will be checked after the move, and recognize check-mates.

And you can boost it by making it capture any undefended pieces.
Or you might generate all possible moves, count how many potential moves your pieces are going to have after this move and choose the one that gives the widest selection of potential moves.

So, without any minmax, you could get a chess engine, which - although it might not be able to check-mate the opponent if not by accident - could appear very reasonable to a beginner in chess. (Beginners more or less make random moves, occasionally capturing a piece.)

As you didn't seem to realize at first that the logics part of a program and its GUI can be developed independently, may-be your assignment is simpler than you think - just about making a GUI interact with a basic engine?

This topic is closed to new replies.

Advertisement