Code: Select all
diff 999963/init_gen.i 999958/init_gen.i
47,52c47,52
< CAPTURE_VALUE[wEnumK][bEnumQ] = (0xcb << 24) + (0x00 << 20);
< CAPTURE_VALUE[wEnumK][bEnumR] = (0xc3 << 24) + (0x00 << 20);
< CAPTURE_VALUE[wEnumK][bEnumBL] = (0xbb << 24) + (0x00 << 20);
< CAPTURE_VALUE[wEnumK][bEnumBD] = (0xbb << 24) + (0x00 << 20);
< CAPTURE_VALUE[wEnumK][bEnumN] = (0xb3 << 24) + (0x00 << 20);
< CAPTURE_VALUE[wEnumK][bEnumP] = (0xab << 24) + (0x00 << 20);
---
> CAPTURE_VALUE[wEnumK][bEnumQ] = (0xcb << 24) + (0x03 << 20);
> CAPTURE_VALUE[wEnumK][bEnumR] = (0xc3 << 24) + (0x03 << 20);
> CAPTURE_VALUE[wEnumK][bEnumBL] = (0xbb << 24) + (0x03 << 20);
> CAPTURE_VALUE[wEnumK][bEnumBD] = (0xbb << 24) + (0x03 << 20);
> CAPTURE_VALUE[wEnumK][bEnumN] = (0xb3 << 24) + (0x03 << 20);
> CAPTURE_VALUE[wEnumK][bEnumP] = (0xab << 24) + (0x03 << 20);
104,109c104,109
< CAPTURE_VALUE[bEnumK][wEnumQ] = (0xcb << 24) + (0x00 << 20);
< CAPTURE_VALUE[bEnumK][wEnumR] = (0xc3 << 24) + (0x00 << 20);
< CAPTURE_VALUE[bEnumK][wEnumBL] = (0xbb << 24) + (0x00 << 20);
< CAPTURE_VALUE[bEnumK][wEnumBD] = (0xbb << 24) + (0x00 << 20);
< CAPTURE_VALUE[bEnumK][wEnumN] = (0xb3 << 24) + (0x00 << 20);
< CAPTURE_VALUE[bEnumK][wEnumP] = (0xab << 24) + (0x00 << 20);
---
> CAPTURE_VALUE[bEnumK][wEnumQ] = (0xcb << 24) + (0x03 << 20);
> CAPTURE_VALUE[bEnumK][wEnumR] = (0xc3 << 24) + (0x03 << 20);
> CAPTURE_VALUE[bEnumK][wEnumBL] = (0xbb << 24) + (0x03 << 20);
> CAPTURE_VALUE[bEnumK][wEnumBD] = (0xbb << 24) + (0x03 << 20);
> CAPTURE_VALUE[bEnumK][wEnumN] = (0xb3 << 24) + (0x03 << 20);
> CAPTURE_VALUE[bEnumK][wEnumP] = (0xab << 24) + (0x03 << 20);
diff 999963/input.c 999958/input.c
105a106,116
> if (!memcmp (string, "PVHash", 6))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> Value = InitPVHash (Value);
> SEND ("Optional PVHash %d\n", Value);
> READYOK ();
> }
> }
118a130,131
> if (TITANIC_MODE)
> ivan_init_smp ();
131c144,147
< TITANIC_MODE = TRUE;
---
> {
> TITANIC_MODE = TRUE;
> ivan_init_smp ();
> }
206c222,223
< if (!memcmp (string, "UCI_BishopPairScale", 19))
---
> /********************************/ /********************************/
> if (!memcmp (string, "UCI_White_Bishop_Pair_Scale", 27))
216,217c233,234
< UCI_BishopPairScale = Value;
< SEND ("Optional UCI_BishopPairScale %d\n", UCI_BishopPairScale);
---
> UCI_White_Bishops_Scale = Value;
> SEND ("Optional UCI_White_Bishop_Pair_Scale %d\n", UCI_White_Bishops_Scale);
223c240
< if (!memcmp (string, "UCI_PawnScale", 13))
---
> if (!memcmp (string, "UCI_White_Pawn_Scale", 20))
233,234c250,251
< UCI_PawnScale = Value;
< SEND ("Optional UCI_PawnScale %d\n", UCI_PawnScale);
---
> UCI_White_Pawn_Scale = Value;
> SEND ("Optional UCI_White_Pawn_Scale %d\n", UCI_White_Pawn_Scale);
240,241c257
<
< if (!memcmp (string, "UCI_KnightScale", 15))
---
> if (!memcmp (string, "UCI_White_Knight_Scale", 22))
251,252c267,268
< UCI_KnightScale = Value;
< SEND ("Optional UCI_KnightScale %d\n", UCI_KnightScale);
---
> UCI_White_Knight_Scale = Value;
> SEND ("Optional UCI_White_Knight_Scale %d\n", UCI_White_Knight_Scale);
258c274
< if (!memcmp (string, "UCI_BishopScale", 15))
---
> if (!memcmp (string, "UCI_White_Light_Bishop_Scale", 28))
268,269c284,285
< UCI_BishopScale = Value;
< SEND ("Optional UCI_BishopScale %d\n", UCI_BishopScale);
---
> UCI_White_Light_Scale = Value;
> SEND ("Optional UCI_White_Light_Bishop_Scale %d\n", UCI_White_Light_Scale);
275,276c291,308
<
< if (!memcmp (string, "UCI_RookScale", 13))
---
> if (!memcmp (string, "UCI_White_Dark_Bishop_Scale", 27))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 150)
> Value = 150;
> if (Value > 500)
> Value = 500;
> UCI_White_Dark_Scale = Value;
> SEND ("Optional UCI_White_Dark_Bishop_Scale %d\n", UCI_White_Dark_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_White_Rook_Scale", 20))
286,287c318,319
< UCI_RookScale = Value;
< SEND ("Optional UCI_RookScale %d\n", UCI_RookScale);
---
> UCI_White_Rook_Scale = Value;
> SEND ("Optional UCI_White_Rook_Scale %d\n", UCI_White_Rook_Scale);
293c325
< if (!memcmp (string, "UCI_QueenScale", 14))
---
> if (!memcmp (string, "UCI_White_Queen_Scale", 21))
303,304c335,336
< UCI_QueenScale = Value;
< SEND ("Optional UCI_QueenScale %d\n", UCI_QueenScale);
---
> UCI_White_Queen_Scale = Value;
> SEND ("Optional UCI_White_Queen_Scale %d\n", UCI_White_Queen_Scale);
310c342,510
<
---
> /********************************/ /********************************/
> if (!memcmp (string, "UCI_Black_Bishop_Pair_Scale", 27))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 0)
> Value = 0;
> if (Value > 150)
> Value = 150;
> UCI_Black_Bishops_Scale = Value;
> SEND ("Optional UCI_Black_Bishop_Pair_Scale %d\n", UCI_Black_Bishops_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_Black_Pawn_Scale", 20))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 50)
> Value = 50;
> if (Value > 200)
> Value = 200;
> UCI_Black_Pawn_Scale = Value;
> SEND ("Optional UCI_Black_Pawn_Scale %d\n", UCI_Black_Pawn_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_Black_Knight_Scale", 22))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 150)
> Value = 150;
> if (Value > 500)
> Value = 500;
> UCI_Black_Knight_Scale = Value;
> SEND ("Optional UCI_Black_Knight_Scale %d\n", UCI_Black_Knight_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_Black_Light_Bishop_Scale", 28))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 150)
> Value = 150;
> if (Value > 500)
> Value = 500;
> UCI_Black_Light_Scale = Value;
> SEND ("Optional UCI_Black_Light_Bishop_Scale %d\n", UCI_Black_Light_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_Black_Dark_Bishop_Scale", 27))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 150)
> Value = 150;
> if (Value > 500)
> Value = 500;
> UCI_Black_Dark_Scale = Value;
> SEND ("Optional UCI_Black_Dark_Bishop_Scale %d\n", UCI_Black_Dark_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_Black_Rook_Scale", 20))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 300)
> Value = 300;
> if (Value > 700)
> Value = 700;
> UCI_Black_Rook_Scale = Value;
> SEND ("Optional UCI_Black_Rook_Scale %d\n", UCI_Black_Rook_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "UCI_Black_Queen_Scale", 21))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 500)
> Value = 500;
> if (Value > 1500)
> Value = 1500;
> UCI_Black_Queen_Scale = Value;
> SEND ("Optional UCI_Black_Queen_Scale %d\n", UCI_Black_Queen_Scale);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "MaterialWeighting", 17))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 512)
> Value = 512;
> if (Value > 2048)
> Value = 2048;
> UCI_MATERIAL_WEIGHTING = Value;
> SEND ("Optional MaterialWeighting %d\n", UCI_MATERIAL_WEIGHTING);
> InitMaterialValue ();
> EvalHashClear ();
> READYOK ();
> }
> }
> if (!memcmp (string, "KingSafetyWeighting", 19))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 512)
> Value = 512;
> if (Value > 2048)
> Value = 2048;
> UCI_KING_SAFETY_WEIGHTING = Value;
> SEND ("Optional KingSafetyWeighting %d\n", UCI_KING_SAFETY_WEIGHTING);
> READYOK ();
> }
> }
> if (!memcmp (string, "PawnsWeighting", 14))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value < 512)
> Value = 512;
> if (Value > 2048)
> Value = 2048;
> UCI_PAWNS_WEIGHTING = Value;
> SEND ("Optional PawnsWeighting %d\n", UCI_PAWNS_WEIGHTING);
> PawnHashReset ();
> READYOK ();
> }
> }
> /********************************/ /********************************/
324c524
<
---
> /********************************/ /********************************/
383a584,597
> if (!memcmp (string, "TryPVinAnalysis", 15))
> {
> v = strstr (string, "value");
> if (v)
> {
> if (!strcmp (v + 6, "false"))
> TRY_PV_IN_ANALYSIS = FALSE;
> if (!strcmp (v + 6, "true"))
> TRY_PV_IN_ANALYSIS = TRUE;
> SEND ("Optional TryPVinAnalysis %s\n",
> TRY_PV_IN_ANALYSIS ? "true" : "false");
> READYOK ();
> }
> }
397a612,625
> if (!memcmp (string, "DoHashFull", 10))
> {
> v = strstr (string, "value");
> if (v)
> {
> if (!strcmp (v + 6, "false"))
> DO_HASH_FULL = FALSE;
> if (!strcmp (v + 6, "true"))
> DO_HASH_FULL = TRUE;
> SEND ("Optional DoHashFull %s\n",
> DO_HASH_FULL ? "true" : "false");
> READYOK ();
> }
> }
416,417c644,645
< EmitFen (POSITION, STRING1);
< SEND ("info string %s\n", STRING1);
---
> EmitFen (POSITION, STRING1[POSITION->cpu]);
> SEND ("info string %s\n", STRING1[POSITION->cpu]);
541a770,930
>
> if (!memcmp (string, "TimeEasyFactor", 14))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> EASY_FACTOR = Value;
> if (EASY_FACTOR <= 10)
> EASY_FACTOR = 10;
> if (EASY_FACTOR >= 500)
> EASY_FACTOR = 500;
> SEND ("Optional TimeEasyFactor %d\n", EASY_FACTOR);
> READYOK ();
> }
> }
> if (!memcmp (string, "TimeEasyFactorPonder", 20))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> EASY_FACTOR_PONDER = Value;
> if (EASY_FACTOR_PONDER <= 10)
> EASY_FACTOR_PONDER = 10;
> if (EASY_FACTOR_PONDER >= 500)
> EASY_FACTOR_PONDER = 500;
> SEND ("Optional TimeEasyFactorPonder %d\n", EASY_FACTOR_PONDER);
> READYOK ();
> }
> }
> if (!memcmp (string, "TimeBattleFactor", 16))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> BATTLE_FACTOR = Value;
> if (BATTLE_FACTOR <= 10)
> BATTLE_FACTOR = 10;
> if (BATTLE_FACTOR >= 500)
> BATTLE_FACTOR = 500;
> SEND ("Optional TimeBattleFactor %d\n", BATTLE_FACTOR);
> READYOK ();
> }
> }
> if (!memcmp (string, "TimeOrdinaryFactor", 18))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> ORDINARY_FACTOR = Value;
> if (ORDINARY_FACTOR <= 10)
> ORDINARY_FACTOR = 10;
> if (ORDINARY_FACTOR >= 500)
> ORDINARY_FACTOR = 500;
> SEND ("Optional TimeOrdinaryFactor %d\n", ORDINARY_FACTOR);
> READYOK ();
> }
> }
> if (!memcmp (string, "TimeAbsolutePercent", 19))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> ABSOLUTE_PERCENT = Value;
> if (ABSOLUTE_PERCENT <= 10)
> ABSOLUTE_PERCENT = 10;
> if (ABSOLUTE_PERCENT >= 100)
> ABSOLUTE_PERCENT = 100;
> SEND ("Optional TimeAbsolutePercent %d\n", ABSOLUTE_PERCENT);
> READYOK ();
> }
> }
> if (!memcmp (string, "TimeDesiredMillis", 17))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> DESIRED_MILLIS = Value;
> if (DESIRED_MILLIS <= 10)
> DESIRED_MILLIS = 10;
> if (DESIRED_MILLIS >= 100)
> DESIRED_MILLIS = 100;
> SEND ("Optional TimeDesiredMillis %d\n", DESIRED_MILLIS);
> READYOK ();
> }
> }
> if (!memcmp (string, "TimeBookExitMoves", 17))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> BOOK_EXIT_MOVES = Value;
> if (BOOK_EXIT_MOVES <= 0)
> BOOK_EXIT_MOVES = 0;
> if (BOOK_EXIT_MOVES >= 20)
> BOOK_EXIT_MOVES = 20;
> SEND ("Optional TimeBookExitMoves %d\n", BOOK_EXIT_MOVES);
> READYOK ();
> }
> }
> if (!memcmp (string, "ExtraExtendInCheck", 18))
> {
> v = strstr (string, "value");
> if (v)
> {
> if (!strcmp (v + 6, "false"))
> EXTEND_IN_CHECK = FALSE;
> if (!strcmp (v + 6, "true"))
> EXTEND_IN_CHECK = TRUE;
> SEND ("Optional ExtraExtendInCheck %s\n",
> EXTEND_IN_CHECK ? "true" : "false");
> READYOK ();
> }
> }
>
> #ifdef BUILD_ZOG_MP_COMPILE
> if (!memcmp (string, "ZOG MP Usage", 12))
> {
> v = strstr (string, "value");
> if (v)
> {
> if (!strcmp (v + 6, "false"))
> ZOG_OFF ();
> if (!strcmp (v + 6, "true"))
> {
> if (!ZOG_AKTIV)
> ZOG_ON ();
> }
> SEND ("Optional ZOG MP Usage %s\n", ZOG_AKTIV ? "true" : "false");
> READYOK ();
> }
> }
> if (!memcmp (string, "ZOG MP Records", 14))
> {
> v = strstr (string, "value");
> if (v)
> {
> Value = atoi (v + 6);
> if (Value <= 1)
> Value = 1;
> if (Value >= 1024)
> Value = 1024;
> if (ZOG_AKTIV)
> {
> ZOG_OFF ();
> ZOG_SIZE = Value << 10;
> ZOG_ON ();
> }
> else
> ZOG_SIZE = Value << 10;
> SEND ("Optional ZOG MP Records %d\n", ZOG_SIZE >> 10);
> READYOK ();
> }
> }
> #endif
546c935
< SEND ("id name %s verzione %s\n", EPONYM, VERSION);
---
> SEND ("id name %s version %s\n", EPONYM, VERSION);
553c942
< SEND ("id dedication To Vladimir Ilyich\n");
---
> SEND ("id dedication To Vladimir Ilyich plus Zog 1 with Albania\n");
555c944,945
< SEND ("option name PawnsHash type spin min 1 max 1024 default 2\n");
---
> SEND ("option name PawnsHash (binary mb) type spin min 1 max 1024 default 2\n");
> SEND ("option name PVHash (binary mb) type spin min 1 max 1024 default 1\n");
585,590c975,991
< SEND ("option name UCI_BishopPairScale (centipawns) type spin min 0 max 150 default 45\n");
< SEND ("option name UCI_PawnScale (centipawns) type spin min 50 max 200 default 100\n");
< SEND ("option name UCI_KnightScale (centipawns) type spin min 150 max 500 default 300\n");
< SEND ("option name UCI_BishopScale (centipawns) type spin min 150 max 500 default 310\n");
< SEND ("option name UCI_RookScale (centipawns) type spin min 300 max 700 default 500\n");
< SEND ("option name UCI_QueenScale (centipawns) type spin min 500 max 1500 default 950\n");
---
> SEND ("option name UCI_White_Bishop_Pair_Scale (cp) type spin min 0 max 150 default 45\n");
> SEND ("option name UCI_White_Pawn_Scale (cp) type spin min 50 max 200 default 100\n");
> SEND ("option name UCI_White_Knight_Scale (cp) type spin min 150 max 500 default 300\n");
> SEND ("option name UCI_White_Light_Bishop_Scale (cp) type spin min 150 max 500 default 310\n");
> SEND ("option name UCI_White_Dark_Bishop_Scale (cp) type spin min 150 max 500 default 310\n");
> SEND ("option name UCI_White_Rook_Scale (cp) type spin min 300 max 700 default 500\n");
> SEND ("option name UCI_White_Queen_Scale (cp) type spin min 500 max 1500 default 950\n");
> SEND ("option name UCI_Black_Bishop_Pair_Scale (cp) type spin min 0 max 150 default 45\n");
> SEND ("option name UCI_Black_Pawn_Scale (cp) type spin min 50 max 200 default 100\n");
> SEND ("option name UCI_Black_Knight_Scale (cp) type spin min 150 max 500 default 300\n");
> SEND ("option name UCI_Black_Light_Bishop_Scale (cp) type spin min 150 max 500 default 310\n");
> SEND ("option name UCI_Black_Dark_Bishop_Scale (cp) type spin min 150 max 500 default 310\n");
> SEND ("option name UCI_Black_Rook_Scale (cp) type spin min 300 max 700 default 500\n");
> SEND ("option name UCI_Black_Queen_Scale (cp) type spin min 500 max 1500 default 950\n");
> SEND ("option name MaterialWeighting type spin min 512 max 2048 default 1024\n");
> SEND ("option name KingSafetyWeighting type spin min 512 max 2048 default 1024\n");
> SEND ("option name PawnsWeighting type spin min 512 max 2048 default 1024\n");
591a993
> SEND ("option name TryPVinAnalysis type check default true\n");
592a995
> SEND ("option name DoHashFull type check default true\n");
594a998,1010
> SEND ("option name TimeEasyFactor type spin min 10 max 500 default 15\n");
> SEND ("option name TimeEasyFactorPonder type spin min 10 max 500 default 33\n");
> SEND ("option name TimeBattleFactor type spin min 10 max 500 default 100\n");
> SEND ("option name TimeOrdinaryFactor type spin min 10 max 500 default 75\n");
> SEND ("option name TimeAbsolutePercent type spin min 10 max 100 default 25\n");
> SEND ("option name TimeDesiredMillis type spin min 10 max 100 default 40\n");
> SEND ("option name TimeBookExitMoves type spin min 0 max 20 default 0\n");
> SEND ("option name ExtraExtendInCheck type check default false \n");
>
> #ifdef BUILD_ZOG_MP_COMPILE
> SEND ("option name ZOG MP Usage type check default false\n");
> SEND ("option name ZOG MP Records (binary kilos) type spin min 1 max 1024 default 4\n");
> #endif
609a1026
> UCI_NEW_GAME = FALSE;
613c1030,1042
< HaltSearch (0);
---
> {
> if (SEARCH_IS_DONE)
> return;
> HaltSearch (0, 0); /* no return when JUMP_IS_SET */
> if (INFINITE_LOOP)
> return;
> STALL_MODE = TRUE;
> while (!SEARCH_IS_DONE)
> NANO_SLEEP (1000000);
> STALL_MODE = FALSE;
> SUPPRESS_INPUT = FALSE;
> return;
> }
615,617c1044,1052
< readyok ();
< if (!strcmp (I, "ponderhit"))
< ponderhit ();
---
> {
> readyok ();
> return;
> }
> if (!strcmp (I, "ponderhit")) /* cuidado con ZOG? Personal Opinion: for the OK! */
> {
> ponderhit ();
> return;
> }
620,621c1055,1069
< HaltSearch (0);
< NewGame (POSITION, TRUE);
---
> if (SEARCH_IS_DONE)
> {
> NewGame (POSITION, TRUE);
> return;
> }
> UCI_NEW_GAME = TRUE;
> HaltSearch (0, 0); /* no return when JUMP_IS_SET */
> if (INFINITE_LOOP)
> return;
> STALL_MODE = TRUE;
> while (!SEARCH_IS_DONE)
> NANO_SLEEP (1000000);
> STALL_MODE = FALSE;
> SUPPRESS_INPUT = FALSE;
> return;
629a1078,1079
> if (!strcmp (I, "makeundo"))
> MakeUndoSpeed (POSITION);
679c1129
< SUPPRESS_INPUT = FALSE;
---
> SUPPRESS_INPUT = FALSE; /* ??? */
706c1156
< #include <unistd.h> /* LINUX */ /* tested multiple hours with instant stop */
---
> #include <unistd.h> /* LINUX */
713c1163
< while (INPUT_BUFFER[r++] != '\n') /* newline, is always? MAC OS X? who cares!*/
---
> while (INPUT_BUFFER[r++] != '\n') /* newline, is always? MAC OS X? */
diff 999963/low_depth.c 999958/low_depth.c
55a56,57
> if (trans->flags & FLAG_MOVE_LESS)
> return 0;
151c153
< && (move & 0xe000) == 0 && SqSet[fr] & ~MyXRAY
---
> && (move & 0xe000) == 0 && (SqSet[fr] & ~MyXRAY)
162,163c164,165
< && SqSet[fr] & ~MyXRAY && POSITION->sq[fr] != EnumMyK
< && !MoveIsEP (move) && move != trans_move && !MySEE (POSITION, move))
---
> && (SqSet[fr] & ~MyXRAY) && !MoveIsEP (move)
> && move != trans_move && !MySEE (POSITION, move))
168d169
<
243a245,246
> if (trans->flags & FLAG_MOVE_LESS)
> return (HEIGHT (POSITION) - VALUE_MATE);
332c335
< v = -OppLowDepthCheck (POSITION, 1 - VALUE, depth - 1 + (EARLY_GAME));
---
> v = -OppLowDepthCheck (POSITION, 1 - VALUE, depth - 1 + EXTEND_IN_CHECK);
335c338
< new_depth = depth - 2 + EARLY_GAME;
---
> new_depth = depth - 2 + EXTEND_IN_CHECK;
diff 999963/main.c 999958/main.c
56c56
< printf ("%s verzione %s\n", EPONYM, VERSION);
---
> printf ("%s VERSION %s\n", EPONYM, VERSION);
74a75,78
> #ifdef BUILD_ZOG_MP_COMPILE
> printf ("compiled with ZOG MP, sizeof %d+%d\n",
> (int) (sizeof (type_zog_node)), (int) (2 * sizeof (typeDYNAMIC)));
> #endif
84c88
< malloc (MAXIMUM_PLY * sizeof(typeDYNAMIC));
---
> malloc (MAXIMUM_PLY * sizeof (typeDYNAMIC));
90a95
> SMP_HAS_AKTIV = FALSE;
92a98
> InitPVHash (1);
97,102c103,119
< UCI_BishopPairScale = 45;
< UCI_PawnScale = 100;
< UCI_KnightScale = 300;
< UCI_BishopScale = 310;
< UCI_RookScale = 500;
< UCI_QueenScale = 950;
---
> UCI_White_Bishops_Scale = 45;
> UCI_White_Pawn_Scale = 100;
> UCI_White_Knight_Scale = 300;
> UCI_White_Light_Scale = 310;
> UCI_White_Dark_Scale = 310;
> UCI_White_Rook_Scale = 500;
> UCI_White_Queen_Scale = 950;
> UCI_Black_Bishops_Scale = 45;
> UCI_Black_Pawn_Scale = 100;
> UCI_Black_Knight_Scale = 300;
> UCI_Black_Light_Scale = 310;
> UCI_Black_Dark_Scale = 310;
> UCI_Black_Rook_Scale = 500;
> UCI_Black_Queen_Scale = 950;
> UCI_MATERIAL_WEIGHTING = 1024;
> UCI_PAWNS_WEIGHTING = 1024;
> UCI_KING_SAFETY_WEIGHTING = 1024;
122c139,140
< SEND_HASH = FALSE;
---
> SEND_HASH = TRUE;
> DO_HASH_FULL = TRUE;
123a142
> ZOG_AKTIV = FALSE;
126c145,146
<
---
> SEARCH_IS_DONE = TRUE;
> INFINITE_LOOP = FALSE;
131a152
> TRY_PV_IN_ANALYSIS = TRUE;
148a170,172
> #ifdef BUILD_ZOG_MP_COMPILE
> ZOG_init ();
> #endif
151a176,185
> STALL_MODE = FALSE;
> SINCE_NEW_GAME = 0;
> EASY_FACTOR = 15;
> EASY_FACTOR_PONDER = 33;
> BATTLE_FACTOR = 100;
> ORDINARY_FACTOR = 75;
> ABSOLUTE_PERCENT = 25;
> DESIRED_MILLIS = 40;
> BOOK_EXIT_MOVES = 0;
> EXTEND_IN_CHECK = FALSE;
diff 999963/make_move.c 999958/make_move.c
106c106
< printf ("Mw %d %s\n", HEIGHT(POSITION), Notate(move, STRING1)));
---
> printf ("Mw %d %s\n", HEIGHT(POSITION), Notate(move, STRING1[POSITION->cpu])));
108c108
< if (POSITION->cpu == 0)
---
> if (!TITANIC_MODE) /* new */
231c231
< printf ("Mb %d %s\n", HEIGHT(POSITION), Notate(move, STRING1)));
---
> printf ("Mb %d %s\n", HEIGHT(POSITION), Notate(move, STRING1[POSITION->cpu])));
diff 999963/material_value.c 999958/material_value.c
15,16c15,16
< static int InitFlags (int wP, int wN, int wB, int wBL, int wBD, int wR, int wQ,
< int bP, int bN, int bB, int bB1, int bB2, int bR, int bQ)
---
> static int InitFlags (int wP, int wN, int wB, int wBL, int wBD, int wR, int wQ,
> int bP, int bN, int bB, int bBL, int bBD, int bR, int bQ)
33c33
< if ((wBL == 1 && bB2 == 1) || (wBD == 1 && bB1 == 1))
---
> if ((wBL == 1 && bBD == 1) || (wBD == 1 && bBL == 1))
63c63
< int bP, int bN, int bB, int bB1, int bB2, int bR, int bQ)
---
> int bP, int bN, int bB, int bBL, int bBD, int bR, int bQ)
75,76c75,76
< if ((wBL == 1 && wBD == 0 && bB1 == 0 && bB2 == 1) ||
< (wBL == 0 && wBD == 1 && bB1 == 1 && bB2 == 0))
---
> if ((wBL == 1 && wBD == 0 && bBL == 0 && bBD == 1) ||
> (wBL == 0 && wBD == 1 && bBL == 1 && bBD == 0))
90,91c90,91
< if ((wBL == 1 && wBD == 0 && bB1 == 0 && bB2 == 1) ||
< (wBL == 0 && wBD == 1 && bB1 == 1 && bB2 == 0))
---
> if ((wBL == 1 && wBD == 0 && bBL == 0 && bBD == 1) ||
> (wBL == 0 && wBD == 1 && bBL == 1 && bBD == 0))
98c98
< int bP, int bN, int bB, int bB1, int bB2, int bR, int bQ)
---
> int bP, int bN, int bB, int bBL, int bBD, int bR, int bQ)
150c150
< && ((wBL == 1 && bB1 == 1) || (wBD == 1 && bB2 == 1)))
---
> && ((wBL == 1 && bBL == 1) || (wBD == 1 && bBD == 1)))
153c153
< && ((wBD == 1 && bB1 == 1) || (wBL == 1 && bB2 == 1)))
---
> && ((wBD == 1 && bBL == 1) || (wBL == 1 && bBD == 1)))
363c363
< int bP, int bN, int bB, int bB1, int bB2, int bR, int bQ)
---
> int bP, int bN, int bB, int bBL, int bBD, int bR, int bQ)
415c415
< && ((bB1 == 1 && wBL == 1) || (bB2 == 1 && wBD == 1)))
---
> && ((bBL == 1 && wBL == 1) || (bBD == 1 && wBD == 1)))
418c418
< && ((bB2 == 1 && wBL == 1) || (bB1 == 1 && wBD == 1)))
---
> && ((bBD == 1 && wBL == 1) || (bBL == 1 && wBD == 1)))
631,637c631,647
< VALUE4 ( (w * av) / sc, (x * av) / sc, (y * av) / sc, (z * av) / sc)
< #define BishopPair VALUE4_SCALED (35, 40, 50, 55, 45, UCI_BishopPairScale)
< #define ValueP VALUE4_SCALED (80, 90, 110, 125, 100, UCI_PawnScale)
< #define ValueN VALUE4_SCALED (265, 280, 320, 355, 300, UCI_KnightScale)
< #define ValueB VALUE4_SCALED (280, 295, 325, 360, 310, UCI_BishopScale)
< #define ValueR VALUE4_SCALED (405, 450, 550, 610, 500, UCI_RookScale)
< #define ValueQ VALUE4_SCALED (800, 875, 1025, 1150, 950, UCI_QueenScale)
---
> VALUE4 ( (w * sc) / av, (x * sc) / av, (y * sc) / av, (z * sc) / av)
>
> #define wBishopPair VALUE4_SCALED (35, 40, 50, 55, 45, UCI_White_Bishops_Scale)
> #define wValueP VALUE4_SCALED (80, 90, 110, 125, 100, UCI_White_Pawn_Scale)
> #define wValueN VALUE4_SCALED (265, 280, 320, 355, 300, UCI_White_Knight_Scale)
> #define wValueBL VALUE4_SCALED (280, 295, 325, 360, 310, UCI_White_Light_Scale)
> #define wValueBD VALUE4_SCALED (280, 295, 325, 360, 310, UCI_White_Dark_Scale)
> #define wValueR VALUE4_SCALED (405, 450, 550, 610, 500, UCI_White_Rook_Scale)
> #define wValueQ VALUE4_SCALED (800, 875, 1025, 1150, 950, UCI_White_Queen_Scale)
> #define bBishopPair VALUE4_SCALED (35, 40, 50, 55, 45, UCI_Black_Bishops_Scale)
> #define bValueP VALUE4_SCALED (80, 90, 110, 125, 100, UCI_Black_Pawn_Scale)
> #define bValueN VALUE4_SCALED (265, 280, 320, 355, 300, UCI_Black_Knight_Scale)
> #define bValueBL VALUE4_SCALED (280, 295, 325, 360, 310, UCI_Black_Light_Scale)
> #define bValueBD VALUE4_SCALED (280, 295, 325, 360, 310, UCI_Black_Dark_Scale)
> #define bValueR VALUE4_SCALED (405, 450, 550, 610, 500, UCI_Black_Rook_Scale)
> #define bValueQ VALUE4_SCALED (800, 875, 1025, 1150, 950, UCI_Black_Queen_Scale)
>
641,642c651,653
< static uint64 ComputeValue (int wP, int wN, int wB, int wBL, int wBD, int wR, int wQ,
< int bP, int bN, int bB, int bB1, int bB2, int bR, int bQ)
---
> static uint64 ComputeValue
> (int wP, int wN, int wB, int wBL, int wBD, int wR, int wQ,
> int bP, int bN, int bB, int bBL, int bBD, int bR, int bQ)
647,652c658,664
< va += (wB / 2 - bB / 2) * BishopPair;
< va += (wP - bP) * ValueP;
< va += (wN - bN) * ValueN;
< va += (wB - bB) * ValueB;
< va += (wR - bR) * ValueR;
< va += (wQ - bQ) * ValueQ;
---
> va += (wB / 2) * wBishopPair - (bB / 2) * bBishopPair;
> va += wP * wValueP - bP * bValueP;
> va += wN * wValueN - bN * bValueN;
> va += wBL * wValueBL - bBL * bValueBL;
> va += wBD * wValueBD - bBD * bValueBD;
> va += wR * wValueR - bR * bValueR;
> va += wQ * wValueQ - bQ * bValueQ;
678c690
< int wQ, bQ, wR, bR, wBL, bB1, wBD, bB2, wN, bN, wP, bP, n, Value, wB, bB;
---
> int wQ, bQ, wR, bR, wBL, bBL, wBD, bBD, wN, bN, wP, bP, n, Value, wB, bB;
694c706
< bB1 = n % 2;
---
> bBL = n % 2;
696c708
< bB2 = n % 2;
---
> bBD = n % 2;
706,707c718,719
< bB = bB1 + bB2;
< va = ComputeValue (wP, wN, wB, wBL, wBD, wR, wQ, bP, bN, bB, bB1, bB2, bR, bQ);
---
> bB = bBL + bBD;
> va = ComputeValue (wP, wN, wB, wBL, wBD, wR, wQ, bP, bN, bB, bBL, bBD, bR, bQ);
740c752
< bP, bN, bB, bB1, bB2, bR, bQ);
---
> bP, bN, bB, bBL, bBD, bR, bQ);
742c754
< bP, bN, bB, bB1, bB2, bR, bQ);
---
> bP, bN, bB, bBL, bBD, bR, bQ);
748a761,762
> Value *= UCI_MATERIAL_WEIGHTING;
> Value >>= 10;
751c765
< bP, bN, bB, bB1, bB2, bR, bQ);
---
> bP, bN, bB, bBL, bBD, bR, bQ);
753c767
< bP, bN, bB, bB1, bB2, bR, bQ);
---
> bP, bN, bB, bBL, bBD, bR, bQ);
diff 999963/matval_explain.c 999958/matval_explain.c
634,640c634,648
< VALUE4 ( (w * av) / sc, (x * av) / sc, (y * av) / sc, (z * av) / sc)
< #define BishopPair VALUE4_SCALED (35, 40, 50, 55, 45, UCI_BishopPairScale)
< #define ValueP VALUE4_SCALED (80, 90, 110, 125, 100, UCI_PawnScale)
< #define ValueN VALUE4_SCALED (265, 280, 320, 355, 300, UCI_KnightScale)
< #define ValueB VALUE4_SCALED (280, 295, 325, 360, 310, UCI_BishopScale)
< #define ValueR VALUE4_SCALED (405, 450, 550, 610, 500, UCI_RookScale)
< #define ValueQ VALUE4_SCALED (800, 875, 1025, 1150, 950, UCI_QueenScale)
---
> VALUE4 ( (w * sc) / av, (x * sc) / av, (y * sc) / av, (z * sc) / av)
> #define wBishopPair VALUE4_SCALED (35, 40, 50, 55, 45, UCI_White_Bishops_Scale)
> #define wValueP VALUE4_SCALED (80, 90, 110, 125, 100, UCI_White_Pawn_Scale)
> #define wValueN VALUE4_SCALED (265, 280, 320, 355, 300, UCI_White_Knight_Scale)
> #define wValueBL VALUE4_SCALED (280, 295, 325, 360, 310, UCI_White_Light_Scale)
> #define wValueBD VALUE4_SCALED (280, 295, 325, 360, 310, UCI_White_Dark_Scale)
> #define wValueR VALUE4_SCALED (405, 450, 550, 610, 500, UCI_White_Rook_Scale)
> #define wValueQ VALUE4_SCALED (800, 875, 1025, 1150, 950, UCI_White_Queen_Scale)
> #define bBishopPair VALUE4_SCALED (35, 40, 50, 55, 45, UCI_Black_Bishops_Scale)
> #define bValueP VALUE4_SCALED (80, 90, 110, 125, 100, UCI_Black_Pawn_Scale)
> #define bValueN VALUE4_SCALED (265, 280, 320, 355, 300, UCI_Black_Knight_Scale)
> #define bValueBL VALUE4_SCALED (280, 295, 325, 360, 310, UCI_Black_Light_Scale)
> #define bValueBD VALUE4_SCALED (280, 295, 325, 360, 310, UCI_Black_Dark_Scale)
> #define bValueR VALUE4_SCALED (405, 450, 550, 610, 500, UCI_Black_Rook_Scale)
> #define bValueQ VALUE4_SCALED (800, 875, 1025, 1150, 950, UCI_Black_Queen_Scale)
651,656c659,666
< va += (wB / 2 - bB / 2) * BishopPair;
< va += (wP - bP) * ValueP;
< va += (wN - bN) * ValueN;
< va += (wB - bB) * ValueB;
< va += (wR - bR) * ValueR;
< va += (wQ - bQ) * ValueQ;
---
> va += (wB / 2) * wBishopPair - (bB / 2) * bBishopPair;
> va += wP * wValueP - bP * bValueP;
> va += wN * wValueN - bN * bValueN;
> va += wBL * wValueBL - bBL * bValueBL;
> va += wBD * wValueBD - bBD * bValueBD;
> va += wR * wValueR - bR * bValueR;
> va += wQ * wValueQ - bQ * bValueQ;
>
diff 999963/move_gen.c 999958/move_gen.c
184,185c184
< Add (LIST, FROM_LEFT (to) | to,
< CAPTURE_VALUE[EnumMyP][c]);
---
> Add (LIST, FROM_LEFT (to) | to, CAPTURE_VALUE[EnumMyP][c]);
195c194
< (0x20 << 24) + CAPTURE_VALUE[EnumMyP][c]);
---
> (0x20 << 24) + CAPTURE_VALUE[EnumMyP][c]);
273,275c272,273
< for (U =
< FORWARD_SHIFT (BitboardMyP & SECOND_SIXTH_RANKS) & empty;
< U; BitClear (sq, U))
---
> for (U = FORWARD_SHIFT (BitboardMyP & SECOND_SIXTH_RANKS) & empty; U;
> BitClear (sq, U))
385c383
< T = AttK[sq] & mask;
---
> T = AttK[sq] & mask & (~OppAttacked);
422c420
< int to, sq, requ = OppKingSq;
---
> int to, sq, opks = OppKingSq;
430c428
< PAWN = MyAttackedPawns[requ];
---
> PAWN = MyAttackedPawns[opks];
432c430
< ROOK = AttR (requ);
---
> ROOK = AttR (opks);
434c432
< BISHOP = AttB (requ);
---
> BISHOP = AttB (opks);
470c468
< MovesTo (T, EnumMyN, AttN[requ]);
---
> MovesTo (T, EnumMyN, AttN[opks]);
491c489
< int requ, king, sq, to, fr, pi;
---
> int opks, king, sq, to, fr, pi;
565c563
< requ = OppKingSq;
---
> opks = OppKingSq;
567c565
< MyAttackedPawns[requ];
---
> MyAttackedPawns[opks];
575c573
< MyAttackedPawns[requ];
---
> MyAttackedPawns[opks];
651c649
< && POSITION->sq[BACK_RIGHT (requ)] == 0)
---
> && POSITION->sq[BACK_RIGHT (opks)] == 0)
653c651
< if (POSITION->sq[BACK_RIGHT2 (requ)] == EnumMyP)
---
> if (POSITION->sq[BACK_RIGHT2 (opks)] == EnumMyP)
655,656c653,654
< fr = BACK_RIGHT2 (requ);
< to = BACK_RIGHT (requ);
---
> fr = BACK_RIGHT2 (opks);
> to = BACK_RIGHT (opks);
661,663c659,661
< if (RANK (requ) == NUMBER_RANK5
< && POSITION->sq[BACK_RIGHT2 (requ)] == 0
< && POSITION->sq[BACK_RIGHT3 (requ)] == EnumMyP)
---
> if (RANK (opks) == NUMBER_RANK5
> && POSITION->sq[BACK_RIGHT2 (opks)] == 0
> && POSITION->sq[BACK_RIGHT3 (opks)] == EnumMyP)
665,666c663,664
< to = BACK_RIGHT (requ);
< fr = BACK_RIGHT3 (requ);
---
> to = BACK_RIGHT (opks);
> fr = BACK_RIGHT3 (opks);
673c671
< && POSITION->sq[BACK_LEFT (requ)] == 0)
---
> && POSITION->sq[BACK_LEFT (opks)] == 0)
675c673
< if (POSITION->sq[BACK_LEFT2 (requ)] == EnumMyP)
---
> if (POSITION->sq[BACK_LEFT2 (opks)] == EnumMyP)
677,678c675,676
< fr = BACK_LEFT2 (requ);
< to = BACK_LEFT (requ);
---
> fr = BACK_LEFT2 (opks);
> to = BACK_LEFT (opks);
683,685c681,683
< if (RANK (requ) == NUMBER_RANK5
< && POSITION->sq[BACK_LEFT2 (requ)] == 0
< && POSITION->sq[BACK_LEFT3 (requ)] == EnumMyP)
---
> if (RANK (opks) == NUMBER_RANK5
> && POSITION->sq[BACK_LEFT2 (opks)] == 0
> && POSITION->sq[BACK_LEFT3 (opks)] == EnumMyP)
687,688c685,686
< to = BACK_LEFT (requ);
< fr = BACK_LEFT3 (requ);
---
> to = BACK_LEFT (opks);
> fr = BACK_LEFT3 (opks);
diff 999963/ok_move.c 999958/ok_move.c
14c14
< uint64 mask;
---
> uint64 toSet;
16c16
< mask = SqSet[to];
---
> toSet = SqSet[to];
37c37
< if (SqSet[to] & OppOccupied)
---
> if (toSet & OppOccupied)
43c43
< if ((SqSet[to] & POSITION->OccupiedBW) == 0)
---
> if ((toSet & POSITION->OccupiedBW) == 0)
55c55
< if (AttN[fr] & mask)
---
> if (AttN[fr] & toSet)
61c61
< if (AttB (fr) & mask)
---
> if (AttB (fr) & toSet)
84c84
< if (AttR (fr) & mask)
---
> if (AttR (fr) & toSet)
90c90
< if (AttQ (fr) & mask)
---
> if (AttQ (fr) & toSet)
96c96
< if (AttK[fr] & mask && (SqSet[to] & OppAttacked) == 0)
---
> if (AttK[fr] & toSet && (toSet & OppAttacked) == 0)
diff 999963/pawn_eval.c 999958/pawn_eval.c
14a15
> #if 1
41a43,71
> #else
> const uint8 SHELTERaa[8] = { 45, 0, 10, 30, 40, 40, 40, 40 };
> const uint8 SHELTERab[8] = { 55, 0, 15, 40, 50, 55, 55, 55 };
> const uint8 SHELTERac[8] = { 20, 0, 5, 10, 15, 15, 20, 20 };
> const uint8 STORMaa[8] = { 10, 0, 35, 15, 5, 0, 0, 0 };
> const uint8 STORMab[8] = { 15, 0, 60, 25, 10, 0, 0, 0 };
> const uint8 STORMac[8] = { 5, 0, 25, 10, 5, 0, 0, 0 };
>
> const uint8 SHELTERba[8] = { 30, 0, 5, 15, 20, 25, 25, 25 };
> const uint8 SHELTERbb[8] = { 55, 0, 15, 40, 50, 55, 55, 55 };
> const uint8 SHELTERbc[8] = { 30, 0, 10, 20, 25, 30, 30, 30 };
> const uint8 STORMba[8] = { 5, 0, 35, 15, 5, 0, 0, 0 };
> const uint8 STORMbb[8] = { 10, 0, 50, 20, 10, 0, 0, 0 };
> const uint8 STORMbc[8] = { 10, 0, 50, 20, 10, 0, 0, 0 };
>
> const uint8 SHELTERcb[8] = { 30, 0, 5, 15, 20, 25, 25, 25 };
> const uint8 SHELTERcc[8] = { 55, 0, 15, 40, 50, 55, 55, 55 };
> const uint8 SHELTERcd[8] = { 30, 0, 10, 20, 25, 30, 30, 30 };
> const uint8 STORMcb[8] = { 5, 0, 35, 15, 5, 0, 0, 0 };
> const uint8 STORMcc[8] = { 10, 0, 50, 20, 10, 0, 0, 0 };
> const uint8 STORMcd[8] = { 10, 0, 50, 20, 10, 0, 0, 0 };
>
> const uint8 SHELTERdc[8] = { 30, 0, 5, 15, 20, 25, 25, 25 };
> const uint8 SHELTERdd[8] = { 55, 0, 15, 40, 50, 55, 55, 55 };
> const uint8 SHELTERde[8] = { 30, 0, 10, 20, 25, 30, 30, 30 };
> const uint8 STORMdc[8] = { 5, 0, 35, 15, 5, 0, 0, 0 };
> const uint8 STORMdd[8] = { 10, 0, 50, 20, 10, 0, 0, 0 };
> const uint8 STORMde[8] = { 10, 0, 50, 20, 10, 0, 0, 0 };
> #endif
286,288c316
< {
< Value -= Islands;
< }
---
> Value -= Islands;
323,325c351
< {
< Value -= Hole;
< }
---
> Value -= Hole;
352,354c378
< {
< Value -= BackwardClosed;
< }
---
> Value -= BackwardClosed;
363,365c387
< {
< Value -= DoubledOpenIsolated;
< }
---
> Value -= DoubledOpenIsolated;
368,370c390
< {
< Value -= IsolatedOpen;
< }
---
> Value -= IsolatedOpen;
383,385c403
< {
< Value -= BackwardOpen;
< }
---
> Value -= BackwardOpen;
439,441c457
< {
< Value += Islands;
< }
---
> Value += Islands;
487,489c503
< {
< Value += DoubledClosedIsolated;
< }
---
> Value += DoubledClosedIsolated;
502,503c516
< if ((bBitboardP & AttPw[b - 8]) ==
< 0)
---
> if ((bBitboardP & AttPw[b - 8]) == 0)
507,509c520
< {
< Value += BackwardClosed;
< }
---
> Value += BackwardClosed;
523,525c534
< {
< Value += IsolatedOpen;
< }
---
> Value += IsolatedOpen;
538,540c547
< {
< Value += BackwardOpen;
< }
---
> Value += BackwardOpen;
579,581c586
< {
< continue;
< }
---
> continue;
604,606c609
< {
< Value += BestBlackKingDistance - BestWhiteKingDistance;
< }
---
> Value += BestBlackKingDistance - BestWhiteKingDistance;
610,612c613
< {
< Value += KingAttPawn;
< }
---
> Value += KingAttPawn;
614,616c615
< {
< Value += KingOO;
< }
---
> Value += KingOO;
618,620c617
< {
< Value += KingOOO;
< }
---
> Value += KingOOO;
623,625c620
< {
< Value -= KingAttPawn;
< }
---
> Value -= KingAttPawn;
627,629c622
< {
< Value -= KingOO;
< }
---
> Value -= KingOO;
631,633c624,635
< {
< Value -= KingOOO;
< }
---
> Value -= KingOOO;
> if (1)
> {
> int v1,v2;
> v1 = (sint16) (Value & 0xffff);
> v2 = (v1 < 0) + (sint16) ((Value >> 16) & 0xffff);
> v1 *= UCI_PAWNS_WEIGHTING;
> v1 >>= 10;
> v2 *= UCI_PAWNS_WEIGHTING;
> v2 >>= 10;
> Value = SCORE (v2, v1);
> }
diff 999963/perft.c 999958/perft.c
98c98
< printf ("%s ",Notate (LM[i].move, STRING1));
---
> printf ("%s ",Notate (LM[i].move, STRING1[POSITION->cpu]));
diff 999963/pv_node.c 999958/pv_node.c
5a6,12
> #ifdef BUILD_ZOG_MP_COMPILE
> void NEW_ZOG_NODE (typePOS*, int, int, int, type_zog_node*, uint32);
> int TRY_ZOG_NODE (typePOS*, int, int, int, type_zog_node*, uint32);
> typedef enum
> { NO_ZOG, ZOG_IS_BUSY, ZOG_MOVE_LESS, ZOG_MOVE_FORCED} zogs;
> #define MIN_ZOG_DEPTH 10
> #endif
23c30,31
< int MyPV (typePOS* POSITION, int ALPHA, int BETA, int depth, int check)
---
> int MyPV (typePOS* POSITION, int ALPHA, int BETA,
> int depth, int check, type_zog_node *parent)
32c40
< int SINGULAR;
---
> int SINGULAR, LMR, cnt, MEDIAN, MARGIN;
42a51,52
> MEDIAN = (BETA + ALPHA) / 2;
> MARGIN = (BETA - ALPHA);
57a68
> /* usa PVHash ? */
65c76,78
< trans_depth = trans->DepthLower;
---
> if (trans->flags & FLAG_MOVE_LESS)
> return (check) ? (HEIGHT (POSITION) - VALUE_MATE) : 0;
> trans_depth = trans->DepthLower; /* move_depth */
71a85,94
> trans_depth = MAX (trans->DepthLower, trans->DepthUpper);
> if (IsExact (trans) && trans_depth >= depth)
> {
> Value = HashLowerBound (trans); /* the either */
> UPDATE_AGE();
> if (!ANALYSING || !TRY_PV_IN_ANALYSIS)
> RETURN (Value);
> }
> if (trans_depth > hash_depth)
> hash_depth = trans_depth;
74d96
< trans_depth = trans->DepthLower;
75a98,100
> if (trans->flags & LOWER_FROM_PV &&
> trans_depth >= depth && Value >= BETA)
> RETURN (BETA);
79d103
< trans_depth = trans->DepthUpper;
80a105,107
> if (trans->flags & UPPER_FROM_PV &&
> trans_depth >= depth && Value <= ALPHA)
> RETURN (ALPHA);
82,89d108
< if (trans_depth > hash_depth)
< hash_depth = trans_depth;
< if (IsExact (trans) && trans_depth >= depth)
< {
< UPDATE_AGE();
< if (!ANALYSING)
< RETURN (Value);
< }
93c112,126
< if (!trans_move && depth >= 6)
---
> #ifdef BUILD_ZOG_MP_COMPILE
> if (ZOG_AKTIV && trans_move && parent && POSITION->rp == 0)
> {
> int zog = TRY_ZOG_NODE (POSITION, ALPHA, BETA, depth, parent, trans_move);
> if (zog == NO_ZOG && parent->EXPANDED && depth >= MIN_ZOG_DEPTH)
> NEW_ZOG_NODE (POSITION, ALPHA, BETA, depth, parent, trans_move);
> if (zog == ZOG_MOVE_LESS)
> {
> best_value = - VALUE_INFINITY;
> goto MOVE_LESS;
> }
> }
> #endif
>
> if (!trans_move && depth >= 6) /* bad in if POSITION demurs legaled moves */
98c131,132
< v = MyPV (POSITION, ALPHA - depth, BETA + depth, depth - 8, check);
---
> v = MyPV (POSITION, ALPHA - depth, BETA + depth,
> depth - 8, check, NULL);
104c138,139
< v = MyPV (POSITION, ALPHA - depth, BETA + depth, depth - 4, check);
---
> v = MyPV (POSITION, ALPHA - depth, BETA + depth,
> depth - 4, check, NULL);
111c146
< v = MyPV (POSITION, ALPHA - depth, BETA + depth, depth - 8, check);
---
> v = MyPV (POSITION, ALPHA - depth, BETA + depth, depth - 8, check, NULL);
117c152
< v = MyPV (POSITION, ALPHA - depth, BETA + depth, depth - 4, check);
---
> v = MyPV (POSITION, ALPHA - depth, BETA + depth, depth - 4, check, NULL);
167a203,205
> #define DEPTH_RED (MIN (12, depth / 2))
> #define VALUE_RED1 (depth / 2)
> #define VALUE_RED2 (depth)
172,186d209
< to = TO (move);
< fr = FROM (move);
< MAKE (POSITION, move);
< EVAL (move);
< if (ILLEGAL_MOVE)
< {
< UNDO (POSITION, move);
< goto SKIP;
< }
< Value = -OppPV (POSITION, -BETA, -ALPHA, depth - 10, (MOVE_IS_CHECK) != 0);
< UNDO (POSITION, move);
< CHECK_HALT ();
< #define DEPTH_RED (MIN (12, depth / 2))
< #define VALUE_RED1 (depth / 2)
< #define VALUE_RED2 (depth)
188c211
< v = MyExcludeCheck (POSITION, Value - VALUE_RED1,
---
> v = MyExcludeCheck (POSITION, ALPHA - VALUE_RED1,
191c214
< v = MyExclude (POSITION, Value - VALUE_RED1,
---
> v = MyExclude (POSITION, ALPHA - VALUE_RED1,
194c217
< if (v < Value - VALUE_RED1)
---
> if (v < ALPHA - VALUE_RED1)
198c221
< v = MyExcludeCheck (POSITION, Value - VALUE_RED2,
---
> v = MyExcludeCheck (POSITION, ALPHA - VALUE_RED2,
201c224
< v = MyExclude (POSITION, Value - VALUE_RED2,
---
> v = MyExclude (POSITION, ALPHA - VALUE_RED2,
204c227
< if (v < Value - VALUE_RED2)
---
> if (v < ALPHA - VALUE_RED2)
208d230
< SKIP:
214a237
> cnt = 0;
249a273
> cnt++;
261c285
< /* LMR ? */
---
>
270,271c294
< if (POS1->cp != 0 || move_is_check
< || (check && EARLY_GAME))
---
> if (POS1->cp != 0 || move_is_check || (check && EXTEND_IN_CHECK))
278,279c301,306
< new_depth = depth - 2 + MAX (EXTEND, SINGULAR);
<
---
> if (!EXTEND && cnt >= 3 && NextMove->phase == ORDINARY_MOVES
> && MARGIN < 100 && depth >= 10)
> LMR = BSR (1 + cnt) - 1;
> else
> LMR = 0;
> new_depth = depth - 2 + MAX (EXTEND, SINGULAR) - LMR;
297a325
> new_depth += LMR;
299c327
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check, NULL);
302c330
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check, NULL);
303a332
> cnt++;
315c344
< HashLower (POSITION->DYN->HASH, move, depth, v);
---
> HashLowerPV (POSITION->DYN->HASH, move, depth, v);
325a355
> MOVE_LESS:
328,330c358,360
< if (!check)
< RETURN (0);
< RETURN (HEIGHT (POSITION) - VALUE_MATE);
---
> best_value = (check) ? (HEIGHT (POSITION) - VALUE_MATE) : 0;
> HashExact (POSITION, MOVE_NONE, depth, best_value, FLAG_EXACT | FLAG_MOVE_LESS);
> RETURN (best_value);
340c370
< HashUpper (POSITION->DYN->HASH, depth, best_value);
---
> HashUpperPV (POSITION->DYN->HASH, depth, best_value);
diff 999963/qsearch.c 999958/qsearch.c
44a45,46
> if (trans->flags & FLAG_MOVE_LESS)
> return 0;
200a203,204
> if (trans->flags & FLAG_MOVE_LESS)
> return (HEIGHT (POSITION) - VALUE_MATE);
diff 999963/qsearch_pv.c 999958/qsearch_pv.c
49a50,51
> if (trans->flags & FLAG_MOVE_LESS)
> return 0;
294a297,298
> if (trans->flags & FLAG_MOVE_LESS)
> return (HEIGHT (POSITION) - VALUE_MATE);
diff 999963/root_analysis.c 999958/root_analysis.c
16c16
< int CNT, origALPHA, best_value, cnt, move_is_check, new_depth, v, TEMPvalu;
---
> int CNT, origALPHA, best_value, cnt, move_is_check, new_depth, v;
20,21c20,22
< int EXTEND;
< int to;
---
> int EXTEND, LMR;
> int to, value;
> uint64 NODES, NODES_STORE, nodes;
32a34,37
> #ifdef BUILD_ZOG_MP_COMPILE
> if (ZOG_AKTIV) /* && depth >= 15 */
> return zog_root_node (POSITION, ALPHA, BETA, depth);
> #endif
41a47,56
> if (TITANIC_MODE)
> {
> int cpu, rp;
> NODES = 0;
> for (cpu = 0; cpu < CPUS_SIZE; cpu++)
> for (rp = 0; rp < RP_PER_CPU ; rp++)
> NODES += ROOT_POSITION[cpu][rp].nodes;
> }
> else NODES = ROOT_POSIZIONE0->nodes;
> NODES_STORE = NODES;
48c63
< EXTEND =0;
---
> EXTEND = 0;
49a65,72
> LMR = 0;
> #if 1
> if (!EXTEND && cnt >= 3 && depth >= 10)
> LMR = 1;
> if (!EXTEND && cnt >= 6 && depth >= 10)
> LMR = 2;
> #endif
> new_depth = depth - 2 + EXTEND - LMR;
55c78
< Notate (move, STRING1), (p - ROOT_MOVE_LIST) + 1);
---
> Notate (move, STRING1[POSITION->cpu]), (p - ROOT_MOVE_LIST) + 1);
57c80
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check, NULL);
75c98,99
< v = -OppPV (POSITION, -ALPHA - 1, -ALPHA, an, move_is_check);
---
> v = -OppPV (POSITION, -ALPHA - 1, -ALPHA,
> an, move_is_check, NULL);
78a103
> {
79a105,106
> new_depth += LMR;
> }
85a113
> new_depth += LMR;
87c115,116
< v = -OppPV (POSITION, -ALPHA - 1, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -ALPHA - 1, -ALPHA,
> new_depth, move_is_check, NULL);
90c119
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check, NULL);
95a125
> cnt++;
97c127
< TEMPvalu = origALPHA;
---
> p->value = origALPHA;
99,100c129,140
< TEMPvalu = v;
< p->move |= (TEMPvalu + 0x8000) << 16;
---
> p->value = v;
> if (TITANIC_MODE)
> {
> int cpu, rp;
> NODES = 0;
> for (cpu = 0; cpu < CPUS_SIZE; cpu++)
> for (rp = 0; rp < RP_PER_CPU ; rp++)
> NODES += ROOT_POSITION[cpu][rp].nodes;
> }
> else NODES = ROOT_POSIZIONE0->nodes;
> p->nodes = NODES - NODES_STORE;
> NODES_STORE = NODES;
106c146
< HashLower (POSITION->DYN->HASH, move, depth, v);
---
> HashLowerPV (POSITION->DYN->HASH, move, depth, v);
116d155
< cnt++;
126a166,167
> value = p->value;
> nodes = p->nodes;
129,130c170,175
< if ((move & 0xffff0000) < (q->move & 0xffff0000))
< (q - 1)->move = q->move;
---
> if (value < q->value)
> {
> (q - 1)->move = q->move;
> (q - 1)->value = q->value;
> (q - 1)->nodes = q->nodes;
> }
135a181,182
> q->value = value;
> q->nodes = nodes;
136a184,205
> #if 1
> for (p = ROOT_MOVE_LIST + CNT; p > ROOT_MOVE_LIST; p--)
> {
> move = p->move;
> value = p->value;
> nodes = p->nodes;
> for (q = p + 1; q < ROOT_MOVE_LIST + CNT; q++)
> {
> if (nodes < q->nodes)
> {
> (q - 1)->move = q->move;
> (q - 1)->value = q->value;
> (q - 1)->nodes = q->nodes;
> }
> else
> break;
> }
> (q - 1)->move = move;
> (q - 1)->value = value;
> (q - 1)->nodes = nodes;
> }
> #endif
138c207
< if (!DO_SEARCH_MOVES)
---
> if (!DO_SEARCH_MOVES) /* analysis specificated */
141c210
< HashUpper (POSITION->DYN->HASH, depth, origALPHA);
---
> HashUpperPV (POSITION->DYN->HASH, depth, origALPHA);
diff 999963/root_multipv.c 999958/root_multipv.c
9c9
< void APPLY_SORT (int AGE_DEPTH_MIX, typeMPV* mpv)
---
> void APPLY_SORT (int n, typeMPV* mpv)
13c13,14
< for (s = 0; s < AGE_DEPTH_MIX && mpv[s].move; s++)
---
> uint64 y;
> for (s = 0; s < n && mpv[s].move; s++)
25a27,38
> x = p->depth;
> p->depth = (p - 1)->depth;
> (p - 1)->depth = x;
> x = p->alpha;
> p->alpha = (p - 1)->alpha;
> (p - 1)->alpha = x;
> x = p->beta;
> p->beta = (p - 1)->beta;
> (p - 1)->beta = x;
> y = p->nodes;
> p->nodes = (p - 1)->nodes;
> (p - 1)->nodes = y;
40c53
< typeRootMoveList* p;
---
> typeRootMoveList *p, *q;
43c56
< int EXTEND;
---
> int EXTEND, LMR, value;
45,47c58,59
< int i, j, x;
< int BETA = VALUE_MATE;
< int ALPHA = -VALUE_MATE;
---
> int i, j, x, moveno;
> int ALPHA = -VALUE_MATE, TARGET, DELTA, ALPHA2, LOWER;
48a61
> uint64 NODES, NODES_STORE, nodes, y;
50,51c63,65
< for (i = 0; i < 256; i++)
< MPV[i].move = MPV[i].Value = 0;
---
> if (depth < 14) /* 7 plies */
> for (i = 0; i < 0x100; i++)
> MPV[i].move = MPV[i].Value = 0;
61a76,85
> if (TITANIC_MODE)
> {
> int cpu, rp;
> NODES = 0;
> for (cpu = 0; cpu < CPUS_SIZE; cpu++)
> for (rp = 0; rp < RP_PER_CPU ; rp++)
> NODES += ROOT_POSITION[cpu][rp].nodes;
> }
> else NODES = ROOT_POSIZIONE0->nodes;
> NODES_STORE = NODES;
64a89,104
> TARGET = -VALUE_INFINITY;
> DELTA = VALUE_MATE;
> for (moveno = 0; MPV[moveno].move; moveno++)
> if (MPV[moveno].move == move)
> {
> TARGET = MPV[moveno].Value;
> break;
> }
> if (TARGET == -VALUE_INFINITY)
> TARGET = 0;
> else
> DELTA = 8;
> if (GOOD_MOVES > 0)
> ALPHA2 = MPV[0].Value - MULTI_CENTI_PAWN_PV;
> else
> ALPHA2 = -VALUE_INFINITY;
68c108
< EXTEND =0;
---
> EXTEND = 0;
73c113,118
< new_depth = depth - 2 + EXTEND;
---
> LMR = 0;
> if (!EXTEND && cnt >= 2 * GOOD_MOVES + 3 && depth >= 10)
> LMR = 1;
> if (!EXTEND && cnt >= 2 * GOOD_MOVES + 6 && depth >= 10)
> LMR = 2;
> new_depth = depth - 2 + EXTEND - LMR;
76c121
< Notate (move, STRING1), (p - ROOT_MOVE_LIST) + 1);
---
> Notate (move, STRING1[POSITION->cpu]), (p - ROOT_MOVE_LIST) + 1);
78c123,158
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> {
> while (TRUE)
> {
> LOWER = MAX (TARGET - DELTA, ALPHA2);
> v = -OppPV (POSITION, -TARGET - DELTA, -LOWER,
> new_depth, move_is_check, NULL);
> if (v < TARGET + DELTA && v > LOWER)
> break;
> if (GOOD_MOVES && v <= ALPHA2)
> break;
> new_depth += LMR;
> LMR = 0;
> /* UCI bounds */
> MPV[moveno].move = move;
> MPV[moveno].depth = depth;
> MPV[moveno].alpha = LOWER;
> MPV[moveno].beta = TARGET + DELTA;
> MPV[moveno].Value = v;
> UNDO (POSITION, move);
> Information (POSITION, GetClock () - START_CLOCK,
> MPV[moveno].alpha, MPV[moveno].Value, MPV[moveno].beta);
> MAKE (POSITION, move);
> EVAL (move);
> if (v >= TARGET + DELTA)
> TARGET = TARGET + DELTA / 2;
> else
> TARGET = TARGET - DELTA / 2;
> if (TARGET + DELTA >= 25000 || TARGET - DELTA <= -25000)
> {
> TARGET = 0;
> DELTA = VALUE_MATE;
> }
> else
> DELTA += DELTA / 2;
> }
> }
96c176,177
< v = -OppPV (POSITION, -ALPHA - 1, -ALPHA, an, move_is_check);
---
> v = -OppPV (POSITION, -ALPHA - 1, -ALPHA,
> an, move_is_check, NULL);
100c181,184
< goto DEC;
---
> {
> new_depth += LMR;
> goto EN_CIRCLE;
> }
106a191
> new_depth += LMR;
108,113c193,206
< v = -OppPV (POSITION, -ALPHA - 1, -ALPHA, new_depth, move_is_check);
< DEC:
< if (v > ALPHA)
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
< if (v <= ALPHA)
< v = ALPHA;
---
> v = -OppPV (POSITION, -ALPHA - 1, -ALPHA,
> new_depth, move_is_check, NULL);
> EN_CIRCLE:
> DELTA = 8;
> while (v > ALPHA)
> {
> v = -OppPV (POSITION, -ALPHA - DELTA, -ALPHA,
> new_depth, move_is_check, NULL);
> if (v < ALPHA + DELTA)
> break;
> DELTA += DELTA / 2;
> if (ALPHA + DELTA >= 25000)
> DELTA = VALUE_MATE - ALPHA;
> }
116a210,220
> if (TITANIC_MODE)
> {
> int cpu, rp;
> NODES = 0;
> for (cpu = 0; cpu < CPUS_SIZE; cpu++)
> for (rp = 0; rp < RP_PER_CPU ; rp++)
> NODES += ROOT_POSITION[cpu][rp].nodes;
> }
> else NODES = ROOT_POSIZIONE0->nodes;
> p->nodes = NODES - NODES_STORE;
> NODES_STORE = NODES;
118a223
> p->value = v;
120c225
< HashLower (POSITION->DYN->HASH, move, depth, v);
---
> HashLowerPV (POSITION->DYN->HASH, move, depth, v);
121a227,229
> MPV[GOOD_MOVES].depth = depth;
> MPV[GOOD_MOVES].alpha = -VALUE_MATE;
> MPV[GOOD_MOVES].beta = VALUE_MATE;
132a241,242
> else
> p->value = ALPHA;
134a245
> MPV[GOOD_MOVES].move = MOVE_NONE;
143a255,260
> x = ROOT_MOVE_LIST[i].value;
> ROOT_MOVE_LIST[i].value = ROOT_MOVE_LIST[j].value;
> ROOT_MOVE_LIST[j].value = x;
> y = ROOT_MOVE_LIST[i].nodes;
> ROOT_MOVE_LIST[i].nodes = ROOT_MOVE_LIST[j].nodes;
> ROOT_MOVE_LIST[j].nodes = y;
148,149c265,266
< ROOT_DEPTH = depth;
< if (!DO_SEARCH_MOVES)
---
> #if 1
> for (p = ROOT_MOVE_LIST + CNT; p >= ROOT_MOVE_LIST + GOOD_MOVES; p--)
151c268,284
< HashExact (POSITION, MPV[0].move, depth, MPV[0].Value, FLAG_EXACT);
---
> move = p->move;
> value = p->value;
> nodes = p->nodes;
> for (q = p + 1; q < ROOT_MOVE_LIST + CNT; q++)
> {
> if (nodes < q->nodes)
> {
> (q - 1)->move = q->move;
> (q - 1)->value = q->value;
> (q - 1)->nodes = q->nodes;
> }
> else
> break;
> }
> (q - 1)->move = move;
> (q - 1)->value = value;
> (q - 1)->nodes = nodes;
152a286,289
> #endif
> ROOT_DEPTH = depth;
> if (!DO_SEARCH_MOVES)
> HashExact (POSITION, MPV[0].move, depth, MPV[0].Value, FLAG_EXACT);
diff 999963/root_node.c 999958/root_node.c
16c16
< int CNT, origALPHA, best_value, cnt, move_is_check, new_depth, v, TEMPvalu;
---
> int CNT, origALPHA, best_value, cnt, move_is_check, new_depth, v;
20,21c20,22
< int EXTEND;
< int to;
---
> int EXTEND, LMR;
> int to, value;
> uint64 NODES, NODES_STORE, nodes;
28a30,33
> #ifdef BUILD_ZOG_MP_COMPILE
> if (ZOG_AKTIV) /* && depth >= 15 */
> return zog_root_node (POSITION, ALPHA, BETA, depth);
> #endif
38a44,54
> if (TITANIC_MODE)
> {
> int cpu, rp;
> NODES = 0;
> for (cpu = 0; cpu < CPUS_SIZE; cpu++)
> for (rp = 0; rp < RP_PER_CPU ; rp++)
> NODES += ROOT_POSITION[cpu][rp].nodes;
> }
> else NODES = ROOT_POSIZIONE0->nodes;
> NODES_STORE = NODES;
> cnt = 0;
46,47c62
< if (POS1->cp || move_is_check ||
< PassedPawnPush (to, FOURTH_RANK (to)))
---
> if (POS1->cp || move_is_check || PassedPawnPush (to, FOURTH_RANK (to)))
49c64,69
< new_depth = depth - 2 + EXTEND;
---
> LMR = 0;
> if (!EXTEND && cnt >= 3 && depth >= 10)
> LMR = 1;
> if (!EXTEND && cnt >= 6 && depth >= 10)
> LMR = 2;
> new_depth = depth - 2 + EXTEND - LMR;
52c72
< Notate (move, STRING1), (p - ROOT_MOVE_LIST) + 1);
---
> Notate (move, STRING1[POSITION->cpu]), (p - ROOT_MOVE_LIST) + 1);
54c74
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check, NULL);
75a96,97
> new_depth += LMR;
> #if 1
77c99,101
< v = -OppPV (POSITION, -ALPHA - 1, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -ALPHA - 1, -ALPHA,
> new_depth, move_is_check, NULL);
> #endif
79c103,104
< v = -OppPV (POSITION, -BETA, -ALPHA, new_depth, move_is_check);
---
> v = -OppPV (POSITION, -BETA, -ALPHA,
> new_depth, move_is_check, NULL);
83a109
> cnt++;
86c112
< TEMPvalu = origALPHA;
---
> p->value = origALPHA;
88,89c114,125
< TEMPvalu = v;
< p->move |= (TEMPvalu + 0x8000) << 16;
---
> p->value = v;
> if (TITANIC_MODE)
> {
> int cpu, rp;
> NODES = 0;
> for (cpu = 0; cpu < CPUS_SIZE; cpu++)
> for (rp = 0; rp < RP_PER_CPU ; rp++)
> NODES += ROOT_POSITION[cpu][rp].nodes;
> }
> else NODES = ROOT_POSIZIONE0->nodes;
> p->nodes = NODES - NODES_STORE;
> NODES_STORE = NODES;
95c131
< HashLower (POSITION->DYN->HASH, move, depth, v);
---
> HashLowerPV (POSITION->DYN->HASH, move, depth, v);
120d155
< cnt++;
130a166,167
> value = p->value;
> nodes = p->nodes;
133,134c170,175
< if ((move & 0xffff0000) < (q->move & 0xffff0000))
< (q - 1)->move = q->move;
---
> if (value < q->value)
> {
> (q - 1)->move = q->move;
> (q - 1)->value = q->value;
> (q - 1)->nodes = q->nodes;
> }
139a181,203
> q->value = value;
> q->nodes = nodes;
> }
> #if 1
> for (p = ROOT_MOVE_LIST + CNT; p > ROOT_MOVE_LIST; p--)
> {
> move = p->move;
> value = p->value;
> nodes = p->nodes;
> for (q = p + 1; q < ROOT_MOVE_LIST + CNT; q++)
> {
> if (nodes < q->nodes)
> {
> (q - 1)->move = q->move;
> (q - 1)->value = q->value;
> (q - 1)->nodes = q->nodes;
> }
> else
> break;
> }
> (q - 1)->move = move;
> (q - 1)->value = value;
> (q - 1)->nodes = nodes;
140a205
> #endif
143c208
< HashUpper (POSITION->DYN->HASH, depth, origALPHA);
---
> HashUpperPV (POSITION->DYN->HASH, depth, origALPHA);
diff 999963/search.c 999958/search.c
11a12
> boolean b;
42c43
< depth, POSITION->DYN->bAtt & wBitboardK) :
---
> depth, POSITION->DYN->bAtt & wBitboardK, NULL) :
44c45
< depth, POSITION->DYN->wAtt & bBitboardK);
---
> depth, POSITION->DYN->wAtt & bBitboardK, NULL);
55,57c56
< if (!POSITION->wtm ?
< (wBitboardK & POSITION->DYN->bAtt) : (bBitboardK & POSITION->DYN->wAtt))
< PONDER_MOVE = MOVE_NONE;
---
> b = (LEGAL);
58a58,59
> if (!b)
> PONDER_MOVE = MOVE_NONE;
62c63,64
< Notate (ROOT_BEST_MOVE, STRING1), Notate (PONDER_MOVE, STRING2));
---
> Notate (ROOT_BEST_MOVE, STRING1[POSITION->cpu]),
> Notate (PONDER_MOVE, STRING2[POSITION->cpu]));
76a79
> #define MAX_MATE_PLY 2048
79c82
< if (Value > VALUE_MATE - MAXIMUM_PLY)
---
> if (Value > VALUE_MATE - MAX_MATE_PLY)
81c84
< else if (Value < -VALUE_MATE + MAXIMUM_PLY)
---
> else if (Value < -VALUE_MATE + MAX_MATE_PLY)
108a112,116
> if (!TITANIC_MODE && ZOG_AKTIV)
> {
> ROOT_POSIZIONE0->nodes = ROOT_POSITION[0][0].nodes;
> ROOT_POSIZIONE0->tbhits = ROOT_POSITION[0][0].tbhits;
> }
122c130
< #if 0
---
> #if 0 /* SELdepth non funzione SMP */
124c132
< sd = p - (POSITION->DYN_ROOT + 1); /* seldepth */
---
> sd = p - (POSITION->DYN_ROOT + 1);
135,137c143,149
< MPV[0].move = ROOT_BEST_MOVE;
< if (MULTI_PV == 1)
< MPV[0].Value = Value;
---
> {
> MPV[0].move = ROOT_BEST_MOVE;
> MPV[0].Value = Value;
> MPV[0].alpha = ALPHA;
> MPV[0].beta = BETA;
> MPV[0].depth = ROOT_DEPTH;
> }
146,148c158,160
< Notate (move, STRING1);
< strcpy (q, STRING1);
< q += strlen (STRING1);
---
> Notate (move, STRING1[POSITION->cpu]);
> strcpy (q, STRING1[POSITION->cpu]);
> q += strlen (STRING1[POSITION->cpu]);
195,197c207,209
< Notate (move, STRING1);
< strcpy (q, STRING1);
< q += strlen (STRING1);
---
> Notate (move, STRING1[POSITION->cpu]);
> strcpy (q, STRING1[POSITION->cpu]);
> q += strlen (STRING1[POSITION->cpu]);
215,217c227,229
< cp_mate (MPV[mpv].Value, STRING2),
< MODIFIER (ALPHA, MPV[mpv].Value, BETA, STRING3),
< ROOT_DEPTH / 2, pv);
---
> cp_mate (MPV[mpv].Value, STRING2[POSITION->cpu]),
> MODIFIER (MPV[mpv].alpha, MPV[mpv].Value, MPV[mpv].beta, STRING3[POSITION->cpu]),
> MPV[mpv].depth / 2, pv);
226a239
> SEARCH_IS_DONE = FALSE;
227a241,244
> if (NEW_GAME)
> SINCE_NEW_GAME = 0;
> else
> SINCE_NEW_GAME++;
233,236d249
< POSITION->StackHeight = -1;
< ROOT_BEST_MOVE = ROOT_DEPTH = ROOT_SCORE = 0;
< for (p = POSITION->DYN_ROOT; p <= POSITION->DYN; p++)
< POSITION->STACK[++(POSITION->StackHeight)] = p->HASH;
238a252,258
> ROOT_BEST_MOVE = ROOT_DEPTH = ROOT_SCORE = 0;
> POSITION->StackHeight = 0;
> if (POSITION->DYN->reversible > 110)
> goto SKIP_REP_CHECK;
> POSITION->StackHeight = -1;
> for (p = POSITION->DYN - POSITION->DYN->reversible; p <= POSITION->DYN; p++)
> POSITION->STACK[++(POSITION->StackHeight)] = p->HASH;
242c262
< for (p = POSITION->DYN_ROOT; p < POSITION->DYN; p++)
---
> for (p = POSITION->DYN - POSITION->DYN->reversible; p < POSITION->DYN; p++)
252c272
< POSITION->STACK[p - POSITION->DYN_ROOT] = 0;
---
> POSITION->STACK[p - POSITION->DYN + POSITION->DYN->reversible] = 0;
255a276
> SKIP_REP_CHECK:
277c298
< ivan_init_smp ();
---
> STUB_IVAN ();
289c310
< #ifdef YUSUF_MULTICORE
---
> SUPPRESS_INPUT = TRUE;
291,292c312,316
< ivan_end_smp ();
< #endif
---
> {
> LOCK (SMP_IVAN);
> SMP_HAS_AKTIV = FALSE;
> UNLOCK (SMP_IVAN);
> }
305d328
< SUPPRESS_INPUT = TRUE;
310a334
> INFINITE_LOOP = TRUE;
316a341
> INFINITE_LOOP = TRUE;
320a346
> INFINITE_LOOP = FALSE;
323a350,354
> SEARCH_IS_DONE = TRUE;
> if (UCI_NEW_GAME)
> NewGame (POSITION, TRUE);
> while (STALL_MODE)
> NANO_SLEEP (1000000);
diff 999963/set_position.c 999958/set_position.c
329a330
> POSITION->StackHeight = 0; /* kludge */
338c339
< while (I[0] == ' ')
---
> while (I[0] == ' ' || I[0] == '\t')
348c349
< char i[1024];
---
> char i[1024], II[1024], *J;
350a352,353
> strcpy (II, I);
> J = strstr (II, "moves");
360c363
< I = ReadFEN (POSITION, I);
---
> I = ReadFEN (POSITION, I); /* conforms 50-move, ShredderGUI broken */
362c365
< if (I[0])
---
> if (I[0] == 'm')
368c371
< while (I[0] == ' ')
---
> while (I[0] == ' ' || I[0] == '\t')
371a375,385
> }
> else /* UCI mess, with ShredderGUI, noncompliant in FEN */
> {
> if (J)
> {
> SEND ("info string The GUI with you owns not strict FEN compliantcy. Demand anew!\n");
> J += strlen ("moves");
> while (J[0] == ' ')
> J++;
> ReadMoves (POSITION, J);
> }
diff 999963/top_analysis.c 999958/top_analysis.c
72c72
< MAKE (POSITION, move);
---
> Make (POSITION, move);
154a155,156
> if (IVAN_ALL_HALT)
> goto CHECK_DONE;
175a178,179
> if (IVAN_ALL_HALT)
> return;
176a181,182
> if (IVAN_ALL_HALT)
> return;
diff 999963/top_node.c 999958/top_node.c
111c111
< MAKE (POSITION, move);
---
> Make (POSITION, move);
152c152
< MAKE (POSITION, move);
---
> Make (POSITION, move);
204,206c204
< {
< ROOT_SCORE = L;
< }
---
> ROOT_SCORE = L;
208,210c206
< {
< ROOT_SCORE = 0;
< }
---
> ROOT_SCORE = 0;
229a226,227
> if (IVAN_ALL_HALT)
> goto CHECK_DONE;
251,255c249
< {
< if (!ROOT_MOVE_LIST[1].move
< || (ROOT_MOVE_LIST[0].move - ROOT_MOVE_LIST[1].move >= (200 << 16)))
< EASY_MOVE = TRUE;
< }
---
> EASY_MOVE = TRUE;
256a251,252
> if (IVAN_ALL_HALT)
> return;
257a254,255
> if (IVAN_ALL_HALT)
> return;
diff 999963/un_make_move.c 999958/un_make_move.c
61c61
< printf ("Uw %d %s\n", HEIGHT(POSITION), Notate(move, STRING1)));
---
> printf ("Uw %d %s\n", HEIGHT(POSITION), Notate(move, STRING1[POSITION->cpu])));
115c115
< printf ("Ub %d %s\n", HEIGHT(POSITION), Notate(move, STRING1)));
---
> printf ("Ub %d %s\n", HEIGHT(POSITION), Notate(move, STRING1[POSITION->cpu])));
diff 999963/utility.c 999958/utility.c
293a294
> PVHashClear ();
298a300,306
> #ifdef BUILD_ZOG_MP_COMPILE
> if (ZOG_AKTIV)
> {
> ZOG_OFF ();
> ZOG_ON ();
> }
> #endif
diff 999963/validate.c 999958/validate.c
212c212
< printf ("x: %d mossa: %s\n", x, Notate (x, STRING1));
---
> printf ("x: %d mossa: %s\n", x, Notate (x, STRING1[POSITION->cpu]));