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