Author: Jon Dart
Date: 14:59:43 01/05/01
Go up one level in this thread
On January 05, 2001 at 16:24:52, Miguel A. Ballicora wrote: >On January 05, 2001 at 16:02:22, Jon Dart wrote: > >>On January 05, 2001 at 15:21:18, Severi Salminen wrote: >> >>>Hi! >>> >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. > >Miguel
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.