Structs

The following structs are available globally.

  • Implementation of Minimax Tree Search algorithm with alpha beta pruning.

    Note

    Due to the lack of internal state a single instance of MiniMaxTreeSearch can be shared for several players in a game.

    Declaration

    Swift

    public struct MiniMaxTreeSearch<G: Game, P: TreeSearchPolicy where P.Game == G>
  • Implementation of Monte Carlo Tree Search algorithm.

    Note

    Due to internal state a separate instance of MonteCarloTreeSearch has to be used for for each player in a game.

    Declaration

    Swift

    public struct MonteCarloTreeSearch<G, P where G: Game, P: MonteCarloTreeSearchPolicy, P.Game == G, P.Score == G.Score>
  • Implementation of a simple random-based strategy.

    Note

    Due to the lack of internal state a single instance of RandomStrategy can be shared for several players in a game.

    Declaration

    Swift

    public struct RandomStrategy<G: Game>: Strategy
  • Implementation of Negamax Tree Search algorithm with alpha beta pruning.

    Note

    Due to the lack of internal state a single instance of NegaMaxTreeSearch can be shared for several players in a game.

    Declaration

    Swift

    public struct NegaMaxTreeSearch<G: Game, P: TreeSearchPolicy where P.Game == G>