Belofte version 2.1.8
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 unsigned long long 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:
23 bel_hash();
24 ~bel_hash();
25
26 void delayed_ctor();
27
28private:
29 hashkey_t getRandom();
30
31 bool m_isFullInit;
32};
33
35
36#endif // defined BEL_HASH_H
37
38// eof
unsigned long long hashkey_t
Definition bel_hash.h:12
constexpr hashkey_t HASH_INIT
Definition bel_hash.h:14
constexpr hashkey_t HASH_ODDMATERIAL
Definition bel_hash.h:16
tHSpecial
Definition bel_hash.h:19
@ HP_NOEP
Definition bel_hash.h:19
@ HP_CASTLE_FL
Definition bel_hash.h:19
hashkey_t hashmultiplexer[tPiece::P_SIZE][64]
Definition bel_hash.cpp:10
constexpr hashkey_t HASH_BLACKTOMOVE
Definition bel_hash.h:15
void delayed_ctor()
Definition bel_hash.cpp:21
@ P_SIZE
Definition piece.h:41