示例#1
0
    //function used to perform MCTS
    public MonteCarloPosition StartMCTS(float _curPlayerHealth, float _curEnemyHealth, Node _objNode)
    {
        //updates the board to fit the current grid
        MonteCarloBoard _board = UpdateBoard(_curPlayerHealth, _curEnemyHealth, _objNode);

        //performs MCTS on the updated board
        _board = _mcts.findNextMove(_board);

        MonteCarloPosition _enemyPos = new MonteCarloPosition();

        //sets the new enemy pos to the positions returned from MCTS
        _enemyPos = _board.FindPlayer(MonteCarloBoard._enemyVal);

        //returns the enemy position
        return(_enemyPos);
    }
示例#2
0
 public override PlayerTask GetMove(SabberStoneCoreAi.POGame.POGame poGame)
 {
     return(MonteCarloTreeSearch.findNextMove(poGame));
 }