
MDP validation plus value iteration (Geron Ch 19, morie.fn hmmdp)
Source:R/geron_w4b_native.R
morie_geron_mdp.RdMDP validation plus value iteration (Geron Ch 19, morie.fn hmmdp)
Examples
morie_geron_mdp(states = data.frame(x = c(1, 2, 3, 4), y = c(2, 4, 5, 9)),
actions = c(1, 2, 3, 4, 5, 6, 7, 8), P = 0.5, R = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $V
#> [1] 149.5 150.5
#>
#> $Q
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 143.5 145.5 147.5 149.5 143.5 145.5 147.5 149.5
#> [2,] 144.5 146.5 148.5 150.5 144.5 146.5 148.5 150.5
#>
#> $policy
#> [1] 3 3
#>
#> $policy_labels
#> [1] 4 4
#>
#> $expected_reward
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 1 3 5 7 1 3 5 7
#> [2,] 2 4 6 8 2 4 6 8
#>
#> $n_iter
#> [1] 490
#>
#> $gamma
#> [1] 0.95
#>
#> $effective_horizon
#> [1] 20
#>
#> $estimate
#> [1] 150.5
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "MDP validation and value iteration"
#>