00001
00014 #pragma once
00015
00016 #include "utils.h"
00017 #include "board.h"
00018 #include "engine.h"
00019 #include "uct.h"
00020 #include "eval.h"
00021 #include "timer.h"
00022
00023 #define START_POS_PATH "data/startpos.txt"
00024
00025 #define NEGATIVE_GOAL_CHECK_PATH "data/rabbits/b001.txt"
00026 #define PLAYOUT_DEPTH 3
00027 #define UCT_NODE_MATURE 5
00028 #define SEC_ONE 1
00029
00030 #define UCT_CHILDREN_NUM 25
00031
00041 class Benchmark
00042 {
00043 public:
00044 Benchmark();
00045 Benchmark(Board*,uint);
00046
00047 void benchmarkEval();
00048 void benchmarkCopyBoard();
00049 void benchmarkPlayout();
00050 void benchmarkOldPlayout();
00051 void benchmarkUct();
00052 void benchmarkSearch() const;
00053
00054 void benchmarkAll();
00055
00056 private:
00057 Board * board_;
00058 uint playoutCount_;
00059 Timer timer;
00060 };