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
12
typedef
unsigned
long
long
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
~bel_hash
();
25
26
void
delayed_ctor
();
27
28
private
:
29
hashkey_t
getRandom();
30
31
bool
m_isFullInit;
32
};
33
34
extern
hashkey_t
hashmultiplexer
[
tPiece::P_SIZE
][64];
35
36
#endif
// defined BEL_HASH_H
37
38
// eof
hashkey_t
unsigned long long hashkey_t
Definition
bel_hash.h:12
HASH_INIT
constexpr hashkey_t HASH_INIT
Definition
bel_hash.h:14
HASH_ODDMATERIAL
constexpr hashkey_t HASH_ODDMATERIAL
Definition
bel_hash.h:16
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
hashmultiplexer
hashkey_t hashmultiplexer[tPiece::P_SIZE][64]
Definition
bel_hash.cpp:10
HASH_BLACKTOMOVE
constexpr hashkey_t HASH_BLACKTOMOVE
Definition
bel_hash.h:15
bel_hash
Definition
bel_hash.h:21
bel_hash::delayed_ctor
void delayed_ctor()
Definition
bel_hash.cpp:21
bel_hash::~bel_hash
~bel_hash()
Definition
bel_hash.cpp:17
bel_hash::bel_hash
bel_hash()
Definition
bel_hash.cpp:12
P_SIZE
@ P_SIZE
Definition
piece.h:41
src
bel_hash.h
Generated on 10/10/2024 by
1.9.8