feat: minimal MCTS engine with UCI
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>
This commit is contained in:
commit
d3044c0b88
19 files changed
+1997
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user