Example #1
0
 public MctsNeatAgent(int id,
     CheckGameOver check, 
     GetValidNextMoves valid,
     IBlackBox brain,
     ApplyMove applyMove,
     GridGameParameters parameters) : base(id, check, valid, applyMove, parameters)
 {
     Brain = brain;
 }
Example #2
0
        public MinimaxAgent(int id, 
            CheckGameOver check, 
            GetValidNextMoves valid,
            BoardEval eval,
            ApplyMove apply,
            GridGameParameters parameters) : base(id)
        {
            Debug.Assert(parameters != null);

            _checkGameOver = check;
            _validNextMoves = valid;
            _boardEval = eval;
            _applyMove = apply;

            _params = parameters;
        }
Example #3
0
        public MctsAgent(int id, 
            CheckGameOver check, 
            GetValidNextMoves valid,
            ApplyMove applyMove,
            GridGameParameters parameters,
            bool benchmarkAgent = false) : base(id)
        {
            Debug.Assert(parameters != null);

            _checkGameOver = check;
            _validNextMoves = valid;
            _applyMove = applyMove;

            _params = parameters;
            _random = new Random();
            
            BenchmarkAgent = benchmarkAgent;

            mcTrials = benchmarkAgent ? _params.EvaluatorMonteCarloTrials : _params.MonteCarloTrials;
            minTrialsPerMove = benchmarkAgent ? _params.EvaluatorMinMcTrialsPerMove : _params.MinMcTrialsPerMove;
            uctConst = benchmarkAgent ? _params.EvaluatorUctConst : _params.UctConst;
        }