-
Notifications
You must be signed in to change notification settings - Fork 3
Factored RMDPs as a base model #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for factored / robust (ambiguity-set based) interval MDP models by replacing IntervalProbabilities with IntervalAmbiguitySets across the test suite, introduces extensive new tests for factored, threaded, vertex-enumeration, McCormick, and O-max Bellman/backward operators (including GPU variants), and updates specification / product / IO tests to reflect the new abstractions. Also adds convenience solver return-object assertions and implicit sink‑state scenarios while removing the previous orthogonal probability test file.
- Migrate tests from IntervalProbabilities to IntervalAmbiguitySets (including API adjustments).
- Add comprehensive factored / ambiguity set Bellman and value iteration test coverage (CPU & CUDA).
- Introduce solver result accessors and implicit sink state tests; remove outdated orthogonal tests.
Reviewed Changes
Copilot reviewed 85 out of 89 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/sparse/synthesis.jl | Updated synthesis tests to new ambiguity set API; added solution object assertions and implicit sink state; potential variable shadowing issue. |
test/sparse/sparse.jl | Replaced orthogonal test reference with new factored test file. |
test/sparse/orthogonal.jl | Removed (deprecated orthogonal probability tests). |
test/sparse/imdp.jl | Migrated to ambiguity sets; broadened numeric type coverage; added many additional property tests. |
test/sparse/factored.jl | New extensive factored robust MDP Bellman / strategy tests (McCormick, OMax, vertex, threaded). |
test/sparse/bellman.jl | Refactored Bellman tests to ambiguity sets & new workspace types. |
test/data/prism.jl | Adjusted model IO tests to ambiguity set / marginal accessors. |
test/data/intervalmdp.jl | Updated model IO round‑trip tests to ambiguity sets. |
test/data/bmdp_tool.jl | Updated BMDP tool IO tests; added test grouping and ambiguity set assertions. |
test/cuda/sparse/vi.jl | Ported sparse GPU VI tests to ambiguity sets with richer assertions. |
test/cuda/sparse/synthesis.jl | CUDA synthesis tests updated; added solution object assertions. |
test/cuda/sparse/imdp.jl | GPU IMDP tests expanded (exact/finite/infinite properties) using ambiguity sets. |
test/cuda/sparse/bellman.jl | Adjusted GPU sparse Bellman tests; increased stress test sizes (possible perf concern). |
test/cuda/dense/vi.jl | Dense GPU VI tests migrated to ambiguity sets & extended. |
test/cuda/dense/synthesis.jl | Dense GPU synthesis tests updated with solution object checks. |
test/cuda/dense/imdp.jl | Dense GPU IMDP tests expanded similarly to sparse versions. |
test/cuda/dense/bellman.jl | Dense GPU Bellman tests refactored to new API. |
test/base/vi.jl | Base (CPU) VI tests updated; broadened numeric types; added bounds checks. |
test/base/synthesis.jl | Base synthesis tests updated; added solution accessor assertions; variable shadowing issue. |
test/base/specification.jl | Specification getter/error tests updated (qualified isfinitetime); adjusted strategies. |
test/base/product.jl | Product model tests adapted to ambiguity sets; removed 3rd (sink-style) probability in some cases. |
Comments suppressed due to low confidence (1)
test/base/synthesis.jl:63
- Same variable shadowing issue: the loop rebinds k so num_iterations(sol) is compared to the loop's final index instead of the iteration count returned by solve. Rename the loop variable (e.g. t) or preserve the original k in another identifier before the loop.
@test policy isa TimeVaryingStrategy
@test time_length(policy) == 10
for k in 1:time_length(policy)
@test policy[k] == [(1,), (2,), (1,)]
end
@test strategy(sol) == policy
@test value_function(sol) == V
@test num_iterations(sol) == k
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
... and customizable Bellman algorithms, inferred model types (influences default Bellman algorithm), update documentation including add DocumenterCitations, pretty-print models, parameterize tests.
Fix #84