Class RelativeTerritoryPlayer


  • @Deprecated
    public class RelativeTerritoryPlayer
    extends AIPlayer
    Deprecated.
    Only used as benchmark baseline
    The class which represents the minimax algorithm.
    • Constructor Detail

      • RelativeTerritoryPlayer

        public RelativeTerritoryPlayer()
        Deprecated.
        RelativeTerritoryPlayer which contains a game object and his player id.
    • Method Detail

      • generateTree

        public void generateTree​(int depth,
                                 MinimaxNode root,
                                 int playerId)
        Deprecated.
        Generate the tree of turns and boards until the depth is reached.
        Parameters:
        depth - The depth of the tree.
        root - The root node, the board we get.
        playerId - Used for getting all possible turns of player with playerId
      • calculateTurn

        public Turn calculateTurn​(int gameId,
                                  Board board,
                                  int playerId,
                                  Turn enemyTurn)
        Deprecated.
        Calculate the best turn a player can make. First, it generates the tree of turns and boards, then minimax-algorithm is called.
        Specified by:
        calculateTurn in class AIPlayer
        Parameters:
        gameId - the id of the game that is being played
        board - the current board state
        playerId - our player id
        enemyTurn - the turn played by the enemy
        Returns:
        The best turn to make.
      • calculateTurn

        public Turn calculateTurn​(int gameId,
                                  Board board,
                                  int playerId,
                                  Turn enemyTurn,
                                  long maxTurnTime)
        Deprecated.
        Description copied from class: AIPlayer
        Calculates best turn in the players' view within a given timelimit.
        Specified by:
        calculateTurn in class AIPlayer
        Parameters:
        gameId - the id of the game that is being played
        board - the current board state
        playerId - our player id
        enemyTurn - the turn played by the enemy
        maxTurnTime - the time we are given to calculate the turn in ms
        Returns:
        best possible turn