Players are strategy objects that, given a legal set of moves and the visible game context, choose a card to play. Three built-in strategies are provided.
Usage
sk_player(
strategy = c("random", "heuristic", "mcts"),
n_sims = 200,
call = rlang::caller_env()
)Arguments
- strategy
One of
"random","heuristic", or"mcts"."random": chooses uniformly among legal moves."heuristic": greedy rules – take the trick with the cheapest card that beats it when the trick is worth taking, otherwise shed the lowest-value card."mcts": determinized Monte Carlo search (seesk_mcts_move()).
- n_sims
For
"mcts", the number of determinized playouts per decision. Ignored otherwise. Defaults to 200.- call
The calling environment, used for error reporting.
See also
sk_choose() to ask a player for a move.
Other player functions:
sk_choose(),
sk_mcts_move()