/*
This file is part of ct.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with ct. If not, see .
*/
#include
#include
#include
#include
#include
#include
#include
// ===================================================================
// Variables
// ===================================================================
extern const float infty;
extern char negamax_ptn[9];
extern uint8_t negamax_search_depth;
extern void negamax_display_progress(const uint8_t cur_depth,
const uint8_t init_depth,
const uint32_t length);
// ===================================================================
// Methods
// ===================================================================
void negamax_init(const uint8_t new_board_size);
void negamax_free(void);
/*
* Do α-β negamax with transposition tables and naïve move ordering to
* depth `negamax_search_depth' and store the PTN of best move in
* `negamax_ptn', and return its value. The `negamax_display_progress'
* function is called on every new square at the top level.
*/
float negamax_generate(tak_state_p state);