Chess Engine
C++ chess engine with movegen, bitboards, and Arduino-friendly docs
|
#include <cstdio>
#include "../defs.h"
#include "../board/board.h"
#include "../move/move_generator.h"
#include "../move/make_move.h"
#include "../util/notation.h"
#include "../util/misc.h"
Go to the source code of this file.
Functions | |
void | Perft (int depth, S_BOARD *pos) |
Runs a perft search from a given board state. | |
void | PerftTest (int depth, S_BOARD *pos) |
Executes a perft test and prints move breakdown and timing. |
Variables | |
long | leafNodes = 0 |
Global counter for leaf nodes visited during perft. |
void Perft | ( | int | depth, |
S_BOARD * | pos ) |
Runs a perft search from a given board state.
depth | The depth to search. |
pos | Pointer to the board state. |
Definition at line 11 of file perft.cpp.
References ASSERT, S_MOVELIST::count, generateAllMoves(), isBoardStateValid(), leafNodes, makeMove(), S_MOVE::move, S_MOVELIST::moves, Perft(), and takeMove().
Referenced by Perft(), and PerftTest().
void PerftTest | ( | int | depth, |
S_BOARD * | pos ) |
Executes a perft test and prints move breakdown and timing.
depth | The depth to search. |
pos | Pointer to the board state. |
Definition at line 32 of file perft.cpp.
References ASSERT, S_MOVELIST::count, generateAllMoves(), GetTimeMs(), isBoardStateValid(), leafNodes, makeMove(), S_MOVE::move, S_MOVELIST::moves, moveToString(), Perft(), printBoardState(), and takeMove().
Referenced by main().
long leafNodes = 0 |
Global counter for leaf nodes visited during perft.
Definition at line 9 of file perft.cpp.
Referenced by Perft(), and PerftTest().