#ifndef RANDOM_TRIALS_STRATEGY_HPP
#define RANDOM_TRIALS_STRATEGY_HPP
#include "Strategy.hpp"
class RandomTrialsStrategy : public Strategy {
/*
Parameters:
depth: depth to search, should be positive; note that search space increases exponentially with depth
trials: trials for each move checked
*/
// speed things up with integer arithmetic
// 4 moves, 20 max depth, multiplied by 4 to pack score and move
static constexpr eval_t MULT = 4e18 / (heuristics::MAX_EVAL * 4 * 20 * 4);
static_assert(MULT > 1);
heuristic_t evaluator;
public:
int depth, trials;
RandomTrialsStrategy(const int _depth, const int _trials, const heuristic_t _evaluator) {
depth = _depth;
trials = _trials;
evaluator = _evaluator;
}
RandomTrialsStrategy(const int _depth, const int _trials, const int heuristic_idx) :
RandomTrialsStrategy(_depth, _trials, heuristics::exports[heuristic_idx]) {}
std::unique_ptr