Author: Andrew Wagner
Date: 05:46:52 02/16/04
Go up one level in this thread
On February 16, 2004 at 00:05:42, Michel Langeveld wrote: >On February 15, 2004 at 19:17:15, Andrew Wagner wrote: > >>Ok, I'm working on a .Net engine, as many of you know. I'm starting simple by >>just implementing a pure negamax search and right now I'm just trying to find >>the root move. If I search with a depth of 1, 3, or 5, I'm fine (though my >>engine oddly likes Na3, but that's an eval problem). However, if I search with a >>even depth like 2 or 4 moves, it's returning a BLACK move at the root. I've >>tested my move-generator and takeback routine thoroughly, and can't find the >>problem. The code for the negamax routine is at: >> >> http://www.lechess.com/search.txt >> >>It's in vb.net, but it's very readable. Can anyone see what the problem is? > >Use this: > >If (val > best) Then > best = val > best_move = mMove_Stack(i) >End If > >... >... > >and on the end: >b = best_move > >The problem is then probably gone. Yes, the code that's currently on the site (www.lechess.com/search.txt) works. Thanks a lot! > >Why are you making a copy of the board? If you work with a copy, then this >should be declared local, not global. > The board is a global instance of the class. As the engine transverses the tree, it does it all on one board. I'm not sure what you mean here. >I like nodes++ more as nodes += 1. Is this possible in .NET? Unfortunately, no. But it's better than nodes = nodes + 1 :) >and best = -10000 instead of best = 0 - 10000 >and val = -seach ... instead of val = 0 - search Yes, I wanted to make sure these weren't what were causing the problem through some wierd way the compiler interpreted the - sign. > >Good work! Go futher with the code. Thanks a lot! This forum is SO awesome! I'm hoping to have an entry in CCT7! > >Michel
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.