mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Perft should return an int64_t not an int
Found by Louis Zulli with his super fast hardware: 65M nodes/sec at perft ! No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
7614501362
commit
55b16593a4
3 changed files with 5 additions and 4 deletions
|
@ -364,12 +364,12 @@ void init_search() {
|
|||
/// perft() is our utility to verify move generation is bug free. All the legal
|
||||
/// moves up to given depth are generated and counted and the sum returned.
|
||||
|
||||
int perft(Position& pos, Depth depth)
|
||||
int64_t perft(Position& pos, Depth depth)
|
||||
{
|
||||
MoveStack mlist[MOVES_MAX];
|
||||
StateInfo st;
|
||||
Move m;
|
||||
int sum = 0;
|
||||
int64_t sum = 0;
|
||||
|
||||
// Generate all legal moves
|
||||
MoveStack* last = generate_moves(pos, mlist);
|
||||
|
|
|
@ -70,7 +70,7 @@ struct SearchStack {
|
|||
extern void init_search();
|
||||
extern void init_threads();
|
||||
extern void exit_threads();
|
||||
extern int perft(Position& pos, Depth depth);
|
||||
extern int64_t perft(Position& pos, Depth depth);
|
||||
extern bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[],
|
||||
int movesToGo, int maxDepth, int maxNodes, int maxTime, Move searchMoves[]);
|
||||
|
||||
|
|
|
@ -287,7 +287,8 @@ namespace {
|
|||
|
||||
void perft(Position& pos, UCIParser& up) {
|
||||
|
||||
int depth, tm, n;
|
||||
int depth, tm;
|
||||
int64_t n;
|
||||
|
||||
if (!(up >> depth))
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue