Repository navigation
[cursor-cloud] RL 1 — PPO discret et continu + démo avant/après - #90
Conversation
Stabilize PPO-Clip behind the existing public adapter: GAE bootstrap vs termination, minibatch updates, categorical and squashed-Gaussian policies, and file checkpoint replay. Target-chasing serves a replay page whose reward curve is loaded from the declared-budget JSONL logs. Co-authored-by: Salim <salim4n@users.noreply.github.com>
Re-run the frozen 80-episode budget after the implementation commit so manifest.json records d7657aa and the demo artifacts match that SHA. Co-authored-by: Salim <salim4n@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Relecture locale IGN-170 — head
Aucun échec nouveau. L'entraînement est bien déterministe et court. VERDICT : ÉCART Corrections demandées :
Non bloquant :
Non testé ici : navigateur et Playwright (captures non rejouées), GitHub Actions. |
Select the demo seed by trained minus untrained greedy eval, record both returns in summary.json, and surface them in the replay UI. Restore the original target-chasing DQN README and append the PPO section. Cover hand-calculated continuous log-prob, first-minibatch ratio≈1, clipFraction, and continuous checkpoint load including log-std. Co-authored-by: Salim <salim4n@users.noreply.github.com>
Emit .js specifiers in core and backend-tfjs so Node 22 can import dist/index.js. Add repo-root scripts/train-ppo-nav1d.mjs, round PPO demo returns, and record gitSha as train-time HEAD (parent of the later artifacts commit). Co-authored-by: Salim <salim4n@users.noreply.github.com>
Regenerate manifest.json after the ESM/script fix. gitSha is 6c8b35c (train-time HEAD); it cannot equal the commit that stores this file. Verify against the first parent of the manifest commit. Co-authored-by: Salim <salim4n@users.noreply.github.com>
|
Recette 13/11 replay on head 1.
|
| command | exit | notes |
|---|---|---|
RUN_PPO_EVAL=1 vitest run …/ppo-eval-checkpoint.test.ts |
0 | 1 passed; loaded action 1 = expected 1 |
ticket vitest ppo + ppo-public + ppo-bootstrap + ppo-node-dist |
0 | 4 files, 17 passed |
corepack pnpm --filter target-chasing build |
0 | ✓ built in 8.30s |
corepack pnpm test |
0 | 73 files passed / 5 skipped; 569 tests passed / 5 skipped (30-pnpm-test.txt) |
corepack pnpm typecheck |
0 | tsc --build |
Do not merge. Do not deploy.
* feat(typo): identité IgnitionAI auto-hébergée (#82) Co-authored-by: Fulgrim <fulgrim@ignition.local> * fix(typo): aligner les alias next/font et les fichiers (#83) Co-authored-by: Fulgrim <fulgrim@ignition.local> * fix(typo): espacer le texte courant (#84) Co-authored-by: Fulgrim <fulgrim@ignition.local> * feat(space-dock): integrate demo, tutorial (FR/EN) and model licenses Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(space-dock): resolve visual test paths independently of cwd (#86) Read GLBs from the package via import.meta.url and write projection proofs under os.tmpdir so the 29 visual tests pass from the repo root and from the package without leaving untracked files. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com> * fix(space-dock): align license line and public demo copy Use the MIT copyright line from dev for the root and package licenses, the model license and ASSETS.md. Replace internal wording in the demo header and page title. * fix(ci): alias @ vers packages/web dans le vitest racine registry.test.ts (demo-space-dock) importe packages/web/components/demos.tsx, qui utilise @/lib/blog. L'alias n'existait que dans la config du package, d'où l'échec de test (20)/(22). Une ligne de config, aucun test ni code applicatif touché. vitest racine : 599/0 (avant : 598, 1 fichier KO). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Fulgrim <fulgrim@ignition.local> Co-authored-by: IgnitionAI <noreply@ignitionai.fr> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com> Co-authored-by: Salim <salim-laimeche@users.noreply.github.com> Co-authored-by: khayon <khayon@ignitionai.local>
…ie identique (#94) * perf(space-dock): weld GLB vertices, identical geometry Merge bitwise-identical vertices with gltf-transform weld 4.5.1. Models drop from 4,792,364 to 1,432,152 bytes; triangles, meshes, materials, node graph and animation data are unchanged. Update the frozen hangar hash and byte totals in the visual test and validation.json. * docs(space-dock): update GLB sizes and hashes after weld --------- Co-authored-by: Salim <salim-laimeche@users.noreply.github.com>
…+ agent pré-entraîné (#96) * build(demo-space-dock): wire workspace TF.js backend without new npm packages Adds @ignitionai/backend-tfjs (workspace) and @tensorflow/tfjs (4.22.0, already locked for other demos) to the dock demo, with the same source aliases as demo-ball-thrust. Lockfile diff is limited to the importer entries. Drops an unused type import in backend-tfjs/src/defaults.ts so the demo's strict tsc (noUnusedLocals) can typecheck the backend sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(demo-space-dock): DockTrainingEnv, bounded reward and seeded episodes for DQN Wraps SpaceDockEnv (physics unchanged) as a TrainingEnv: 26 normalized observations, 8 discrete actions, dense reward clipped to [-1,1] plus collision/terminal terms (bounds [-12, 11]), success/collision/bounds as termination, 300-decision horizon as truncation, deterministic seed sequence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(demo-space-dock): in-browser DQN training panel and greedy agent mode TrainingSession (IgnitionEnvTFJS + DQNAgent, CPU backend) runs time-boxed chunks so rendering continues; start/pause/resume/reset, real Keras loss, moving-average reward curve, docking success rates, greedy inference, tfjs JSON export/import. DockRuntime yields the shared world while the network drives; manual and scripted PD remain available. TF.js loads in a lazy chunk after the scene. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(space-dock): list DQN in the catalogue and add a short training section FR/EN demos.json algos become "DQN · Manuel · PD non entraîné"; blog metadata and both tutorials describe the in-browser DQN (environment, reward, episode, controls) without any convergence figure. Registry test also requires DQN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(demo-space-dock): keep the cadence selector inside the panel on narrow screens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(demo-space-dock): training recipe that docks: curriculum starts, potential shaping Measured headless (seed 118, 20 greedy episodes every 2,000 steps): the first recipe never docked in 40,000 steps. This one (training-only curriculum of starts at rest on the docking axis 0.5-13 m from the dock, potential-difference shaping, epsilon decay 0.9999, target update 1000) reached 20/20 from the standard start at 32,000 steps; rerun bit-identical. Physics, actions and the IGN-118 docking criterion are unchanged; SpaceDockEnv.placeOnAxis only places the pair before the first step. Watching always uses the standard start. Session can import a shipped model with a validated provenance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(demo-space-dock): optional agent pre-trained offline, with measured provenance "Charger un agent pré-entraîné" lazy-loads src/pretrained/space-dock-dqn.json (36 KB, tfjs JSON): 32,000 DQN steps with the a07d1d7 recipe, seed 118, reproduced bit-identically; 50/50 greedy dockings from the standard start on unseen seeds (50000...), mean final distance 0.29 m. The panel shows that provenance from the file; a visitor's own import never does. Live training and Reset network stay available. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(space-dock): curriculum, measured offline results and pre-trained agent FR/EN Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(demo-space-dock): French decimal separator in the pre-trained provenance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(space-dock): use the sourced in-browser throughput (65-104 steps/s), fix FR comma Replaces the unsourced ~100 steps/s figure and the unproven 'slower with the scene' claim with Talos's acceptance measurement (local prod build, Chromium, with the scene). The five-minute minimum follows from 32,000 / 104. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: khayon <khayon@ignitionai.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…tiel » non prouvé retiré (#99) * docs(space-dock): restore technical-mockup notice, fix EN comma, drop unproven "potential" claim Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: relancer la CI (ppo.test.ts convergence instable, sans lien avec ce correctif de texte) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: khayon <khayon@ignitionai.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Add the Agent Skill that walks a beginner through the CartPole docs Quickstart, bounds the DQN loop with stop(), and indexes all nine skills from issue #102. Include a measured example plus tests. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Add the Agent Skill for writing a valid TrainingEnv, plus a 1D LineWorld example and tests that exercise validation, terminated vs truncated, and a declared-budget qtable run on three seeds. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Teach algorithm choice, train/stop/setSpeed, and measured Q-Table vs random on GridWorld with declared seeds and budget. Examples live under examples/skill-train*. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Document train vs infer on IgnitionEnv, freeze-and-reload greedy actions, and tensor dispose with a real CartPole example (no package code changes). Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Add the Agent Skill, CartPole evaluate() helper, and tests for reproducible greedy eval, frozen weights, hand-checked stats, and a random baseline. No package API changes. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
* docs(skills): add ignition-export-onnx skill and example Add the Agent Skill for exporting a TF.js DQN policy to ONNX and serving it with OnnxAgent, plus a Vitest example that trains on declared seeds without claiming convergence. Python conversion is skipped unless the pinned toolchain is present. Co-authored-by: Salim <salim4n@users.noreply.github.com> * test(skills): run real TF.js to ONNX conversion when the venv exists Probe .venv-onnx / IGNITION_ONNX_PYTHON for tensorflowjs, tf2onnx, and onnxruntime. Convert the saved DQN for seeds 7, 13, and 29 and compare Q-values and greedy actions. Skip only if that toolchain is missing. Document the uv/pip install commands in the skill. Co-authored-by: Salim <salim4n@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
…parison (#117) Teach potential-based reward shaping as a TrainingEnv wrapper, with hand-calculated transition tests and a declared-budget flag-success comparison on stock MountainCar (sparse vs shaped). Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Add an Agent Skill that maps training symptoms to checks on the public IgnitionRL API, plus a CartPole example that records a declared-budget flat-reward failure and tensor-count stability across three seeds. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Teach save/load, checkpoint versioning, and resume via getState/setState using the published storage providers. Includes a Node localStorage polyfill and a measured DQN round-trip example. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
Move executable examples next to each SKILL.md, drop internal SHA and unmerged-PR wording in favor of @ignitionai/* 0.1.0, and document the exact ONNX conversion prerequisites. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Salim <salim4n@users.noreply.github.com>
The core IgnitionEnv has no algorithm factories, so train('dqn') threw
'Unknown algorithm "dqn"' on mount and the page stayed blank. The
backend-tfjs export registers the TF.js factories.
- vite.config.ts honours DEMO_BASE like the other demos. - PPO manifest, logs and checkpoints resolve against import.meta.env.BASE_URL (ppoArtifactUrl), as do the links between the DQN page and the replay. - The replay page uses the demo i18n (stored choice, then browser language): every visible string has en/fr keys, html lang and title follow the language, decimals use a comma in French, FR/EN switcher in the header. - Missing artifacts raise typed errors so the message can be localized; missingArtifactMessage keeps its English text. - Add the site favicon to both pages so no favicon request 404s.
Builds it into /demos/target-chasing/ with build-demos, which publishes the PPO before/after replay at /demos/target-chasing/ppo.html.
PPO_DEFAULTS now carries actionSpace: 'discrete' (backward compatible). Align the skill tests and document the key in SKILL.md and references/hyperparameters.md.
IGN-170. Draft onto
devonly — do not merge, do not deploy.Base / head
dev:28c6420b4aadcef4a6d5705ff7ccf479327c21a157e49c46865c663263d4a8622dcd8225ec62f7b5(cursor/rl1-ppo)public/ppo/manifest.json):6c8b35c3bd598f1f9971bb4fee4ddd2c604c6111Recette 13/11 — what changed
node scripts/train-ppo-nav1d.mjsexits 0 after build.packages/backend-tfjs/scripts/. Addedscripts/train-ppo-nav1d.mjsat the repo root (imports the package script).ERR_MODULE_NOT_FOUND …/dist/agents/dqn. Cause:tsc(module: ESNext) emitted extensionless ESM (export … from './agents/dqn'). Node 22 treats that as ESM and requires./agents/dqn.js. Relative imports inpackages/coreandpackages/backend-tfjsnow use.jsspecifiers; both packages set"type": "module". Verified bypackages/backend-tfjs/test/ppo-node-dist.test.ts(Nodeimportofdist/index.js).gitSharule (self-reference is impossible). Training writesgit rev-parse HEADat run time (6c8b35c3…). The commit that stores the file cannot also be that SHA. After the artifacts commit:jq -r .gitSha packages/demo-target-chasing/public/ppo/manifest.json→6c8b35c3bd598f1f9971bb4fee4ddd2c604c6111git log -1 --format=%P -- packages/demo-target-chasing/public/ppo/manifest.json→6c8b35c3bd598f1f9971bb4fee4ddd2c604c6111git rev-parse HEAD(tip) →57e49c46865c663263d4a8622dcd8225ec62f7b5— not equal, by construction. Rule also stored asmanifest.gitShaRule.formatPpoReturn(toFixed(4)), so-1.2500000000000002renders as-1.2500. Covered bypackages/demo-target-chasing/test/ppo-artifacts.test.ts.Commands (executed; stdout/stderr in
evidence/ign-170/; never marked pass if not run)Node v22.23.4, pnpm 10.8.0.
corepack pnpm install --frozen-lockfilecorepack pnpm --filter @ignitionai/core buildthen--filter @ignitionai/backend-tfjs buildnode scripts/train-ppo-nav1d.mjs(repo root)25-train-root.txtnode ./scripts/train-ppo-nav1d.mjs(cwdpackages/backend-tfjs)26-train-package.txtRUN_PPO_EVAL=1 corepack pnpm exec vitest run packages/backend-tfjs/test/ppo-eval-checkpoint.test.ts27-eval.txtcorepack pnpm exec vitest run …/ppo.test.ts …/ppo-public.test.ts …/ppo-bootstrap.test.ts …/ppo-node-dist.test.ts28-vitest-declared-ppo.txtcorepack pnpm --filter target-chasing build29-demo-build.txtcorepack pnpm test30-pnpm-test.txtcorepack pnpm typecheck31-typecheck.txtRoot train last lines (
25-train-root.txt):Package train (
26-train-package.txt): samegitSha/selectedSeed: 29/EXIT:0.Architecture (unchanged)
PPO-Clip behind
PPOAgent. Discrete default; continuous = diagonal Gaussian in tanh space. Demo seed = max greedy gap (29). Missing artifacts →PPO checkpoint/log absent: ….Verified / not verified / reported
Verified: Node trainer exit 0 from root and package after build;
dist/ESM import; gitSha = first parent of the manifest commit; formatPpoReturn; targeted PPO tests;pnpm test569 passed; target-chasing build; typecheck 0.Not verified: Playwright / browser recapture (playwright-core not installed in this environment); GitHub Actions on this head; merge/deploy.
Reported:
gitShacannot equal the tip commit that containsmanifest.json. Recette must compare gitSha to the first parent of the last commit that touches that file, not toHEADafter later evidence-only commits.Limits
80 short 1-D episodes are not a benchmark. Seeds 11 and 47 already greedy-right before training (gap 0); seed 29 is the before/after trajectory. Checkpoints omit Adam state.
Relecture locale before merge. Do not merge. Do not deploy. Never
main.