-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashtable.h
More file actions
29 lines (21 loc) · 720 Bytes
/
hashtable.h
File metadata and controls
29 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef HASHTABLE_H
#define HASHTABLE_H
// define constants for hash func
#define hash_flag_exact 0
#define hash_flag_alpha 1
#define hash_flag_beta 2
#define no_hash_entry 1000000 // outside alpha beta limits
// random piece keys [piece][square]
extern uint64_t piece_keys[13][64];
// random enpassant keys [square]
extern uint64_t enpassant_keys[64];
// random castling keys
extern uint64_t castle_keys[16];
// random side key
extern uint64_t side_key;
int read_hash_entry(uint64_t hash_key, int alpha, int beta, int depth);
void write_hash_entry(uint64_t hash_key, int score, int depth, int hash_flag);
void init_random_keys();
void clear_hash_table();
uint64_t generate_hash_key(Position &pos);
#endif