Skip to content

feat(configs): connectome C1 foraging config (Stage 2 step 2a) - #243

Merged
chrisjz merged 2 commits into
mainfrom
openspec/t7-connectome-c1-foraging
Jun 18, 2026
Merged

feat(configs): connectome C1 foraging config (Stage 2 step 2a)#243
chrisjz merged 2 commits into
mainfrom
openspec/t7-connectome-c1-foraging

Conversation

@chrisjz

@chrisjz chrisjz commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

The connectome arm's C1 (foraging-only) config — Stage 2 step 2a — completing C1 for all 5 MUST arms. Authored connectomeppo_small_continuous2d_fick_adaptive_klinotaxis.yml: the Cook-2019 hermaphrodite connectome (gap junctions + strict chemical mask + klinotaxis; projection wiring unchanged from T4-grid — validate-don't-rebuild) on the Fick+adaptive continuous substrate with the shared C1 recipe.

Recipe (shared with the generic arms)

max_steps 800 + forage-to-survive satiety (300/0.8/20) + gamma 0.99 + lr 0.0003 + entropy 0.05 + max_turn_rad 0.5, on the metric-coherent reward. Substrate: Fick 8 / adaptive Îĩ 0.1 / capture 2.0 / foods 5 / target 10.

Convergence (n=4, corrected reward)

100 / 100 / 100 / 100 per-seed success, eaten 10.0, holding across all quarters.

The connectome was the weakest arm at T4 and needed entropy 0.10 / lr 0.001 on the buggy reward — it needs no special tuning on the metric-coherent reward (the bug-era knobs were value-explosion compensation). So C1 is now complete for all 5 MUST arms: MLP ~99 / Transformer 100 / LSTM 100 / CfC ~91 / connectome 100.

Scope

  • New connectome C1 config (config + eval only; brain/projections/substrate already exist).
  • phase6-tracking Stage 2 step 2a recorded.
  • Remaining Stage 2: 2b isolated projection validation (predator-only + thermo-only), 2c connectome C2 (foraging + predator).

Full pre-commit run -a green.

ðŸĪ– Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a new continuous-action foraging scenario with adaptive chemical sensing on a static Fick-shaped gradient environment, using the C1 connectome setup and tuned PPO settings. Reported success is 100% across all validated runs.
  • Bug Fixes

    • Improved the foraging reward metric consistency across steps to prevent earlier recurrent-arm collapse and ensure stable convergence.
  • Documentation

    • Updated phase tracking to reflect completion of Stage 2 for the C1 step, including validation results and the finalized long-episode recipe.

â€Ķerges 100%

