BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
ben_bot::KillerMoves Struct Referencefinal

#include <libbenbot/data-structures/KillerMoves.hpp>

Public Member Functions

void clear ()
auto get (const size_t plyFromRoot) const noexcept -> std::span< const Move >
void store (const size_t plyFromRoot, const Move move)

Static Public Attributes

static constexpr auto MAX_KILLERS { 2uz }

Detailed Description

This structure stores killer moves collected during the search. This is essentially a set of lists of moves, indexed by ply from the root of the search. Each list holds at most MAX_KILLERS moves, with the most recently stored move first.

Definition at line 44 of file KillerMoves.hpp.

Member Function Documentation

◆ clear()

void ben_bot::KillerMoves::clear ( )
inline

Clears all the stored moves.

Definition at line 49 of file KillerMoves.hpp.

◆ get()

auto ben_bot::KillerMoves::get ( const size_t plyFromRoot) const -> std::span< const Move >
inlinenodiscardnoexcept

Returns the killer moves for the given ply.

Definition at line 74 of file KillerMoves.hpp.

◆ store()

void ben_bot::KillerMoves::store ( const size_t plyFromRoot,
const Move move )
inline

Stores a killer move. If the list for this ply is full, the oldest move is removed.

Definition at line 58 of file KillerMoves.hpp.

Member Data Documentation

◆ MAX_KILLERS

auto ben_bot::KillerMoves::MAX_KILLERS { 2uz }
staticconstexpr

The maximum number of killer moves stored for each ply.

Definition at line 46 of file KillerMoves.hpp.


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