Updating to version 1.3, release made by Mike Vanier (mvanier@bbb.caltech.edu).
[gnushogi.git] / gnushogi / eval.h
blob06609fd1bdc55e3bccea63376b362fd0758dc45a
1 /*
2 * FILE: eval.h
4 * Interface to the board evaluator.
6 * ----------------------------------------------------------------------
7 * Copyright (c) 1993, 1994, 1995 Matthias Mutz
8 * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
10 * GNU SHOGI is based on GNU CHESS
12 * Copyright (c) 1988, 1989, 1990 John Stanback
13 * Copyright (c) 1992 Free Software Foundation
15 * This file is part of GNU SHOGI.
17 * GNU Shogi is free software; you can redistribute it and/or modify it
18 * under the terms of the GNU General Public License as published by the
19 * Free Software Foundation; either version 1, or (at your option) any
20 * later version.
22 * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT
23 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
24 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
25 * for more details.
27 * You should have received a copy of the GNU General Public License along
28 * with GNU Shogi; see the file COPYING. If not, write to the Free
29 * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
30 * ----------------------------------------------------------------------
35 #ifndef _EVAL_H_
36 #define _EVAL_H_
38 #define NO_STAGES 100
39 #define NO_FEATURES 31
42 struct signature
44 unsigned long hashbd;
45 unsigned long hashkey;
48 #define MatchSignature(s) ((s.hashbd == hashbd) && (s.hashkey == hashkey))
49 #define CopySignature(s) { s.hashbd = hashbd; s.hashkey = hashkey; }
51 typedef short value_array[NO_STAGES][NO_PIECES];
52 typedef small_short fscore_array[NO_STAGES][NO_FEATURES][2];
54 extern value_array *value;
55 extern fscore_array *fscore;
57 extern void threats (short side);
59 extern long attack[2][NO_SQUARES];
60 extern small_short sseed[NO_SQUARES];
62 extern struct signature threats_signature[2];
64 extern small_short starget[2][NO_SQUARES];
65 extern small_short sloose[NO_SQUARES];
66 extern small_short shole[NO_SQUARES];
67 extern small_short shung[NO_SQUARES];
69 extern struct signature squares_signature;
71 #endif /* _EVAL_H_ */