Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Pure Negamax problem

Author: Michel Langeveld

Date: 21:05:42 02/15/04

Go up one level in this thread


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.

Why are you making a copy of the board? If you work with a copy, then this
should be declared local, not global.

I like nodes++ more as nodes += 1. Is this possible in .NET?
and best = -10000 instead of best = 0 - 10000
and val = -seach ... instead of val = 0 - search

Good work! Go futher with the code.

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.