Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp > Class Template Reference

Sparse history heuristic table over Aleph hash maps. More...

#include <search_move_ordering.H>

Collaboration diagram for Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >:
[legend]

Public Types

using Key_Type = Key
 Type of move keys.
 
using Map_Type = DynHashMap< Key, size_t, HashMapTable, Cmp >
 Internal map type.
 

Public Member Functions

void clear () noexcept
 Reset all history scores to zero.
 
size_t score (const Key &key) const noexcept
 Read the current score for a move key.
 
void record (const Key &key, const size_t bonus=1)
 Increment the history score for a move key.
 

Static Public Attributes

static constexpr bool supported = true
 Marker indicating that this table tracks history.
 

Private Attributes

Map_Type table_
 

Detailed Description

template<typename Key, template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
class Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >

Sparse history heuristic table over Aleph hash maps.

Template Parameters
KeyKey type used to identify moves globally.
HashMapTableAleph hash-table implementation.
CmpKey equality comparator.

Definition at line 230 of file search_move_ordering.H.

Member Typedef Documentation

◆ Key_Type

template<typename Key , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
using Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::Key_Type = Key

Type of move keys.

Definition at line 236 of file search_move_ordering.H.

◆ Map_Type

template<typename Key , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
using Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::Map_Type = DynHashMap<Key, size_t, HashMapTable, Cmp>

Internal map type.

Definition at line 238 of file search_move_ordering.H.

Member Function Documentation

◆ clear()

template<typename Key , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
void Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::clear ( )
inlinenoexcept

Reset all history scores to zero.

Definition at line 241 of file search_move_ordering.H.

References Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::table_.

Referenced by TEST(), and TEST().

◆ record()

template<typename Key , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
void Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::record ( const Key &  key,
const size_t  bonus = 1 
)
inline

Increment the history score for a move key.

Parameters
keyMove key.
bonusAmount to add to the score.

Definition at line 262 of file search_move_ordering.H.

References Aleph::divide_and_conquer_partition_dp(), and Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::table_.

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ score()

template<typename Key , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
size_t Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::score ( const Key &  key) const
inlinenoexcept

Read the current score for a move key.

Parameters
keyMove key.
Returns
Cumulative history score.

Definition at line 250 of file search_move_ordering.H.

References Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::table_.

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

Member Data Documentation

◆ supported

template<typename Key , template< typename, typename, class > class HashMapTable = MapOLhash, class Cmp = Aleph::equal_to<Key>>
constexpr bool Aleph::History_Heuristic_Table< Key, HashMapTable, Cmp >::supported = true
staticconstexpr

Marker indicating that this table tracks history.

Definition at line 234 of file search_move_ordering.H.

◆ table_


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