Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
bel_hash.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------+
2 * File: bel_hash.h
3 * Project: part of belofte - A Promising Chess Program
4 * Author: yves
5 * SPDX-License-Identifier: GPL-2.0-only
6+----------------------------------------------------------------------*/
7
8#if !defined(BEL_HASH_H)
9#define BEL_HASH_H
10
11// hash values, storage key type and size
12typedef uint64_t hashkey_t;
13
14constexpr hashkey_t HASH_INIT = 0x0BE10F1E0C4E5502ULL; // BELOFTE CHESS 2
15constexpr hashkey_t HASH_BLACKTOMOVE = 0x8000000000000000ULL;
16constexpr hashkey_t HASH_ODDMATERIAL = 0x4000000000000000ULL;
17
18// 0 index is EP field, 0-63 are possible ep fields, 2-10 are castle flags
19enum tHSpecial { HP_NOEP = 0, HP_CASTLE_FL = 0x01 };
20
21class bel_hash {
22public:
24 : m_isFullInit{false}
25 {}
27 {}
28
29 void delayed_ctor();
30
31private:
32 hashkey_t getRandom();
33
34 bool m_isFullInit;
35};
36
38
39#endif // defined BEL_HASH_H
40
41// eof
hashkey_t hashmultiplexer[tPiece::P_SIZE][64]
Definition bel_hash.cpp:10
constexpr hashkey_t HASH_INIT
Definition bel_hash.h:14
constexpr hashkey_t HASH_ODDMATERIAL
Definition bel_hash.h:16
uint64_t hashkey_t
Definition bel_hash.h:12
tHSpecial
Definition bel_hash.h:19
@ HP_NOEP
Definition bel_hash.h:19
@ HP_CASTLE_FL
Definition bel_hash.h:19
constexpr hashkey_t HASH_BLACKTOMOVE
Definition bel_hash.h:15
void delayed_ctor()
Definition bel_hash.cpp:12
~bel_hash()
Definition bel_hash.h:26
bel_hash()
Definition bel_hash.h:23
@ P_SIZE
Definition piece.h:41