Chess

JellyWorld

Newbie
Joined
Mar 22, 2005
Messages
2,852
Reaction score
1
Ok, I have to write a Chess program for a school project, so I was wondering if anyone has any links to useful resources, or any recommended books that might help me.
 
That's head-explodingly hard. Did you choose the project yourself, or was it assigned to you?

I'd stick with something a little easier, given a choice.

-Angry Lawyer
 
I'm assuming you have to make a computer opponent, otherwise it should be pretty easy to make a chess game.

I would suggest doing Checkers/draughts instead. Chess is a very difficult game to make a compitent opponent for. It's very tough to make one that can seach possible moves to a decent depth in a reasonable length of time. Chess is a tough problem because the tree of moves is increadably wide, i.e. from a given position there is a very large number of moves available, since pieces can move to very many squares most of the time.

However, in checkers you don't get this wide tree, because each piece can move at most to 4 squares.

Whichever you decide to do i definatly recommend C++ since you really need the speed, i'd also recommend think VERY hard about your representation of a board. I strongly recommend bitboards.

You need to really be very familiar with working with individual bits in a variable, doing bit shifting / masking etc as well.

Developing a good scoring system is critical too. By this i mean being able to say definatly that this situation is more preferable that this other one etc. so you can decide what move to make.

A couple of good links:

http://www.gamedev.net/reference/programming/features/chess1/

http://www.google.co.uk/search?num=...:official&q=alpha+beta+chess+optimize&spell=1
 
Given that every programming assignment I've had all throughout undergrad has been piss easy, I'd say that the computer opponent is not required, though it may be extra credit. Then again I could be wrong, its just Chess is one of those games with a massive number of playable games, and thus you are only able to lookahead a small number of moves. There are lots of resources out there for heuristic pruning and the sort, those would come in handy.

Adam
 
Making the program without the computer opponent would make it very easy to program. Adding in a computer opponent would mean you need to use clever data structures etc. which you wouldn't have to worry about with no computer opponent.
 
just build one of these
0703.deepblue.jpg
 
Oops I seem to have completely forgotten about this thread, anyway thanks for the links, and yes I chose the project for myself, and I am writing an AI for it. I've written a tic tac toe program before, so i'm not completely unfamiliar to AI programming like this, but of course Chess is a lot more complicated.
 
A lot more. :)
I recommend doing checkers as it's vastly simpler to do, although the concepts are the same. Still, your choice, obviously! :)
 
Back
Top