Authored connectomeppo_small_continuous2d_fick_adaptive_klinotaxis.yml: the Cook-2019
hermaphrodite connectome (gap junctions + strict chemical mask + klinotaxis, projection
wiring unchanged from T4-grid — validate-don't-rebuild) on the Fick+adaptive continuous
substrate with the shared C1 recipe (max_steps 800 / gamma 0.99 / lr 0.0003 / entropy 0.05
/ forage-to-survive satiety / max_turn 0.5).

n=4 on the corrected reward: 100/100/100/100 per-seed success (eaten 10.0, holds all
quarters). The connectome — weakest arm at T4, which needed entropy 0.10 / lr 0.001 on the
buggy reward — needs NO special tuning on the metric-coherent reward; the bug-era knobs were
value-explosion compensation. C1 is now complete for all 5 MUST arms.

phase6-tracking: Stage 2 step 2a recorded (connectome C1 100%); remaining Stage 2 = 2b
projection validation (predator-only + thermo-only), 2c connectome C2.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

â„đïļ Recent review info
⚙ïļ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 60dba950-5da8-4176-8899-2761e28cd4e4

ðŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between aca96de and cd2aa15.

📒 Files selected for processing (1)
  • openspec/changes/phase6-tracking/tasks.md
✅ Files skipped from review due to trivial changes (1)
  • openspec/changes/phase6-tracking/tasks.md

📝 Walkthrough

Walkthrough

Adds a new YAML scenario configuration for ConnectomePPO continuous-action klinotaxis foraging using the Cook-2019 hermaphrodite connectome with a Fick gradient and adaptive chemosensor. Updates the Phase 6 tracking document to mark Connectome C1 Stage 2 step 2a as complete with 100/100 per-seed success.

Changes

ConnectomePPO C1 Klinotaxis Config and Phase 6 Tracking

Layer / File(s) Summary
ConnectomePPO C1 klinotaxis scenario config
configs/scenarios/foraging/connectomeppo_small_continuous2d_fick_adaptive_klinotaxis.yml
Introduces a 97-line YAML scenario for ConnectomePPO C1 with Cook-2019 connectome topology, strict chemical masking, gap junctions, Gaussian action head, PPO hyperparameters (entropy_coef: 0.05, learning_rate: 0.0003), continuous_2d environment, adaptive fold-change chemosensor, and static Fick gradient geometry.
Phase 6 tracking: C1 completion and context
openspec/changes/phase6-tracking/tasks.md
Marks T7.*.c1_foraging complete for all 5 PPO arms and documents the root cause of earlier recurrent-arm collapse: reward-metric inconsistency (Manhattan vs. Euclidean). Records the fix (metric-coherent potential term) and validation results showing all generic arms at ~10/10. Marks Connectome C1 Stage 2 step 2a complete with 100/100 per-seed success using the Fick+adaptive continuous config with shared C1 recipe hyperparameters.

Estimated code review effort

ðŸŽŊ 2 (Simple) | ⏱ïļ ~12 minutes

Possibly related PRs

  • SyntheticBrains/nematode#242: Finalized the same "simplified C1" continuous-2D klinotaxis recipe parameters (entropy_coef: 0.05, learning_rate: 0.0003, constrained turning/satiety) that this PR adopts for ConnectomePPO.
  • SyntheticBrains/nematode#227: Calibrated the continuous 2D gradient_field_mode: fick and adaptive chemosensor parameters that this PR's new config consumes.
  • SyntheticBrains/nematode#230: Shares the same Manhattan-vs-Euclidean reward-distance/potential-metric correction that this PR documents as the root cause and fix for T7 continuous-substrate stability.

Poem

🐇 Hop, hop, through the gradient field I go,
The Fick-shaped signal tells me where the food will flow.
With epsilon and alpha tuned just right,
My connectome charts a klinotaxis flight.
100 seeds bloom, all munching well —
Stage 2a done! ✅ What a tale to tell!

ðŸšĨ Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(configs): connectome C1 foraging config (Stage 2 step 2a)' directly and clearly describes the main change: adding a new connectome C1 foraging configuration file that completes a specific stage/step in the project roadmap.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏ïļ Tip: You can configure your own custom pre-merge checks in the settings.

âœĻ Finishing Touches
🧊 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch openspec/t7-connectome-c1-foraging

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

ðŸĪ– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openspec/changes/phase6-tracking/tasks.md`:
- Around line 387-390: The T7.*.c1_foraging task checkbox is unchecked (- [ ])
but the resolution notes confirm C1 is complete for all 5 MUST arms (MLP,
Transformer, LSTM, CfC, and connectome). Change the checkbox from - [ ]
T7.*.c1_foraging to - [x] T7.*.c1_foraging to mark the task as complete and keep
the tracker state consistent with the documented completion status.
🊄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

â„đïļ Review info
⚙ïļ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7230df23-1069-4ff8-b9ca-e198af07d6ed

ðŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between 1343644 and aca96de.

📒 Files selected for processing (2)
  • configs/scenarios/foraging/connectomeppo_small_continuous2d_fick_adaptive_klinotaxis.yml
  • openspec/changes/phase6-tracking/tasks.md

Comment thread openspec/changes/phase6-tracking/tasks.md Outdated
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

ðŸ“Ē Thoughts on this report? Let us know!

â€Ķ arms (review)

All 5 continuous-action PPO MUST arms now converge C1 (MLP/Transformer/LSTM/CfC merged
in #242; connectome in this PR). Tick the checkbox to match the documented completion;
note the 6th MUST family (FeedforwardGA, evolved-weights / repair-or-drop) is outside
this PPO-config row.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chrisjz
chrisjz merged commit 6c51865 into main Jun 18, 2026
3 checks passed
@chrisjz
chrisjz deleted the openspec/t7-connectome-c1-foraging branch June 18, 2026 09:03
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