Author: David Rasmussen
Date: 15:57:39 01/11/02
Go up one level in this thread
On January 11, 2002 at 18:06:24, Matthias Gemuh wrote: >On January 11, 2002 at 17:52:50, Uri Blass wrote: > >>On January 11, 2002 at 17:40:09, Matthias Gemuh wrote: >> >>> >>>[D] 3r3k/3r1P1p/pp1Nn3/2pp4/7Q/6R1/Pq4PP/5RK1 w - - 0 1 >>> >>>Even when I limit extensions to 2 !!! (instead of 1), >>>no explosion occurs. >>>Positive side effect is I see this mate then at ply 3 (instead of 5). >>>My extensions are then >>> >>> nLocalExt = 0; MultiVariant->nExt[nPly] = 0; >>> if (ChsStrct->extCheck[nPly]) { nCounters.nExtCheck++; nLocalExt += 400; } >>> if ((nPly >= 2)&&(ChsStrct->extCheck[nPly-2])&&(ChsStrct->extCheck[nPly])) >>> { nCounters.nDoubleCheck++; nLocalExt += 200; } >>> if ((nPly)&&(ChsStrct->extCapture[nPly-1])) { >>> if (ChsStrct->extCapture[nPly] == 2) { nCounters.nExtRecap++; nLocalExt >>>+= 260; } >>> } >>> if (mate_threat) nLocalExt += 400; >>> if (ChsStrct->extOneMove[nPly]) nLocalExt += 400; >>> if (ChsStrct->extPromo[nPly]) { nCounters.nExtPromo++; nLocalExt += 400; } >>> if (ChsStrct->goodMoves[nPly] == 1) nLocalExt += 120; >>> else if (ChsStrct->goodMoves[nPly] == 2) nLocalExt += 80; >>> else if (ChsStrct->goodMoves[nPly] == 3) nLocalExt += 40; >>> nLocalExt += 5*ChsStrct->extPawnPush[nPly]; >>> if ((nPly)&&(ChsStrct->extCapture[nPly-1])) { >>> if (ChsStrct->extCapture[nPly] == 1) { nCounters.nExtRecap++; nLocalExt >>>+= 160; } >>> } >>> if ((nPly >= 2) && >>>((MultiVariant->megaMove[nPly-1]-MultiVariant->megaMove[nPly-2]) > PAWNVALUE) && >>> ((MultiVariant->megaMove[nPly-1]-MultiVariant->megaMove[nPly-2]) < >>2*PAWNVALUE)) >>> { nCounters.nExtMegaMove3++; nLocalExt += 60; } >>> if (nPly >= 2) { >>> if ((MultiVariant->megaMove[nPly-1]-MultiVariant->megaMove[nPly-2]) > >>>3*PAWNVALUE) >>> { nCounters.nExtMegaMove1++; nLocalExt += 180; } >>> else if ((MultiVariant->megaMove[nPly-1]-MultiVariant->megaMove[nPly-2]) >>>> 2*PAWNVALUE) >>> { nCounters.nExtMegaMove2++; nLocalExt += 120; } >>> } >>> nLocalExt /= 400; if (nLocalExt < 0) nLocalExt = 0; >>> nLocalExt = min(2, nLocalExt); MultiVariant->nExt[nPly] = nLocalExt; >>> >>> >>>400 pts = 1 ply >>>I have just increased 1 reply from 300 to 400, still no explosion. >>>Store your extensions locally at the nodes!! That is the key. >> >>I do not understand this code because I do not know >>the meaning of the variables >> >>I am not going to look at it for many hours in order to try to guess the meaning >>of the variables. >> >>Guessing the meaning of part of them correctly is not enough. >>Can other programmers understand the meaning of this code? >> >>Uri > > > >The code was not meant for you. >If David Rasmussen does not understand any part of it, >he will ask me and I will clearify him. Don't think I have >lots of time to explain things unnecessarily. >Stick to your tscp clone. > >Matthias. I don't know if I understand it, I am not going to try. I assume you are just doing standard stuff here. My own code is way simpler (at least to me), and I think everyone can understand it: /* * Extend the search depth if an * interesting move was made at * the previous ply. */ int extension = 0; // Check Extension if (inCheck) { extension += CHECK_EXTENSION; } // Pawn Push Extension if (MyPiece(currentMove[ply - 1]) == PAWN) { if (pos.turn == WHITE) { if (Rank(To(currentMove[ply - 1])) >= RANK7) extension += PAWN_EXTENSION; } else { if (Rank(To(currentMove[ply - 1])) <= RANK2) extension += PAWN_EXTENSION; } } // Recapture Extension if (ply > 1 && To(currentMove[ply - 1]) == To(currentMove[ply - 2]) && pieceValue[Capture(currentMove[ply - 2])] == pieceValue[Capture(currentMove[ply - 1])] ) { if (!(AttacksTo(pos,To(currentMove[ply - 1])) & pos.occupied[Opposite(pos.turn)])) { // There was only one recapture extension += RECAPTURE_EXTENSION; } } // Limiting Extensions if (extension > ONE_PLY) extension = ONE_PLY; // One Reply Extension if (inCheck) { if (numberOfMoves == 1) extension += ONE_REPLY_EXTENSION; } depth += extension; Anyway, it's not important. What's important is that I have some sort of extension "bug", or at least I don't understand what's going on. Sure, there could be some line where the king is being chased around the board with a lot of check and one reply extensions. Who knows. I will check it later. /David
This page took 0.01 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.