-
Notifications
You must be signed in to change notification settings - Fork 10
/
protos.h
172 lines (134 loc) · 5.01 KB
/
protos.h
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*
Sjeng - a chess variants playing program
Copyright (C) 2000 Gian-Carlo Pascutto
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
File: protos.h
Purpose: function prototypes
*/
#ifndef PROTOS_H
#define PROTOS_H
long int allocate_time (void);
bool check_legal (move_s moves[], int m, int incheck);
void comp_to_coord (move_s move, char str[]);
void display_board (FILE *stream, int color);
long int end_eval (void);
long int seval(void);
long int std_eval (void);
long int suicide_eval (void);
long int losers_eval (void);
long int eval (void);
void gen (move_s moves[]);
void ics_game_end (void);
bool in_check (void);
bool f_in_check (move_s moves[], int m);
int extended_in_check (void);
void init_game (void);
bool is_attacked (int square, int color);
bool nk_attacked (int square, int color);
bool is_move (char str[]);
void make (move_s moves[], int i);
void order_moves (move_s moves[], long int move_ordering[], long int see_values[], int num_moves, int best);
long int mid_eval (void);
long int opn_eval (void);
long int suicide_mid_eval(void);
void check_phase(void);
void perft (int depth);
void speed_test(void);
void perft_debug (void);
void post_thinking (long int score);
void post_fl_thinking (long int score, move_s *failmove);
void post_fh_thinking (long int score, move_s *failmove);
void post_fail_thinking(long int score, move_s *failmove);
void print_move (move_s moves[], int m, FILE *stream);
void push_pawn (int target, bool is_ep);
void push_king_castle (int target, int castle_type);
void push_pawn_simple (int target);
void push_king (int target);
void push_knighT (int target);
void try_drop (int ptype);
void push_slidE (int target);
long int qsearch (int alpha, int beta, int depth);
void rdelay (int time_in_s);
long int rdifftime (rtime_t end, rtime_t start);
bool remove_one (int *marker, long int move_ordering[], int num_moves);
void reset_piece_square (void);
void check_piece_square (void);
void rinput (char str[], int n, FILE *stream);
rtime_t rtime (void);
long int search (int alpha, int beta, int depth, int is_null);
move_s search_root (int alpha, int beta, int depth);
void start_up (void);
move_s think (void);
void toggle_bool (bool *var);
void tree (int depth, int indent, FILE *output, char *disp_b);
void tree_debug (void);
void unmake (move_s moves[], int i);
bool verify_coord (char input[], move_s *move);
bool is_draw(void);
void ProcessHoldings(char line[]);
void addHolding(int what, int who);
void removeHolding(int what, int who);
void DropaddHolding(int what, int who);
void DropremoveHolding(int what, int who);
void printHolding(void);
int SwitchColor(int piece);
int SwitchPromoted(int piece);
int evalHolding(void);
void initialize_zobrist(void);
void initialize_hash(void);
void initialize_eval(void);
void checkECache(long int *score, int *in_cache);
void storeECache(long int score);
int init_book(void);
move_s choose_book_move(void);
move_s choose_binary_book_move(void);
void StoreTT(int score, int alpha, int beta, int best , int threat, int depth);
void QStoreTT(int score, int alpha, int beta, int best);
int ProbeTT(int *score, int alpha, int beta, int *best, int *threat, int *donull, int depth);
int QProbeTT(int *score, int alpha, int beta, int *best);
void LearnStoreTT(int score, unsigned nhash, unsigned hhash, int tomove, int best, int depth);
void LoadLearn(void);
void Learn(int score, int best, int depth);
void pinput (int n, FILE *stream);
int calc_attackers(int square, int color);
int interrupt(void);
void PutPiece(int color, char piece, char file, int rank);
void reset_board(void);
void reset_ecache(void);
void HandlePartner(char *input);
void HandlePtell(char *input);
void BegForPartner(void);
void CheckBadFlow(bool reset);
void run_epd_testsuite(void);
void ResetHandValue(void);
void build_book(void);
void comp_to_san (move_s move, char str[]);
void stringize_pv (char str[]);
void clear_tt(void);
void clear_dp_tt(void);
move_s proofnumbercheck(move_s compmove);
void proofnumbersearch(void);
void proofnumberscan(void);
void alloc_hash(void);
void alloc_ecache(void);
void free_hash(void);
void free_ecache(void);
void read_rcfile(void);
void book_learning(int result);
void seedMT(unsigned long seed);
unsigned long randomMT(void);
void setup_epd_line(char* inbuff);
int see(int color, int square, int from);
void gen_all_tables(void);
int egtb(int s);
#endif