Rev 154 | Rev 176 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 154 | Rev 169 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad |
4 | Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad |
5 | Copyright (C) 2015- |
5 | Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad |
6 | 6 | ||
7 | Stockfish is free software: you can redistribute it and/or modify |
7 | Stockfish is free software: you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation, either version 3 of the License, or |
9 | the Free Software Foundation, either version 3 of the License, or |
10 | (at your option) any later version. |
10 | (at your option) any later version. |
Line 37... | Line 37... | ||
37 | 37 | ||
38 | /// 'On change' actions, triggered by an option's value change |
38 | /// 'On change' actions, triggered by an option's value change |
39 | void on_clear_hash(const Option&) { Search::clear(); } |
39 | void on_clear_hash(const Option&) { Search::clear(); } |
40 | void on_hash_size(const Option& o) { TT.resize(o); } |
40 | void on_hash_size(const Option& o) { TT.resize(o); } |
41 | void on_logger(const Option& o) { start_logger(o); } |
41 | void on_logger(const Option& o) { start_logger(o); } |
42 | void on_threads(const Option&) { Threads. |
42 | void on_threads(const Option& o) { Threads.set(o); } |
43 | void on_tb_path(const Option& o) { Tablebases::init(o); } |
43 | void on_tb_path(const Option& o) { Tablebases::init(o); } |
44 | 44 | ||
45 | 45 | ||
46 | /// Our case insensitive less() function as required by UCI protocol |
46 | /// Our case insensitive less() function as required by UCI protocol |
47 | bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const { |
47 | bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const { |
Line 53... | Line 53... | ||
53 | 53 | ||
54 | /// init() initializes the UCI options to their hard-coded default values |
54 | /// init() initializes the UCI options to their hard-coded default values |
55 | 55 | ||
56 | void init(OptionsMap& o) { |
56 | void init(OptionsMap& o) { |
57 | 57 | ||
- | 58 | // at most 2^32 clusters. |
|
58 | const int MaxHashMB = Is64Bit ? |
59 | const int MaxHashMB = Is64Bit ? 131072 : 2048; |
59 | 60 | ||
60 | o["Debug Log File"] << Option("", on_logger); |
61 | o["Debug Log File"] << Option("", on_logger); |
61 | o["Contempt"] << Option( |
62 | o["Contempt"] << Option(20, -100, 100); |
62 | o["Threads"] << Option(1, 1, |
63 | o["Threads"] << Option(1, 1, 512, on_threads); |
63 | o["Hash"] << Option(16, 1, MaxHashMB, on_hash_size); |
64 | o["Hash"] << Option(16, 1, MaxHashMB, on_hash_size); |
64 | o["Clear Hash"] << Option(on_clear_hash); |
65 | o["Clear Hash"] << Option(on_clear_hash); |
65 | o["Ponder"] << Option(false); |
66 | o["Ponder"] << Option(false); |
66 | o["MultiPV"] << Option(1, 1, 500); |
67 | o["MultiPV"] << Option(1, 1, 500); |
67 | o["Skill Level"] << Option(20, 0, 20); |
68 | o["Skill Level"] << Option(20, 0, 20); |