Skip to content

Conversation

Zinoex
Copy link
Owner

@Zinoex Zinoex commented Oct 1, 2025

... and customizable Bellman algorithms, inferred model types (influences default Bellman algorithm), update documentation including add DocumenterCitations, pretty-print models, parameterize tests.

Fix #84

@Zinoex Zinoex requested a review from Copilot October 1, 2025 15:02
Copy link
Contributor

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Factored IMDPs (+ mixtures) as a general model

1 participant