Skip to content

Fix uninitialized norm bug and bump version to 0.10.1 - #10

Merged
areenberg merged 4 commits into
masterfrom
anders_development
Aug 8, 2026
Merged

Fix uninitialized norm bug and bump version to 0.10.1#10
areenberg merged 4 commits into
masterfrom
anders_development

Conversation

@areenberg

Copy link
Copy Markdown
Owner

Fixes a real undefined-behavior bug (norm read before initialization in ModifiedPolicyIteration, found via Valgrind) and regenerates the average-reward test reference values it affected. Verified via a manual workflow_dispatch run across Linux, Windows, and macOS before merging. Bumps version to 0.10.1 (patch-bug fix only).

areenberg and others added 4 commits August 8, 2026 17:01
Rebuilt against the committed norm(numeric_limits<double>::infinity())
fix (62495bb) and ran every check in test1.py/test1_pip.py, extracting
actual values instead of relying on pass/fail alone (test files were
temporarily instrumented for this, not committed).

Only 4 of 84 checks actually changed - all four are the average-reward
MPI/PI (parallel and unparallel) value-vector checks in Configuration 1
(Model 1a/2a/1b/2b). Every other check, including the discounted-
criterion ones, still passes: differences there are ~1e-4 and round to
the same displayed value, well within existing tolerance.

The four new values are each the old value plus a constant ~13.4623
across all three states - exactly the expected signature of shifting
the average-reward differential value function's additive-constant
anchor (see the norm-uninitialized-bug-deferred memory note). The
policy in every case is unchanged: [1, 1, 0].

test2.py/test2_pip.py need no changes - they only use the discounted
criterion, which doesn't have this ambiguity.

Verified: all of test1.py, test1_pip.py, test2.py, test2_pip.py pass
against a fresh local build with both this change and the value-vector
updates applied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Patch bump: fixes the uninitialized norm bug in ModifiedPolicyIteration
(62495bb) and regenerates the affected average-reward test oracle
values (f84c13e). No new features or API changes. Verified via a
manual workflow_dispatch run: build+test passes on Linux, Windows, and
macOS.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@areenberg
areenberg merged commit a0a5678 into master Aug 8, 2026
5 checks passed
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.

1 participant