aboutsummaryrefslogtreecommitdiff
path: root/include/negamax.h
blob: 1cfebddc8333edc26c88db05ed373d8ccb347ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdint.h>
#include <math.h>

#include <tak.h>
#include <xorshift64.h>
#include <cnn1986.h>
#include <tt_treap.h>

extern const float infty;
extern char negamax_ptn[9];
extern uint8_t negamax_search_depth;
extern inline void negamax_display_progress(const uint8_t);

void negamax_init(const uint8_t new_board_size);
uint64_t negamax_compute_zobrist(void);

// Do negamax to depth negamax_search_depth and return PTN of best move
// in negamax_ptn, along with its value as the return. The
// negamax_display_progress function is called on every new square at
// the top level.
float negamax_generate(void);