1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
--- gnushogi/genmove.c.old 2006-01-29 11:45:31.000000000 -0700
+++ gnushogi/genmove.c 2006-01-29 11:46:22.000000000 -0700
@@ -40,7 +40,7 @@
static short InCheck = false, GenerateAllMoves = false;
static short check_determined = false;
-static short INCscore = 0;
+static short INCscore_local = 0;
short deepsearchcut = true;
short tas = false, taxs = false, ssa = false;
@@ -261,7 +261,7 @@
node->reply = 0;
node->flags = local_flag;
node->score = s;
- node->INCscore = INCscore;
+ node->INCscore = INCscore_local;
if (GenerateAllMoves)
{
@@ -504,7 +504,7 @@
if ((boardu = board[u]) == king)
{
- s += 20; INCscore -= 18;
+ s += 20; INCscore_local -= 18;
*local_flag |= check; /* move threatens
* opponents king */
}
@@ -555,7 +555,7 @@
}
while (u != t);
- INCscore += s;
+ INCscore_local += s;
return s;
}
@@ -620,7 +620,7 @@
return;
}
- INCscore = 0;
+ INCscore_local = 0;
#ifdef HISTORY
s += history[hindex(side, mv)];
@@ -645,14 +645,14 @@
{
/* bonus for square near enemy king */
s += 15;
- INCscore += 2;
+ INCscore_local += 2;
local_flag |= kingattack;
}
else if (distance(t, OwnKing) <= 1)
{
/* bonus for square near own king */
s += 10;
- INCscore++;
+ INCscore_local++;
local_flag |= kingattack;
}
}
@@ -765,7 +765,7 @@
{
/* bonus for promotions */
s++;
- INCscore += value[stage][promoted[piece]] - value[stage][piece];
+ INCscore_local += value[stage][promoted[piece]] - value[stage][piece];
}
else
{
@@ -787,12 +787,12 @@
if (piece == pawn || piece == bishop || piece == rook)
{
local_flag |= stupid;
- INCscore -= 20;
+ INCscore_local -= 20;
}
else
{
local_flag |= questionable;
- INCscore -= 10;
+ INCscore_local -= 10;
}
}
}
|