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
12
typedef
uint64_t
hashkey_t
;
13
14
constexpr
hashkey_t
HASH_INIT
= 0x0BE10F1E0C4E5502ULL;
// BELOFTE CHESS 2
15
constexpr
hashkey_t
HASH_BLACKTOMOVE
= 0x8000000000000000ULL;
16
constexpr
hashkey_t
HASH_ODDMATERIAL
= 0x4000000000000000ULL;
17
18
// 0 index is EP field, 0-63 are possible ep fields, 2-10 are castle flags
19
enum
tHSpecial
{
HP_NOEP
= 0,
HP_CASTLE_FL
= 0x01 };
20
21
class
bel_hash
{
22
public
:
23
bel_hash
()
24
: m_isFullInit{false}
25
{}
26
~bel_hash
()
27
{}
28
29
void
delayed_ctor
();
30
31
private
:
32
hashkey_t
getRandom();
33
34
bool
m_isFullInit;
35
};
36
37
extern
hashkey_t
hashmultiplexer
[
tPiece::P_SIZE
][64];
38
39
#endif
// defined BEL_HASH_H
40
41
// eof
hashmultiplexer
hashkey_t hashmultiplexer[tPiece::P_SIZE][64]
Definition
bel_hash.cpp:10
HASH_INIT
constexpr hashkey_t HASH_INIT
Definition
bel_hash.h:14
HASH_ODDMATERIAL
constexpr hashkey_t HASH_ODDMATERIAL
Definition
bel_hash.h:16
hashkey_t
uint64_t hashkey_t
Definition
bel_hash.h:12
tHSpecial
tHSpecial
Definition
bel_hash.h:19
HP_NOEP
@ HP_NOEP
Definition
bel_hash.h:19
HP_CASTLE_FL
@ HP_CASTLE_FL
Definition
bel_hash.h:19
HASH_BLACKTOMOVE
constexpr hashkey_t HASH_BLACKTOMOVE
Definition
bel_hash.h:15
bel_hash::delayed_ctor
void delayed_ctor()
Definition
bel_hash.cpp:12
bel_hash::~bel_hash
~bel_hash()
Definition
bel_hash.h:26
bel_hash::bel_hash
bel_hash()
Definition
bel_hash.h:23
P_SIZE
@ P_SIZE
Definition
piece.h:41
src
bel_hash.h
Generated on 10/10/2024 by
1.13.2