Compare commits
3 Commits
2069d6073d
...
239498bc2a
Author | SHA1 | Date | |
---|---|---|---|
239498bc2a | |||
a012af30fc | |||
d1cb1f3c2c |
@@ -105,7 +105,7 @@ u64 perft_test(pos_t *pos, int depth, int ply, bool output)
|
||||
nodes++;
|
||||
} else {
|
||||
move_do2(pos, *move, &state);
|
||||
subnodes = perft(pos, depth - 1, ply + 1, output);
|
||||
subnodes = perft_test(pos, depth - 1, ply + 1, output);
|
||||
if (output && ply == 1) {
|
||||
char movestr[8];
|
||||
printf("%s: %d\n", move_str(movestr, *move, 0), subnodes);
|
||||
|
@@ -235,7 +235,7 @@ int main(int __unused ac, __unused char**av)
|
||||
int i = 0, test_line;
|
||||
u64 sf_count = 0, my_count;
|
||||
char *fen;
|
||||
pos_t *pos;
|
||||
pos_t *pos = NULL, *fenpos;
|
||||
pos_t *fishpos = pos_new();
|
||||
movelist_t fishmoves;
|
||||
//move_t move;
|
||||
@@ -288,10 +288,11 @@ int main(int __unused ac, __unused char**av)
|
||||
CLOCK_DEFINE(clock, CLOCK_PROCESS);
|
||||
while ((fen = next_fen(PERFT | MOVEDO))) {
|
||||
test_line = cur_line();
|
||||
if (!(pos = fen2pos(NULL, fen))) {
|
||||
if (!(fenpos = fen2pos(pos, fen))) {
|
||||
printf("wrong fen %d: [%s]\n", i, fen);
|
||||
continue;
|
||||
}
|
||||
pos = fenpos;
|
||||
if (sf_run)
|
||||
sf_count = send_stockfish_fen(outfd, fishpos, &fishmoves, fen, depth);
|
||||
|
||||
@@ -354,11 +355,11 @@ int main(int __unused ac, __unused char**av)
|
||||
}
|
||||
printf("\n");
|
||||
// pos_del(savepos);
|
||||
pos_del(pos);
|
||||
i++;
|
||||
/* to run first test only */
|
||||
// exit(0);
|
||||
}
|
||||
pos_del(pos);
|
||||
if (run & 1) {
|
||||
if (!res[0].ms)
|
||||
res[0].ms = 1;
|
||||
|
Reference in New Issue
Block a user