Initial commit based on GNU Shogi 1.2 patchlevel 3.
[gnushogi.git] / src / eval.h
1 /*
2  * eval.h - C source for GNU SHOGI
3  *
4  * Copyright (c) 1993, 1994, 1995 Matthias Mutz
5  *
6  * GNU SHOGI is based on GNU CHESS
7  *
8  * Copyright (c) 1988,1989,1990 John Stanback
9  * Copyright (c) 1992 Free Software Foundation
10  *
11  * This file is part of GNU SHOGI.
12  *
13  * GNU Shogi is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 1, or (at your option)
16  * any later version.
17  *
18  * GNU Shogi is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with GNU Shogi; see the file COPYING.  If not, write to
25  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27  
28 #define NO_STAGES 100
29 #define NO_FEATURES 31
30
31
32      struct signature
33      {
34        unsigned long hashbd;
35        unsigned long hashkey;
36      } ; 
37
38 #define MatchSignature(s) (s.hashbd == hashbd && s.hashkey == hashkey)
39 #define CopySignature(s) {s.hashbd = hashbd; s.hashkey = hashkey;}      
40
41 typedef short value_array[NO_STAGES][NO_PIECES];
42 typedef small_short fscore_array[NO_STAGES][NO_FEATURES][2];
43
44      extern value_array far *value;
45      extern fscore_array far *fscore;
46
47      extern void threats (short int side); 
48
49      extern long int atak[2][NO_SQUARES];
50      extern small_short sseed[NO_SQUARES];
51  
52      extern struct signature threats_signature[2];
53
54      extern small_short starget[2][NO_SQUARES];
55      extern small_short sloose[NO_SQUARES];
56      extern small_short shole[NO_SQUARES];
57      extern small_short shung[NO_SQUARES];
58
59      extern struct signature squares_signature;