io-chess
UCI chess engine
Loading...
Searching...
No Matches
SearchHeuristics Struct Reference

Container for stateful search heuristics and move ordering tables. More...

#include <SearchHeuristics.h>

Public Attributes

std::array< std::array< Move, 2 >, SearchConstants::MAX_PLYkillers_ {}
 Killer moves for each ply (up to 2 per ply).
std::array< std::array< int, 64 >, 64 > history_ {}
 Standard history heuristic [fromSq][toSq].
std::array< std::array< Move, 64 >, 64 > countermove_ {}
 Countermove heuristic [fromSq][toSq].
std::array< std::array< std::array< std::array< int, 64 >, 16 >, 64 >, 16 > contHist_ {}
 Continuation history [prevPiece][prevToSq][piece][toSq].
std::array< std::array< int, 64 >, 16 > captureHist_ {}
 Capture history [piece][toSq].
std::array< std::array< int16_t, 16384 >, 2 > pawnCorrHist_ {}
 Pawn structure correction history [color][pawnHash].
std::array< std::array< std::array< int16_t, 16384 >, 2 >, 2 > nonPawnCorrHist_ {}
 Non-pawn correction history [color][type][nonPawnHash].
std::array< std::array< std::array< std::array< int16_t, 64 >, 16 >, 64 >, 16 > contCorrHist_ {}
 Continuation correction history.
std::array< std::array< Move, SearchConstants::MAX_PLY >, SearchConstants::MAX_PLYpvTable_ {}
 Principal Variation table.
std::array< int, SearchConstants::MAX_PLYfailHighCount_ {}
 Count of fail-highs per ply.
std::array< std::array< Move, 256 >, SearchConstants::MAX_PLYcaptures_ {}
 Buffer for generated capture moves.
std::array< std::array< int, 256 >, SearchConstants::MAX_PLYcaptureScores_ {}
 Scores corresponding to capture moves.
std::array< std::array< Move, 256 >, SearchConstants::MAX_PLYquiets_ {}
 Buffer for generated quiet moves.
std::array< std::array< int, 256 >, SearchConstants::MAX_PLYquietScores_ {}
 Scores corresponding to quiet moves.
std::array< std::array< Move, 256 >, SearchConstants::MAX_PLYbadCaptures_ {}
 Buffer for captures that fail SEE.
std::array< std::array< Move, 256 >, SearchConstants::MAX_PLYsearchedQuiets_ {}
 Buffer for tracking which quiets have been searched.

Detailed Description

Container for stateful search heuristics and move ordering tables.

These arrays are typically too large to allocate safely on the thread stack, so they are grouped here to be dynamically allocated by the search algorithm.

Member Data Documentation

◆ badCaptures_

std::array<std::array<Move, 256>, SearchConstants::MAX_PLY> SearchHeuristics::badCaptures_ {}

Buffer for captures that fail SEE.

◆ captureHist_

std::array<std::array<int, 64>, 16> SearchHeuristics::captureHist_ {}

Capture history [piece][toSq].

◆ captures_

std::array<std::array<Move, 256>, SearchConstants::MAX_PLY> SearchHeuristics::captures_ {}

Buffer for generated capture moves.

◆ captureScores_

std::array<std::array<int, 256>, SearchConstants::MAX_PLY> SearchHeuristics::captureScores_ {}

Scores corresponding to capture moves.

◆ contCorrHist_

std::array<std::array<std::array<std::array<int16_t, 64>, 16>, 64>, 16> SearchHeuristics::contCorrHist_ {}

Continuation correction history.

◆ contHist_

std::array<std::array<std::array<std::array<int, 64>, 16>, 64>, 16> SearchHeuristics::contHist_ {}

Continuation history [prevPiece][prevToSq][piece][toSq].

◆ countermove_

std::array<std::array<Move, 64>, 64> SearchHeuristics::countermove_ {}

Countermove heuristic [fromSq][toSq].

◆ failHighCount_

std::array<int, SearchConstants::MAX_PLY> SearchHeuristics::failHighCount_ {}

Count of fail-highs per ply.

◆ history_

std::array<std::array<int, 64>, 64> SearchHeuristics::history_ {}

Standard history heuristic [fromSq][toSq].

◆ killers_

std::array<std::array<Move, 2>, SearchConstants::MAX_PLY> SearchHeuristics::killers_ {}

Killer moves for each ply (up to 2 per ply).

◆ nonPawnCorrHist_

std::array<std::array<std::array<int16_t, 16384>, 2>, 2> SearchHeuristics::nonPawnCorrHist_ {}

Non-pawn correction history [color][type][nonPawnHash].

◆ pawnCorrHist_

std::array<std::array<int16_t, 16384>, 2> SearchHeuristics::pawnCorrHist_ {}

Pawn structure correction history [color][pawnHash].

◆ pvTable_

std::array<std::array<Move, SearchConstants::MAX_PLY>, SearchConstants::MAX_PLY> SearchHeuristics::pvTable_ {}

Principal Variation table.

◆ quiets_

std::array<std::array<Move, 256>, SearchConstants::MAX_PLY> SearchHeuristics::quiets_ {}

Buffer for generated quiet moves.

◆ quietScores_

std::array<std::array<int, 256>, SearchConstants::MAX_PLY> SearchHeuristics::quietScores_ {}

Scores corresponding to quiet moves.

◆ searchedQuiets_

std::array<std::array<Move, 256>, SearchConstants::MAX_PLY> SearchHeuristics::searchedQuiets_ {}

Buffer for tracking which quiets have been searched.


The documentation for this struct was generated from the following file: