Last updated on 2022-03-10 06:50:33 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0.0 | 5.04 | 76.44 | 81.48 | OK | |
r-devel-linux-x86_64-debian-gcc | 1.0.0 | 3.93 | 59.59 | 63.52 | OK | |
r-devel-linux-x86_64-fedora-clang | 1.0.0 | 97.23 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 1.0.0 | 86.61 | OK | |||
r-devel-windows-x86_64-new-UL | 1.0.0 | 48.00 | 130.00 | 178.00 | OK | |
r-devel-windows-x86_64-new-TK | 1.0.0 | OK | ||||
r-patched-linux-x86_64 | 1.0.0 | 4.83 | 72.58 | 77.41 | OK | |
r-release-linux-x86_64 | 1.0.0 | OK | ||||
r-release-macos-arm64 | 1.0.0 | ERROR | ||||
r-release-macos-x86_64 | 1.0.0 | OK | ||||
r-release-windows-ix86+x86_64 | 1.0.0 | 9.00 | 114.00 | 123.00 | OK | |
r-oldrel-macos-x86_64 | 1.0.0 | OK | ||||
r-oldrel-windows-ix86+x86_64 | 1.0.0 | 10.00 | 98.00 | 108.00 | OK |
Version: 1.0.0
Check: examples
Result: ERROR
Running examples in ‘pomdp-Ex.R’ failed
The error most likely occurred in:
> ### Name: solve_POMDP
> ### Title: Solve a POMDP Problem using pomdp-solver
> ### Aliases: solve_POMDP solve_POMDP_parameter
>
> ### ** Examples
>
> ################################################################
> # Example 1: Solving the simple infinite-horizon Tiger problem
> data("Tiger")
> Tiger
POMDP, list - Tiger Problem
Discount factor: 0.75
Horizon: Inf epochs
List components: ‘name’, ‘discount’, ‘horizon’, ‘states’, ‘actions’,
‘observations’, ‘transition_prob’, ‘observation_prob’, ‘reward’,
‘start’, ‘terminal_values’
>
> # look at the model as a list
> unclass(Tiger)
$name
[1] "Tiger Problem"
$discount
[1] 0.75
$horizon
[1] Inf
$states
[1] "tiger-left" "tiger-right"
$actions
[1] "listen" "open-left" "open-right"
$observations
[1] "tiger-left" "tiger-right"
$transition_prob
$transition_prob$listen
[1] "identity"
$transition_prob$`open-left`
[1] "uniform"
$transition_prob$`open-right`
[1] "uniform"
$observation_prob
$observation_prob$listen
tiger-left tiger-right
tiger-left 0.85 0.15
tiger-right 0.15 0.85
$observation_prob$`open-left`
[1] "uniform"
$observation_prob$`open-right`
[1] "uniform"
$reward
action start.state end.state observation value
1 listen * * * -1
2 open-left tiger-left * * -100
3 open-left tiger-right * * 10
4 open-right tiger-left * * 10
5 open-right tiger-right * * -100
$start
[1] "uniform"
$terminal_values
NULL
>
> # inspect an individual field of the model (e.g., the reward)
> Tiger$reward
action start.state end.state observation value
1 listen * * * -1
2 open-left tiger-left * * -100
3 open-left tiger-right * * 10
4 open-right tiger-left * * 10
5 open-right tiger-right * * -100
>
> sol <- solve_POMDP(model = Tiger)
> sol
POMDP, list - Tiger Problem
Discount factor: 0.75
Horizon: Inf epochs
Solved. Solution converged: TRUE
Total expected reward (for start probabilities): 1.933439
List components: ‘name’, ‘discount’, ‘horizon’, ‘states’, ‘actions’,
‘observations’, ‘transition_prob’, ‘observation_prob’, ‘reward’,
‘start’, ‘solution’, ‘solver_output’
>
> # look at solver output
> sol$solver_output
//****************\\
|| pomdp-solve ||
|| v. 5.3 ||
\\****************//
PID=0
- - - - - - - - - - - - - - - - - - - -
time_limit = 0
force_rounding = false
mcgs_prune_freq = 100
verbose = context
stdout =
inc_prune = normal
history_length = 0
prune_epsilon = 0.000000
save_all = false
o = /Volumes/Temp/tmp/RtmpGfL6oZ/pomdp_ddff3fc8f463-0
fg_save = true
enum_purge = normal_prune
fg_type = initial
fg_epsilon = 0.000000
mcgs_traj_iter_count = 1
lp_epsilon = 0.000000
end_epsilon = 0.000000
start_epsilon = 0.000000
dom_check = false
stop_delta = 0.000000
q_purge = normal_prune
pomdp = /Volumes/Temp/tmp/RtmpGfL6oZ/pomdp_ddff3fc8f463.POMDP
mcgs_num_traj = 1000
stop_criteria = weak
method = grid
memory_limit = 0
alg_rand = 0
terminal_values =
save_penultimate = false
epsilon = 0.000000
rand_seed =
discount = 0.750000
fg_points = 10000
fg_purge = normal_prune
fg_nonneg_rewards = false
proj_purge = normal_prune
mcgs_traj_length = 100
history_delta = 0
f =
epsilon_adjust = 0.000000
grid_filename =
prune_rand = 0
vi_variation = normal
horizon = 0
stat_summary = false
max_soln_size = 0.000000
witness_points = false
- - - - - - - - - - - - - - - - - - - -
[Initializing POMDP ... done.]
[Finite Grid Method:]
[Creating grid ... done.]
[Grid has 25 points.]
Grid saved to /Volumes/Temp/tmp/RtmpGfL6oZ/pomdp_ddff3fc8f463-0.belief.
The initial policy being used:
Alpha List: Length=1
<id=0: a=0> [-400.000000 -400.000000]
++++++++++++++++++++++++++++++++++++++++
Epoch: 1...3 vectors (delta=1.10e+02)
Epoch: 2...5 vectors (delta=7.85e+01)
Epoch: 3...5 vectors (delta=5.89e+01)
Epoch: 4...5 vectors (delta=4.42e+01)
Epoch: 5...5 vectors (delta=3.27e+01)
Epoch: 6...5 vectors (delta=2.45e+01)
Epoch: 7...5 vectors (delta=1.84e+01)
Epoch: 8...5 vectors (delta=1.37e+01)
Epoch: 9...5 vectors (delta=1.02e+01)
Epoch: 10...5 vectors (delta=7.68e+00)
Epoch: 11...5 vectors (delta=5.72e+00)
Epoch: 12...5 vectors (delta=4.29e+00)
Epoch: 13...5 vectors (delta=3.22e+00)
Epoch: 14...5 vectors (delta=2.41e+00)
Epoch: 15...5 vectors (delta=1.81e+00)
Epoch: 16...5 vectors (delta=1.36e+00)
Epoch: 17...5 vectors (delta=1.02e+00)
Epoch: 18...5 vectors (delta=7.63e-01)
Epoch: 19...5 vectors (delta=5.71e-01)
Epoch: 20...5 vectors (delta=4.29e-01)
Epoch: 21...5 vectors (delta=3.21e-01)
Epoch: 22...5 vectors (delta=2.41e-01)
Epoch: 23...5 vectors (delta=1.81e-01)
Epoch: 24...5 vectors (delta=1.35e-01)
Epoch: 25...5 vectors (delta=1.02e-01)
Epoch: 26...5 vectors (delta=7.62e-02)
Epoch: 27...5 vectors (delta=5.71e-02)
Epoch: 28...5 vectors (delta=4.28e-02)
Epoch: 29...5 vectors (delta=3.21e-02)
Epoch: 30...5 vectors (delta=2.41e-02)
Epoch: 31...5 vectors (delta=1.81e-02)
Epoch: 32...5 vectors (delta=1.35e-02)
Epoch: 33...5 vectors (delta=1.02e-02)
Epoch: 34...5 vectors (delta=7.62e-03)
Epoch: 35...5 vectors (delta=5.71e-03)
Epoch: 36...5 vectors (delta=4.28e-03)
Epoch: 37...5 vectors (delta=3.21e-03)
Epoch: 38...5 vectors (delta=2.41e-03)
Epoch: 39...5 vectors (delta=1.81e-03)
Epoch: 40...5 vectors (delta=1.36e-03)
Epoch: 41...5 vectors (delta=1.02e-03)
Epoch: 42...5 vectors (delta=7.62e-04)
Epoch: 43...5 vectors (delta=5.72e-04)
Epoch: 44...5 vectors (delta=4.29e-04)
Epoch: 45...5 vectors (delta=3.22e-04)
Epoch: 46...5 vectors (delta=2.41e-04)
Epoch: 47...5 vectors (delta=1.81e-04)
Epoch: 48...5 vectors (delta=1.36e-04)
Epoch: 49...5 vectors (delta=1.02e-04)
Epoch: 50...5 vectors (delta=7.63e-05)
Epoch: 51...5 vectors (delta=5.72e-05)
Epoch: 52...5 vectors (delta=4.29e-05)
Epoch: 53...5 vectors (delta=3.22e-05)
Epoch: 54...5 vectors (delta=2.42e-05)
Epoch: 55...5 vectors (delta=1.81e-05)
Epoch: 56...5 vectors (delta=1.36e-05)
Epoch: 57...5 vectors (delta=1.02e-05)
Epoch: 58...5 vectors (delta=7.64e-06)
Epoch: 59...5 vectors (delta=5.73e-06)
Epoch: 60...5 vectors (delta=4.30e-06)
Epoch: 61...5 vectors (delta=3.22e-06)
Epoch: 62...5 vectors (delta=2.42e-06)
Epoch: 63...5 vectors (delta=1.81e-06)
Epoch: 64...5 vectors (delta=1.36e-06)
Epoch: 65...5 vectors (delta=1.02e-06)
Epoch: 66...5 vectors (delta=7.65e-07)
Epoch: 67...5 vectors (delta=5.74e-07)
Epoch: 68...5 vectors (delta=4.30e-07)
Epoch: 69...5 vectors (delta=3.23e-07)
Epoch: 70...5 vectors (delta=2.42e-07)
Epoch: 71...5 vectors (delta=1.82e-07)
Epoch: 72...5 vectors (delta=1.36e-07)
Epoch: 73...5 vectors (delta=1.02e-07)
Epoch: 74...5 vectors (delta=7.66e-08)
Epoch: 75...5 vectors (delta=5.74e-08)
Epoch: 76...5 vectors (delta=4.31e-08)
Epoch: 77...5 vectors (delta=3.23e-08)
Epoch: 78...5 vectors (delta=2.42e-08)
Epoch: 79...5 vectors (delta=1.82e-08)
Epoch: 80...5 vectors (delta=1.36e-08)
Epoch: 81...5 vectors (delta=1.02e-08)
Epoch: 82...5 vectors (delta=7.67e-09)
Epoch: 83...5 vectors (delta=5.75e-09)
Epoch: 84...5 vectors (delta=4.31e-09)
Epoch: 85...5 vectors (delta=3.23e-09)
Epoch: 86...5 vectors (delta=2.43e-09)
Epoch: 87...5 vectors (delta=1.82e-09)
Epoch: 88...5 vectors (delta=1.36e-09)
Epoch: 89...5 vectors (delta=1.02e-09)
Epoch: 90...5 vectors (delta=0.00e+00)
++++++++++++++++++++++++++++++++++++++++
Solution found. See file:
/Volumes/Temp/tmp/RtmpGfL6oZ/pomdp_ddff3fc8f463-0.alpha
/Volumes/Temp/tmp/RtmpGfL6oZ/pomdp_ddff3fc8f463-0.pg
++++++++++++++++++++++++++++++++++++++++>
> # look at the solution
> sol$solution
$method
[1] "grid"
$parameter
NULL
$converged
[1] TRUE
$total_expected_reward
[1] 1.933439
$initial_belief
tiger-left tiger-right
0.5 0.5
$initial_pg_node
[1] 3
$belief_states
tiger-left tiger-right
[1,] 5.000000e-01 5.000000e-01
[2,] 8.500000e-01 1.500000e-01
[3,] 1.500000e-01 8.500000e-01
[4,] 9.697987e-01 3.020134e-02
[5,] 3.020134e-02 9.697987e-01
[6,] 9.945344e-01 5.465587e-03
[7,] 5.465587e-03 9.945344e-01
[8,] 9.990311e-01 9.688763e-04
[9,] 9.688763e-04 9.990311e-01
[10,] 9.998289e-01 1.711147e-04
[11,] 1.711147e-04 9.998289e-01
[12,] 9.999698e-01 3.020097e-05
[13,] 3.020097e-05 9.999698e-01
[14,] 9.999947e-01 5.329715e-06
[15,] 5.329715e-06 9.999947e-01
[16,] 9.999991e-01 9.405421e-07
[17,] 9.405421e-07 9.999991e-01
[18,] 9.999998e-01 1.659782e-07
[19,] 1.659782e-07 9.999998e-01
[20,] 1.000000e+00 2.929027e-08
[21,] 2.929027e-08 1.000000e+00
[22,] 1.000000e+00 5.168871e-09
[23,] 5.168871e-09 1.000000e+00
[24,] 1.000000e+00 9.121536e-10
[25,] 9.121536e-10 1.000000e+00
$pg
$pg[[1]]
node action tiger-left tiger-right
1 1 open-left 3 3
2 2 listen 3 1
3 3 listen 4 2
4 4 listen 5 3
5 5 open-right 3 3
$alpha
$alpha[[1]]
tiger-left tiger-right
[1,] -98.549921 11.450079
[2,] -10.854299 6.516937
[3,] 1.933439 1.933439
[4,] 6.516937 -10.854299
[5,] 11.450079 -98.549921
$policy
$policy[[1]]
tiger-left tiger-right action
1 -98.549921 11.450079 open-left
2 -10.854299 6.516937 listen
3 1.933439 1.933439 listen
4 6.516937 -10.854299 listen
5 11.450079 -98.549921 open-right
attr(,"class")
[1] "POMDP_solution"
>
> # policy (value function (alpha vectors), optimal action and observation dependent transitions)
> policy(sol)
[[1]]
tiger-left tiger-right action
1 -98.549921 11.450079 open-left
2 -10.854299 6.516937 listen
3 1.933439 1.933439 listen
4 6.516937 -10.854299 listen
5 11.450079 -98.549921 open-right
>
> # plot the policy graph of the infinite-horizon POMDP
> plot_policy_graph(sol)
>
> # value function
> plot_value_function(sol, ylim = c(0,20))
>
> # display available solver options which can be passed on to the solver as parameters.
> solve_POMDP_parameter()
Usage: /Volumes/Builds/packages/big-sur-arm64/Rlib/4.1/pomdpSolve/bin//pomdp-solve [opts...] [args...]
General options:
-force_rounding [ false, true ]
-stdout <string>
-save_penultimate [ false, true ]
-rand_seed <string>
-f <string>
-stat_summary [ false, true ]
Resource Limits options:
-time_limit <int>
-memory_limit <int>
Algorithm options:
-mcgs_prune_freq <int>
-inc_prune [ normal, restricted_region, generalized ]
-fg_save [ false, true ]
-enum_purge [ none, domonly, normal_prune, epsilon_prune ]
-fg_type [ simplex, pairwise, search, initial, file ]
-mcgs_traj_iter_count <int>
-mcgs_num_traj <int>
-method [ enum, twopass, linsup, witness, incprune, grid, mcgs ]
-fg_points <int>
-fg_purge [ none, domonly, normal_prune, epsilon_prune ]
-fg_nonneg_rewards [ false, true ]
-mcgs_traj_length <int>
-grid_filename <string>
Optimization options:
-prune_epsilon <double>
-fg_epsilon <double>
-lp_epsilon <double>
-dom_check [ false, true ]
-q_purge [ none, domonly, normal_prune, epsilon_prune ]
-alg_rand <int>
-epsilon <double>
-proj_purge [ none, domonly, normal_prune, epsilon_prune ]
-prune_rand <int>
-witness_points [ false, true ]
Debug options:
-verbose [ context, lp, global, timing, stats, cmdline, main,
alpha, proj, crosssum, agenda, enum, twopass, linsup,
witness, incprune, lpinterface, vertexenum, mdp, pomdp,
param, parsimonious, region, approx_mcgs, zlz_speedup,
finite_grid, mcgs ]
Value Iteration options:
-history_length <int>
-save_all [ false, true ]
-o <string>
-end_epsilon <double>
-start_epsilon <double>
-stop_delta <double>
-pomdp <string>
-stop_criteria [ exact, weak, bellman ]
-terminal_values <string>
-discount <double>
-history_delta <int>
-epsilon_adjust <double>
-vi_variation [ normal, zlz, adjustable_epsilon, fixed_soln_size ]
-horizon <int>
-max_soln_size <double>
Use the parameter options in solve_POMDP without the leading '-' in the form:
parameter = list(fg_points = 100)
Note: Not all parameter options are available (e.g., resource limitations, -pomdp, -horizon).
>
> ################################################################
> # Example 2: Solve a problem specified as a POMDP file
> # using a grid of size 10
> sol <- solve_POMDP("http://www.pomdp.org/examples/cheese.95.POMDP",
+ method = "grid", parameter = list(fg_points = 10))
Error in eval(substitute(expr), e) :
The start probability vector does not add up to 1.
Calls: solve_POMDP ... check_and_fix_MDP -> within -> within.list -> eval -> eval
Execution halted
Flavor: r-release-macos-arm64
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [1s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
── Error (test-solve_POMDP.R:44:1): (code run outside of `test_that()`) ────────
Error in `eval(substitute(expr), e)`: The start probability vector does not add up to 1.
Backtrace:
▆
1. └─pomdp::solve_POMDP("http://www.pomdp.org/examples/cheese.95.POMDP") at test-solve_POMDP.R:44:0
2. └─pomdp::read_POMDP(model)
3. └─pomdp:::check_and_fix_MDP(x)
4. ├─base::within(...)
5. └─base::within.list(...)
6. └─base::eval(substitute(expr), e)
7. └─base::eval(substitute(expr), e)
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 22 ]
Error: Test failures
Execution halted
Flavor: r-release-macos-arm64