Interface BotStrategy
- All Known Implementing Classes:
AlphaBeta, Custom, MaxN, Minimax, MonteCarloTreeSearch, Paranoid, Random
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a Minimax w.static final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a default strategy (Random).static final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a MaxN strategy.static final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a Monte Carlo Search Tree strategy.static final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a Minimax strategy.static final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a Paranoid strategy.static final ToIntFunction<GameState> Returns a function that returns the best move for the current game state using a Random strategy. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToIntFunction<GameState> alphabeta(BotStrategyConfig config) Returns a function that returns the best move for the current game state using a Minimax w.intbestMove()Returns the best move for the current game state.static ToIntFunction<GameState> maxn(BotStrategyConfig config) Returns a function that returns the best move for the current game state using a MaxN strategy.static ToIntFunction<GameState> mcts(BotStrategyConfig config) Returns a function that returns the best move for the current game state using a Monte Carlo Tree Search strategy.static ToIntFunction<GameState> minimax(BotStrategyConfig config) Returns a function that returns the best move for the current game state using a Minimax strategy.static ToIntFunction<GameState> paranoid(BotStrategyConfig config) Returns a function that returns the best move for the current game state using a Paranoid strategy.static ToIntFunction<GameState> random(BotStrategyConfig config) Returns a function that returns the best move for the current game state using a Random strategy.
-
Field Details
-
RANDOM
Returns a function that returns the best move for the current game state using a Random strategy. -
MINIMAX
Returns a function that returns the best move for the current game state using a Minimax strategy. -
ALPHABETA
Returns a function that returns the best move for the current game state using a Minimax w. Alpha-Beta Pruning strategy. -
MAXN
Returns a function that returns the best move for the current game state using a MaxN strategy. -
PARANOID
Returns a function that returns the best move for the current game state using a Paranoid strategy. -
MCTS
Returns a function that returns the best move for the current game state using a Monte Carlo Search Tree strategy. -
DEFAULT
Returns a function that returns the best move for the current game state using a default strategy (Random).
-
-
Method Details
-
bestMove
int bestMove()Returns the best move for the current game state.- Returns:
- the index of the best move to make
-
random
Returns a function that returns the best move for the current game state using a Random strategy.- Parameters:
config- the configuration for the bot strategy- Returns:
- a function that returns the best move for the current game state using a Random strategy
-
minimax
Returns a function that returns the best move for the current game state using a Minimax strategy.- Parameters:
config- the configuration for the bot strategy- Returns:
- a function that returns the best move for the current game state using a Minimax strategy
-
alphabeta
Returns a function that returns the best move for the current game state using a Minimax w. Alpha-Beta Pruning strategy.- Parameters:
config- the configuration for the bot strategy- Returns:
- a function that returns the best move for the current game state using a Minimax w. Alpha-Beta Pruning strategy
-
maxn
Returns a function that returns the best move for the current game state using a MaxN strategy.- Parameters:
config- the configuration for the bot strategy- Returns:
- a function that returns the best move for the current game state using a MaxN strategy
-
paranoid
Returns a function that returns the best move for the current game state using a Paranoid strategy.- Parameters:
config- the configuration for the bot strategy- Returns:
- a function that returns the best move for the current game state using a Paranoid strategy
-
mcts
Returns a function that returns the best move for the current game state using a Monte Carlo Tree Search strategy.- Parameters:
config- the configuration for the bot strategy- Returns:
- a function that returns the best move for the current game state using a Monte Carlo Tree Search strategy
-