5 This file is part of Arrocco, which is Copyright 2007 Thomas Plick
6 (tomplick 'at' gmail.com).
8 Arrocco is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 Arrocco is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 static Position
* pos
;
25 static Position children
[20 * 512];
27 int main(int argc
, char *argv
[])
29 int offswitch
, d
, c
, n
, i
;
32 pos
= malloc(sizeof(Position
));
35 int pieceArrangement
[8] = {ROOK
, KNIGHT
, BISHOP
, QUEEN
,
36 KING
, BISHOP
, KNIGHT
, ROOK
};
37 for (c
= 0; c
< 8; c
++){
38 setPieceAt(pos
, 1 * 8 + c
, WHITE(PAWN
));
39 setPieceAt(pos
, 6 * 8 + c
, BLACK(PAWN
));
40 setPieceAt(pos
, c
, WHITE(pieceArrangement
[c
]));
41 setPieceAt(pos
, 7 * 8 + c
, BLACK(pieceArrangement
[c
]));
44 for (d
= 0; d
<= 9; d
++){
47 int value
= alphaBeta(pos
, children
, d
, -7777777, 7777777,
48 &nodeCount
, &offswitch
);
49 printf("%2d %4d %llu\n", d
, value
, nodeCount
);