1
/* GNU Chess 5.0 - solve.c - position solving code
2
Copyright (c) 1999-2002 Free Software Foundation, Inc.
4
GNU Chess is based on the two research programs
5
Cobalt by Chua Kong-Sian and Gazebo by Stuart Cracraft.
7
GNU Chess is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2, or (at your option)
12
GNU Chess is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with GNU Chess; see the file COPYING. If not, write to
19
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
Boston, MA 02111-1307, USA.
24
cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net
36
void Solve (char *file)
37
/*****************************************************************************
41
*****************************************************************************/
43
int total, correct, found;
50
while (ReadEPDFile (file, 0))
56
TotalNodes += NodeCnt + QuiesCnt;
61
if (!strncmp (p, SANmv, strlen(SANmv)))
67
while (*p != ' ' && *p != '\0') p++;
68
while (*p == ' ' && *p != '\0') p++;
71
printf (found ? "Correct: " : "Incorrect: ");
72
printf ("%s %s\n", SANmv, solution);
73
printf ("Correct=%d Total=%d\n", correct, total);
75
printf ("\nTotal nodes = %ld\n", TotalNodes);