Bitboard board with fancy magics and fully legal move generation, checked by a perft suite. PUCT search over a node arena with FPU reduction and in-tree draw detection. Hand-written value (eval + quiescence) and heuristic policy stand in until the network is trained. UCI loop with a search thread, OpenBench-compatible bench and Makefile. Bench: 546127 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
618 B
C++
29 lines
618 B
C++
#include <cstdlib>
|
|
#include <string>
|
|
|
|
#include "bitboard.h"
|
|
#include "eval.h"
|
|
#include "perft.h"
|
|
#include "position.h"
|
|
#include "uci.h"
|
|
|
|
int main(int argc, char* argv[]) {
|
|
rigby::attacks::init();
|
|
rigby::zobrist::init();
|
|
rigby::eval::init();
|
|
|
|
if (argc > 1) {
|
|
const std::string cmd = argv[1];
|
|
if (cmd == "bench") {
|
|
rigby::run_bench(argc > 2 ? std::atoi(argv[2]) : 5000);
|
|
return 0;
|
|
}
|
|
if (cmd == "perftsuite") {
|
|
return rigby::perft_suite(argc > 2 ? std::atoi(argv[2]) : 6) ? 0 : 1;
|
|
}
|
|
}
|
|
|
|
rigby::uci_loop();
|
|
return 0;
|
|
}
|