Example #1
0
 public static void AssignQuietValues(BoardState board, Span <Move> moves, Span <short> moveValues, int startIndex, int movesCount, int depth)
 {
     for (var moveIndex = startIndex; moveIndex < movesCount; moveIndex++)
     {
         if (KillerHeuristic.KillerMoveExists(moves[moveIndex], board.ColorToMove, depth))
         {
             moveValues[moveIndex] = MoveOrderingConstants.KillerMove;
         }
         else
         {
             moveValues[moveIndex] = HistoryHeuristic.GetHistoryMoveValue(board.ColorToMove, moves[moveIndex].From, moves[moveIndex].To);
         }
     }
 }
Example #2
0
 public static void AssignQuietValues(BoardState board, Span <Move> moves, Span <short> moveValues, int startIndex, int movesCount, int ply)
 {
     for (var moveIndex = startIndex; moveIndex < movesCount; moveIndex++)
     {
         if (KillerHeuristic.KillerMoveExists(moves[moveIndex], board.ColorToMove, ply))
         {
             moveValues[moveIndex] = MoveOrderingConstants.KillerMove;
         }
         else
         {
             moveValues[moveIndex] = HistoryHeuristic.GetMoveValue(board.ColorToMove, board.PieceTable[moves[moveIndex].From], moves[moveIndex].To, MoveOrderingConstants.HistoryHeuristicMaxScore);
         }
     }
 }