Author: Geoff
Date: 10:58:48 06/06/03
Go up one level in this thread
Hi Frank
I am not 100% sure either but I thought it is OK to do a Null move at the root
position. Mind you the more I think about it the less sure I am!
Casting vote required again from one of the resident experts ?
bigger snip
On June 06, 2003 at 00:48:56, Frank Schneider wrote:
><big snip>
>> depth = 1;
>>
>> while (depth <= maxDepth)
>> {
>> followPV = TRUE;
>>
>> x = search(alpha, beta, depth, TRUE);
>
>
>Hi,
>
>I'm not sure if I'm right, but it seems this should be
>
>x = search(alpha, beta, depth, FALSE);
>
>otherwise you do a nullmove in the root position.
>
>Frank
>
>
>>
>> if (depth > 2)
>> {
>> if (x <= alpha)
>> {
>> alpha = -INFINITY;
>>
>> if (failedLastTime)
>> beta = INFINITY;
>> else
>> beta = x + 1;
>>
>> failedLastTime = TRUE;
>>
>> continue;
>> }
>> else
>> failedLastTime = FALSE;
>>
>> if (x >= beta)
>> {
>> beta = INFINITY;
>>
>> if (failedLastTime)
>> alpha = -INFINITY;
>> else
>> alpha = x - 1;
>>
>> failedLastTime = TRUE;
>>
>> continue;
>> }
>> else
>> failedLastTime = FALSE;
>>
>> alpha = x - EPSILON;
>> beta = x + EPSILON;
>> }
>>
>> stopMeasureTime = get_ms();
>>
>> if (outputMode & SPEED_DEBUG_OUTPUT)
>> printf("Nodes = %d Alpha Beta return a score of %d for move %s depth = %d
>>\r\n",
>> nodes, x, moveString(pv[0][0].b), depth);
>>
>> /* output some timing debug */
>> timeDiff = (((double)(stopMeasureTime - startMeasureTime))/1000);
>> nodesPerSec = (double)(nodes+500) / (timeDiff*1000);
>>
>> if (outputMode & SPEED_DEBUG_OUTPUT)
>> printfDebug("Time elapsed = %0.2f Secs for %d nodes Nodes/Sec = %1.0f\r\n",
>> timeDiff, nodes, nodesPerSec);
>>
>> if (!(outputMode & XBOARD_OUTPUT) && !(outputMode & SEARCH_DEBUG_OUTPUT))
>> {
>> /* print out the principal variation */
>>
>>
>> if (npsMode)
>> {
>> if (depth == 1)
>> /* show Nodes per sec */
>> printfDebug("Ply Eval Time kNode/s Principle Variation\r\n");
>>
>> printfDebug("%2d: %6d %5d %4.0f ", depth, x, (get_ms() -
>>startTime)/10, nodesPerSec);
>> }
>> else
>> {
>> if (depth == 1)
>> /* show Total Nodes*/
>> printfDebug("Ply Eval Time Nodes Principle Variation\r\n");
>>
>> printfDebug("%2d: %6d %5d %10u ", depth, x, (get_ms() - startTime) / 10,
>>nodes);
>> }
>>
>> for (k = 0; k < pv_length[0]; k++)
>> printfDebug("%s ", moveString(pv[0][k].b));
>>
>> printfDebug("\r\n");
>>
>> }
>> else if (outputMode & XBOARD_OUTPUT)
>> {
>>
>> printfDebug("%d %d %d %d",
>> depth, x, (get_ms() - startTime) / 10, nodes);
>>
>> for (j = 0; j < pv_length[0]; j++)
>> printfDebug(" %s", moveString(pv[0][j].b));
>>
>> printfDebug("\r\n");
>>
>> fflush(stdout);
>> }
>>
>> /* if we have got a no moves condition */
>> if (x > 9000 || x < -9000)
>> break;
>>
>> depth++; /* increase search depth */
>>
>> }
>>}
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.