Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Correct values if all moves are pruned?

Author: Severi Salminen

Date: 00:49:37 01/06/01

Go up one level in this thread


>>I think what Severi meant to ask was what happen when all the moves are pruned.
>>It is like no moves were examined or no moves were legal. Then, current_score
>>was never assigned a value, so... what value should be used to return at the end
>>of search()?
>>
>>Well, it should be the default value that it is assigned to "current score"
>>before looping through all the moves. Unless there are no legal moves (there
>>should be an evaluation here to see if there is stalemate or checkmate)
>>alpha should be correct in any case, because alpha means "I do not know
>>the value but I assumed that it should be <= than alpha" which is exactly
>>what it was tested.
>>Is that correct?
>
>Yes. The default score you are referring to is usually alpha and if all
>moves are pruned that is the score returned. However you do need to
>distinguish the case when no moves were searched because of forward pruning
>from the case in which no moves were searched because none were legal
>(i.e. checkmate or stalemate). In the latter case you return a draw score
>or mate score, as appropriate.

Yes, I  made this error and returned -INF way too often:) My original thought
was that if all moves were futility pruned returning something lower than alpha
might improve all the possible researches. And I didn't know how low value could
be returned to be absolutely sure that it is noe _too_ low. But alpha is
probably a safe guess.

Severi



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.