Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / engine / globals.c
CommitLineData
7eeb782e
AT
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
2 * This is GNU Go, a Go program. Contact gnugo@gnu.org, or see *
3 * http://www.gnu.org/software/gnugo/ for more information. *
4 * *
5 * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
6 * 2008 and 2009 by the Free Software Foundation. *
7 * *
8 * This program is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU General Public License as *
10 * published by the Free Software Foundation - version 3 or *
11 * (at your option) any later version. *
12 * *
13 * This program 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 in file COPYING for more details. *
17 * *
18 * You should have received a copy of the GNU General Public *
19 * License along with this program; if not, write to the Free *
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
21 * Boston, MA 02111, USA. *
22\* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
23
24#include "gnugo.h"
25
26#include <stdio.h>
27
28#include "sgftree.h"
29#include "liberty.h"
30#include "config.h"
31
32/*
33 * Define all global variables used within the engine.
34 */
35
36int thrashing_dragon = NO_MOVE; /* Dead opponent's dragon trying to live. */
37signed char thrashing_stone[BOARDMAX]; /* All thrashing stones. */
38
39float potential_moves[BOARDMAX];
40
41/* Used by reading. */
42int depth; /* deep reading cut off */
43int backfill_depth; /* deep reading cut off */
44int backfill2_depth; /* deep reading cut off */
45int break_chain_depth; /* deep reading cut off */
46int superstring_depth; /* deep reading cut off */
47int fourlib_depth; /* deep reading cut off */
48int ko_depth; /* deep reading cut off */
49int branch_depth; /* deep reading cut off */
50int aa_depth;
51int depth_offset; /* keeps track of temporary depth changes */
52int owl_distrust_depth; /* below this owl trusts the optics code */
53int owl_branch_depth; /* below this owl tries only one variation */
54int owl_reading_depth; /* owl does not read below this depth */
55int owl_node_limit; /* maximum number of nodes considered */
56int semeai_branch_depth;
57int semeai_branch_depth2;
58int semeai_node_limit;
59int connect_depth; /* Used by Tristan Cazenave's connection reader. */
60int connect_depth2; /* Used by alternater connection reader. */
61int connection_node_limit;
62int breakin_node_limit; /* Reading limits for break_in/block_off reading */
63int breakin_depth;
64/* Mandated values for deep reading cutoffs. */
65int mandated_depth = -1;
66int mandated_backfill_depth = -1;
67int mandated_backfill2_depth = -1;
68int mandated_break_chain_depth = -1;
69int mandated_superstring_depth = -1;
70int mandated_fourlib_depth = -1;
71int mandated_ko_depth = -1;
72int mandated_branch_depth = -1;
73int mandated_aa_depth = -1;
74int mandated_owl_distrust_depth = -1;
75int mandated_owl_branch_depth = -1;
76int mandated_owl_reading_depth = -1;
77int mandated_owl_node_limit = -1;
78int mandated_semeai_node_limit = -1;
79
80
81/* Miscellaneous. */
82int quiet = 0; /* minimal output */
83int showstatistics = 0; /* print statistics */
84int profile_patterns = 0; /* print statistics of pattern usage */
85int allpats = 0; /* generate all patterns, even small ones */
86int printworms = 0; /* print full data on each string */
87int printmoyo = 0; /* print moyo board each move */
88int printboard = 0; /* print board each move */
89int fusekidb = 1; /* use fuseki database */
90int disable_fuseki = 0; /* do not generate fuseki moves */
91int josekidb = 1; /* use joseki database */
92int showtime = 0; /* print time to find move */
93int showscore = 0; /* print estimated score */
94int debug = 0; /* controls debug output */
95int verbose = 0; /* trace level */
96char outfilename[128] = ""; /* output file (-o option) */
97int output_flags = OUTPUT_DEFAULT; /* amount of output to outfile */
98int metamachine = 0; /* use metamachine_genmove */
99int oracle_exists = 0; /* oracle is available for consultation */
100int autolevel_on = 0; /* Adjust level in GMP or ASCII mode. */
101
102int disable_threat_computation = 0;
103int disable_endgame_patterns = 0;
104int doing_scoring = 0;
105
106int chinese_rules = CHINESE_RULES; /* ruleset choice for GMP connection */
107/* use experimental connection module */
108int experimental_connections = EXPERIMENTAL_CONNECTIONS;
109/* use alternate connection reading algorithm */
110int alternate_connections = ALTERNATE_CONNECTIONS;
111/* compute owl threats */
112int owl_threats = OWL_THREATS;
113/* use experimental owl extension (GAIN/LOSS) */
114int experimental_owl_ext = EXPERIMENTAL_OWL_EXT;
115/* use experimental territory break-in module */
116int experimental_break_in = USE_BREAK_IN;
117/* use central oriented influence */
118int cosmic_gnugo = COSMIC_GNUGO;
119/* search for large scale owl moves */
120int large_scale = LARGE_SCALE;
121
122int capture_all_dead = 0; /* capture all dead opponent stones */
123int play_out_aftermath = 0; /* make everything unconditionally settled */
124int resign_allowed = RESIGNATION_ALLOWED; /* resign hopeless games */
125
126int play_mirror_go = 0; /* try to play mirror go if possible */
127int mirror_stones_limit = -1; /* but stop at this number of stones */
128
129int gtp_version = 2; /* Use GTP version 2 by default. */
130int use_monte_carlo_genmove = 0; /* Default is not to use Monte Carlo move
131 * generation.
132 */
133int mc_games_per_level = 8000; /* By default, use 8000 times the current
134 * level number of simulations
135 * for each mmove when Monte Carlo
136 * move generation is enabled.
137 */
138
139float best_move_values[10];
140int best_moves[10];
141float white_score;
142float black_score;
143
144int close_worms[BOARDMAX][4];
145int number_close_worms[BOARDMAX];
146int close_black_worms[BOARDMAX][4];
147int number_close_black_worms[BOARDMAX];
148int close_white_worms[BOARDMAX][4];
149int number_close_white_worms[BOARDMAX];
150
151int false_eye_territory[BOARDMAX];
152int forced_backfilling_moves[BOARDMAX];
153
154struct worm_data worm[BOARDMAX];
155struct dragon_data dragon[BOARDMAX];
156int number_of_dragons;
157struct dragon_data2 *dragon2 = NULL;
158struct half_eye_data half_eye[BOARDMAX];
159struct eye_data black_eye[BOARDMAX];
160struct eye_data white_eye[BOARDMAX];
161struct vital_eye_points black_vital_points[BOARDMAX];
162struct vital_eye_points white_vital_points[BOARDMAX];
163struct surround_data surroundings[MAX_SURROUND];
164int surround_pointer;
165
166int cutting_points[BOARDMAX];
167
168double slowest_time = 0.0;
169int slowest_move = NO_MOVE;
170int slowest_movenum = 0;
171double total_time = 0.0;
172
173
174float minimum_value_weight = 1.0;
175float maximum_value_weight = 1.0;
176float invasion_malus_weight = 1.0;
177float territorial_weight = 1.0;
178float strategical_weight = 1.0;
179float attack_dragon_weight = 1.0;
180float followup_weight = 1.0;