andrewchess
User
 Newbie
| Posts: 3 |   | Karma: 0
|
Hash table: help! - 2007/02/14 05:27
I have programmed my own chess game using:
* minimax method with alpha-beta pruning * smart move ordering at each ply * 2 killer moves * principal continuation can be shown * shorter mating paths favored over longer ones * tree automatically shrinks in depth when forced mate path against human is found, so it moves faster and faster during a forced mate sequence * computer shows Mate in X message when it sees a forced mate by either side * evaluation right now is only mobility and material (material is actually calculated on the go)
I'm not much of a programmer, but somehow I was able to implement all of the above, and it works great, and I've tested it extensively. On my laptop, 5 ply trees are pretty fast (from 0 to 5 seconds), while a 6 ply tree feels a little slow.
Now I'm trying to add hash tables to speed things up, and I need help! Actually I've started to put in the code that saves positions in the hash table with either an exact or a bounded score. But when I arrive at a move and I see it in the hash table (32-bit hash code matches), when I use the score saved in the hash table (I'm just trying exact scores for now), I get weird results.
Is there anyone out there willing to review my code? Really there isn't that much code to review, just one main routine, really. If people are interested, I can post the main routine. It's actually writtin in Visual Basic (Visual Studio 2005), and requires Windows and .NET (.NET comes with Vista, or can be downloaded onto a Windows machine if it's not there).
thanks so much! Andrew
|