Enable Knight PST in Crazyhouse
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 15 May 2017 12:25:44 +0000 (14:25 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 15 May 2017 12:25:44 +0000 (14:25 +0200)
PST to encourage using Knights in attacks are enabled after move 10.
Enabling it earlier would make the engine move only Knights in the opening.

dropper.c

index f8c0a96..b21690d 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1645,6 +1645,7 @@ RootMakeMove(int move)
   MakeMove(&undoInfo, move);
   checkHist[moveNr+1] = checker;
   undoInfo.tpGain = e + undoInfo.newEval;
+  if(moveNr >= 19 && !perpLoses) PST[WHITE+1] = knightPST, PST[BLACK+1] = knightPST + 11;
   // store in game history hash table
   index = (unsigned int)undoInfo.newKey >> 24 ^ stm << 2; // uses high byte of low (= hands-free) key
   while(repKey[index] && (repKey[index] ^ (int)undoInfo.newKey) & 0x1FFFFF) index += 2; // find empty slot