Structs
The following structs are available globally.
-
Simple minimal implementation of
TreeSearchPolicy
.Declaration
Swift
public struct SimpleTreeSearchPolicy<G: Game>: TreeSearchPolicy
-
Implementation of Minimax Tree Search algorithm with alpha beta pruning.
Note
Due to the lack of internal state a single instance ofMiniMaxTreeSearch
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 ofMonteCarloTreeSearch
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 ofRandomStrategy
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 ofNegaMaxTreeSearch
can be shared for several players in a game.Declaration
Swift
public struct NegaMaxTreeSearch<G: Game, P: TreeSearchPolicy where P.Game == G>
-
Upper Confidence Bound 1 applied to trees (UCT)
Declaration
Swift
public struct UpperConfidenceBoundHeuristic<G: Game where G.Score == Double>: ScoringHeuristic
-
Simple minimal implementation of
MonteCarloTreeSearchPolicy
.Declaration
Swift
public struct SimpleMonteCarloTreeSearchPolicy<G, H where G: Game, G.Score == H.Score, H: ScoringHeuristic>: MonteCarloTreeSearchPolicy