]> git.sesse.net Git - stockfish/blobdiff - src/tune.cpp
Simplify pawn count in evaluation
[stockfish] / src / tune.cpp
index 41f6664d9caf7d2f55aaee7a028da832536c52a2..97baeb784e9cc497c22ec6672392a4bbae4675f9 100644 (file)
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "tune.h"
+
 #include <algorithm>
 #include <iostream>
+#include <map>
 #include <sstream>
+#include <string>
 
-#include "types.h"
-#include "misc.h"
 #include "uci.h"
 
+namespace Stockfish {
+enum Value : int;
+}
+
 using std::string;
 
 namespace Stockfish {
@@ -92,19 +98,6 @@ template<> void Tune::Entry<Value>::read_option() {
       value = Value(int(Options[name]));
 }
 
-template<> void Tune::Entry<Score>::init_option() {
-  make_option("m" + name, mg_value(value), range);
-  make_option("e" + name, eg_value(value), range);
-}
-
-template<> void Tune::Entry<Score>::read_option() {
-  if (Options.count("m" + name))
-      value = make_score(int(Options["m" + name]), eg_value(value));
-
-  if (Options.count("e" + name))
-      value = make_score(mg_value(value), int(Options["e" + name]));
-}
-
 // Instead of a variable here we have a PostUpdate function: just call it
 template<> void Tune::Entry<Tune::PostUpdate>::init_option() {}
 template<> void Tune::Entry<Tune::PostUpdate>::read_option() { value(); }
@@ -121,7 +114,6 @@ template<> void Tune::Entry<Tune::PostUpdate>::read_option() { value(); }
 //
 // Then paste the output below, as the function body
 
-#include <cmath>
 
 namespace Stockfish {