AIRandomNetworkStrategist

class AIRandomNetworkStrategist : NSObject, GKStrategist

A explorative strategist that uses Random Network Distillation to determine the most optimal move.

Random Network Distillation (RND) is a reinforcement learning-based strategy that places emphasis on unexplored states, encouraging the strategist to explore the game with rewards for encountering new states. RND scores states by measuring how difficult it is to predict the output based on previous experience.

For more information, consult the OpenAI article titled Reinforcement Learning with Prediction-Based Rewards.

  • A lookup table containing states the strategist has seen before, along with their score.

    Declaration

    Swift

    var lookupTable: [AIAbstractGameState : Int]
  • The game model that the strategist will assess.

    Declaration

    Swift

    var gameModel: GKGameModel?
  • The random source for the strategist.

    Declaration

    Swift

    var randomSource: GKRandom?
  • Determine the best move for the currently active player.

    Declaration

    Swift

    func bestMoveForActivePlayer() -> GKGameModelUpdate?
  • Train the strategist.

    Declaration

    Swift

    func train()