Skip to content

Deterministic seeding: seed URL + RNG propagation to KPCA, TD estimator, and grammar#13

Merged
recursive-ai-dev merged 1 commit into
mainfrom
codex/implement-complete-production-ready-system
Jan 11, 2026
Merged

Deterministic seeding: seed URL + RNG propagation to KPCA, TD estimator, and grammar#13
recursive-ai-dev merged 1 commit into
mainfrom
codex/implement-complete-production-ready-system

Conversation

@recursive-ai-dev

Copy link
Copy Markdown
Owner

Motivation

  • Remove hidden nondeterminism and make generation/training reproducible by seeding the engine RNG.
  • Provide a simple external entrypoint for determinism via the URL (?seed=) that accepts numeric or string seeds.
  • Centralize RNG usage so all stochastic components share a single, seedable RNG instance.
  • Document the change and testing expectations in the logic and testing documents for traceability.

Description

  • Add ?seed= parsing and stable string hashing (fnv-1a style) via resolveSeedFromLocation and hashSeedString in src/App.jsx.
  • Propagate a seeded RNG into core components by wiring a LaggedFibonacciGenerator(seed) through AGTuneEngine and exposing it to KernelPCA, TDValueEstimator, and UniversalLinguisticEngine (and ConstraintGrammar), replacing local Math.random() fallbacks.
  • Replace non-deterministic uses of Math.random() in selection/generation paths with calls to the injected RNG (or rng.next()) and allow components to accept an rng dependency for deterministic initialization.
  • Update documentation files LOGIC-MAP.md, WE-CHOSE.md, and TESTING.md to describe the deterministic seeding logic, perspectives, and a seed-driven test matrix.

Testing

  • No automated tests were executed as part of this change.
  • The repository contains automated validation scripts for the engine such as npm run test-engine and npm run test-all which can be used to validate components after seeding.
  • Manual static checks (file edits/grep/commits) were performed to verify RNG propagation through the modified files.
  • Recommended automated verification: run npm run test-engine and then npm run test-all to ensure core algorithms behave identically across identical ?seed= runs.

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@sonarqubecloud

sonarqubecloud Bot commented Jan 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@codacy-production

Copy link
Copy Markdown

Codacy's Analysis Summary

16 new issues (≤ 0 issue)
1 new security issue
55 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

@recursive-ai-dev recursive-ai-dev merged commit 4826945 into main Jan 11, 2026
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant