Skip to contents

Filters the analysis to plies where is_turning_point is TRUE, sorted by abs(delta) descending.

Usage

tsr_turning_points(analysis)

Arguments

analysis

A tibble produced by tsr_analyze_game().

Value

A tibble with the same schema as analysis, possibly zero rows.

Examples

# \donttest{
g <- tsr_play_game("greedy", "random", seed = 2L) # a short, decisive game
tsr_turning_points(tsr_analyze_game(g))
#> # A tibble: 1 × 17
#>     ply player  cell     i     j     k     l win_prob_before win_prob_after
#>   <int>  <int> <int> <int> <int> <int> <int>           <dbl>          <dbl>
#> 1     5      1     2     1     0     0     0           0.537          0.731
#> # ℹ 8 more variables: delta <dbl>, best_cell <int>, best_delta <dbl>,
#> #   regret <dbl>, is_best <lgl>, missed_win <lgl>, missed_block <lgl>,
#> #   is_turning_point <lgl>
# }