| View previous topic :: View next topic |
| Author |
Message |
kenny stanley
Joined: 08 Mar 2009 Posts: 226 Location: Canada
|
Post subject: Null returning mate Posted: Thu Dec 09, 2010 5:41 am |
|
|
Hi, Im having some trouble with having mate scores returned, and the engine resigning or playing a terrible move. Im guessing its because I dont have anything to tell Null move not to return a mate score...
| Code: |
if (null_score >= beta && depth > 5)
{
null_score = -search(beta, alpha, depth - 5, TRUE);
if (null_score >= beta)
return beta;
}
else
{
if (null_score >= beta)
return beta;
if (null_score < -INF + 10 * maxdepth)
extensions++;
}
|
Ive seen sections in other programs, but im not sure how to define...
an example from fruit:
| Code: |
if (value >= beta) {
if (value > +ValueEvalInf) value = +ValueEvalInf; // do not return unproven mates
ASSERT(!value_is_mate(value));
|
so i need to define +ValueEvalInf, and !value_is_mate. Im guessing +ValueEvalInf should = +INF but im not certain about what value_is_mate should be (INF - 100 ? )
stockfish code looks a bit simpler:
| Code: |
if (nullValue >= beta)
{
// Do not return unproven mate scores
if (nullValue >= value_mate_in(PLY_MAX))
nullValue = beta;
|
but again... im having trouble how to define value_mate_in(PLY_MAX)
The other possible problem is that in move ordering the PV is scored highest at INF... I wonder if I need to drop that lower, hash for example is INF - 10000. Thanks. _________________ outAtime |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|