Skip to content

feat: real-worm behavioural-thermotaxis validation (T7, second modality — honest PARTIAL) - #269

Merged
chrisjz merged 8 commits into
mainfrom
feat/realworm-thermotaxis-validation
Jul 6, 2026
Merged

feat: real-worm behavioural-thermotaxis validation (T7, second modality — honest PARTIAL)#269
chrisjz merged 8 commits into
mainfrom
feat/realworm-thermotaxis-validation

Conversation

@chrisjz

@chrisjz chrisjz commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

A second real-worm behavioural-validation modality (thermotaxis), extending the archived realworm-behavioural-validation capability from Logbook 035. Non-gating — Gate 3 G3.d stands on chemotaxis; 035 remains the strong, complete validation of record. This is an honest partial / behavioural-difference result (Logbook 036).

Result (MLP, n=4, faithful linear-gradient Tc-seeking assay)

Statistic Klinotaxis cell (head-sweep) Derivative control (no head-sweep)
Weathervane (Îļ-free) +0.020 [+0.010, +0.031] @95% — all 4 seeds positive +0.000 [−0.013, +0.013]
Klinokinesis (ratio) 1.015 / 1.006 (ABSENT) 0.959 / 0.983 (ABSENT)
  • Weathervane reproduced — weakly but robustly, and sensor-driven. Significant at 95% CI, stable across Îļ / tail-window / leave-one-out (but ~5× weaker than chemotaxis's +0.09). The derivative-sensing specificity control collapses it to +0.000 (leave-one-out confirms it's not the one failed seed) — so it's a genuine sensor-driven signal.
  • Klinokinesis absent in both sensing modes. Unlike 035 (where the food-derivative control elicited it), the thermal-derivative control does not.

Why — a genuine behavioural difference (motivates Phase 7)

The substrate reproduces the spatial-steering half of thermotaxis but not the biased-random-walk, for two principled reasons, reported rather than engineered around:

  1. State-independent action std — the MLP-PPO continuous head can't modulate turn randomness by state, so true stochastic klinokinesis is out of reach (this sharpens 035 too: its "klinokinesis" is a deterministic reorient-when-worse).
  2. Migrate-and-park, not isothermal-tracking — temperature isn't consumable (unlike food), so thermotaxis converges to a static endpoint; the fine-grained bias lives only in the brief migration phase.

Method notes / integrity

  • Setpoint-drive capture reuses the 035 metric/grading/harness unchanged (drive = −|T−Tc|, toward-comfort direction), gated by capture_behaviour_modality (default food → byte-identical). Thermal references are sign-only (Luo et al. 2014 primary; magnitudes not literature-comparable).
  • A radial "comfort-spot" geometry was tried and rejected as assay-shopping — it gave a stronger signal, but a point-source attractor is chemotaxis geometry; the reference assays are linear gradients.
  • Latent bug fixed in the shared curving-rate floor — it collapsed when the worm parks, inflating the weathervane to a creep artifact (a smoke read +12.8, ~99% artifact). Fixed to fall back to the moving-stride scale with 035 preserved byte-identical (its foraging worm moves continuously). Regression test added.

Testing

  • uv run pytest -m "not nightly" → 4138 passed, 1 skipped, 2 xfailed
  • pre-commit run -a green · openspec validate --strict valid · change archived (capability spec +4 requirements)

Post-review hardening (last commit)

A branch review surfaced two wrong-modality footguns, now fixed to fail loud: load_bias_signatures raises on an unknown modality (was silently grading against food refs); run_simulation warns when capture_behaviour_modality: thermotaxis runs with thermotaxis disabled. + a test for the T>Tc toward-comfort flip.

ðŸĪ– Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added end-to-end thermotaxis behavioural validation support with a modality selector and thermotaxis-specific reference signatures.
    • Introduced new thermal-foraging thermotaxis scenario configurations and updated the corresponding validation experiment log(s) and documentation.
  • Bug Fixes
    • Improved robustness of minimum path-length estimation for near-parked trajectories.
    • Added a warning (and fallback) when thermotaxis capture is enabled but thermotaxis sensing isn’t available.
  • Tests
    • Added coverage for thermotaxis behaviour capture, thermotaxis bias-signature loading, and path-length robustness.

chrisjz and others added 7 commits July 6, 2026 20:38
A second, non-gating real-worm behavioural-validation arm folded into Phase 6a
before the T9a synthesis: extend the Logbook-035 chemotaxis validation to
thermotaxis (a MUST behaviour) so the biologically-validated-substrate claim
spans modalities. Reuses the 035 capture/metrics/grading/harness with a
homeostatic-setpoint covariate (thermal error toward the comfort band). MLP
primary + connectome companion, n>=8, behaviour-level reference (Ryu & Samuel
2002; thermal klinotaxis). Direct doc task under phase6-tracking, no new
OpenSpec change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
â€Ķ(capture + reference)

Author the OpenSpec change (course-corrected from the initial "no change" call:
this extends the archived realworm-behavioural-validation capability with a new
capture modality + thermal reference — real capability code — so it warrants a
reviewed change). Self-reviewed via nematode-review-spec; fixed the citation
(Luo et al. 2014 primary), the D5 specificity-control claim (thermotaxis_mode:
derivative IS the analogue of 035's food-derivative control), and the tracker
note (now points at this change, sign-only references).

§1 capture modality (byte-identical when food):
- SensingConfig.capture_behaviour_modality: food | thermotaxis (default food).
- Agent _behaviour_capture_fields helper: food returns today's values; thermotaxis
  returns the homeostatic setpoint drive -|T - Tc|, its one-step derivative, and
  the live toward-comfort direction — so the existing bias-curve metrics apply
  unchanged. Tests: food byte-identical; thermotaxis records the setpoint drive +
  live thermal gradient.

§2 thermal reference + modality-aware loading + harness flag:
- data/thermotaxis/behavioural_bias_signatures.json (four sign-only statistics;
  Luo 2014 / Ryu & Samuel 2002 / Clark 2007) + _default_bias_signatures_thermotaxis
  fallback + load_bias_signatures(modality=...); explicit missing path still raises.
- Harness --modality food|thermotaxis grades against the modality reference set +
  records the modality in the summary. Tests for the thermotaxis reference set.

Remaining (under the change): §3 thermotaxis-dominant config → §4 smoke (PAUSE) →
§5 panels → §6 logbook 036.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Audit of the thermotaxis eval (verifying no bugs before the panel) exposed a
latent bug in the committed curving-rate floor: `suggest_min_path_len` uses
0.25x the median stride, which collapses toward 0 when the worm PARKS (a
converged thermotaxis worm dwelling at its comfort target — median stride
0.008mm, 74% of steps <0.1mm). The collapsed floor let the dtheta/path_len creep
artifact through and inflated the weathervane wildly (a smoke read +12.8, ~99%
artifact; the true slope is ~+0.2-0.5).

Fall back to the median *moving* stride (strides above 0.1x the max) only when
the raw median has collapsed below that fraction of the max — so a
continuously-moving worm (e.g. all of 035's foraging arms) keeps the raw-median
floor byte-identical (verified: the three 035 panel JSONs regenerate with
unchanged values), while a parked worm floors at the true stride scale.

035 wasn't affected in-flight because its foraging worm moves continuously
(median stride ~1mm); thermotaxis exposed the fragility. Regression test added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
â€ĶIAL)

Second real-worm validation modality (non-gating). On the faithful
linear-gradient Tc-seeking assay (MLP, n=4): the thermotaxis WEATHERVANE is
reproduced weakly but robustly (theta-free slope +0.020, 95% CI [+0.010,+0.031],
all seeds positive, ~5x weaker than chemotaxis) and a derivative-sensing
specificity control confirms it is sensor-driven (collapses to +0.000). Thermal
KLINOKINESIS is ABSENT in both sensing modes — the substrate reproduces the
spatial-steering half of thermotaxis but not the biased-random-walk, because the
continuous-Gaussian head has a state-independent std (can't stochastically
random-walk; sharpens 035 too) and the RL worm migrates-and-parks rather than
isothermal-tracks (temperature isn't consumable -> static endpoint). A genuine
behavioural difference motivating Phase 7; chemotaxis (035) remains the strong
validation of record.

Logbook 036 + supporting artefacts (2 per-arm JSONs + 2 figures), README row,
T7.validation.thermotaxis ticked, the two validation configs, the
capture_behaviour_modality + --modality docs in AGENTS.md, and the change
design/tasks updated to the honest scope (radial-spot geometry rejected as
assay-shopping).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
â€Ķtring; JSON eof

Full pre-commit run -a caught two over-length lines (the capture_behaviour_modality
comment + a thermotaxis reference-test docstring) and normalised the two 036
supporting JSONs' end-of-file. No behavioural change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Change complete: thermotaxis capture modality + thermal reference + harness
--modality merged into the realworm-behavioural-validation capability (+4
requirements). All §1-§7 task boxes ticked. Result: Logbook 036 (weathervane
weakly reproduced + sensor-driven; klinokinesis absent — a behavioural
difference). Archived to 2026-07-06-add-realworm-thermotaxis-validation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Branch-review findings (fail-loud instead of silent-wrong):

- load_bias_signatures(modality=...) now raises ValueError on an unknown
  modality instead of silently falling back to the FOOD references (which would
  grade thermotaxis captures against Pierce-Shimomura ranges + wrong citations).
- run_simulation warns when capture_behaviour_modality=thermotaxis but
  thermotaxis is disabled (the capture would silently fall back to the food
  drive, recording a non-thermotactic trajectory).

Tests: the toward-comfort direction FLIP when T > Tc (the previously-untested
`else tgrad[1] + pi` branch — base above Tc); the unknown-modality raise.

Also verified in review (no change needed): capture math exact; food-modality
byte-identical; thermotaxis JSON matches the hardcoded fallback (no drift);
configs parse; no planning-label refs in the new code. The floor's fully-parked
edge (no stride > 0.1x max) is latent + unreachable in practice (a never-moving
worm yields no measurable curving) — noted, not fixed.

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

coderabbitai Bot commented Jul 6, 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: 87b348b0-ce33-409f-a30a-71bbd57614c3

ðŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between b51d165 and 16803e3.

📒 Files selected for processing (4)
  • docs/experiments/logbooks/036-realworm-thermotaxis-validation.md
  • packages/quantum-nematode/quantumnematode/agent/agent.py
  • packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py
  • packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py
  • packages/quantum-nematode/quantumnematode/agent/agent.py
  • packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py
  • docs/experiments/logbooks/036-realworm-thermotaxis-validation.md

📝 Walkthrough

Walkthrough

Adds thermotaxis behavioural capture alongside chemotaxis, with modality-aware thermotaxis references, grading, scenario configs, OpenSpec/spec updates, and logbook/tracker documentation. It also hardens path-length estimation for parked trajectories and adds tests for the new modality paths.

Changes

Real-worm behavioural-thermotaxis validation

Layer / File(s) Summary
Capture modality and agent fields
packages/quantum-nematode/quantumnematode/utils/config_loader.py, packages/quantum-nematode/quantumnematode/agent/agent.py, packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py, scripts/run_simulation.py
Adds capture_behaviour_modality (food/thermotaxis) to SensingConfig; agent capture now switches between food-derived fields and thermotaxis setpoint-drive fields; tests cover thermotaxis capture behavior; simulation warns when thermotaxis capture is requested without thermotaxis enabled.
Thermotaxis references and curve floor
data/thermotaxis/behavioural_bias_signatures.json, packages/quantum-nematode/quantumnematode/validation/datasets.py, packages/quantum-nematode/tests/quantumnematode_tests/validation/test_bias_signatures.py, packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py, packages/quantum-nematode/tests/quantumnematode_tests/validation/test_behavioural_curves.py
Adds sign-only thermotaxis bias signatures, modality-aware reference loading and fallback behavior, and a parked-stride safeguard in suggest_min_path_len with regression coverage.
Analysis harness modality flag
scripts/analysis/behavioural_chemotaxis_validation.py, AGENTS.md
Adds a --modality CLI option and summary output support so grading can use the selected reference set, and updates the command guidance to show thermotaxis validation usage.
Thermotaxis scenario configs
configs/scenarios/thermal_foraging/mlpppo_small_continuous2d_thermotaxis_seeking_derivative.yml, configs/scenarios/thermal_foraging/mlpppo_small_continuous2d_thermotaxis_seeking_klinotaxis.yml
Adds two continuous-2D thermal-foraging scenario YAMLs that enable thermotaxis sensing, capture, and comfort/discomfort reward shaping.
OpenSpec and spec updates
openspec/changes/archive/2026-07-06-add-realworm-thermotaxis-validation/*, openspec/specs/realworm-behavioural-validation/spec.md
Adds archived proposal, design, task, and spec documents, and updates the live validation spec to define thermotaxis modality capture, reference loading, and grading requirements.
Logbook and tracker updates
docs/experiments/logbooks/036-realworm-thermotaxis-validation.md, docs/experiments/logbooks/supporting/036-realworm-thermotaxis-validation/*.json, docs/experiments/README.md, openspec/changes/phase6-tracking/tasks.md
Adds Logbook 036, supporting curve JSON, an experiments README entry, and the phase6 tracker thermotaxis task row describing the recorded validation results.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • SyntheticBrains/nematode#42: Both PRs touch thermotaxis wiring in quantumnematode/agent/agent.py and related runtime behavior for thermotaxis state.
  • SyntheticBrains/nematode#87: Both PRs modify the shared sensing integration layer, including SensingConfig and agent plumbing used by capture behavior.
ðŸšĨ 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 clearly matches the PR’s main change: adding a second real-worm thermotaxis validation modality.
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.
âœĻ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧊 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/realworm-thermotaxis-validation

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

@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

ðŸ§đ Nitpick comments (3)
packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py (1)

242-261: 📐 Maintainability & Code Quality | ðŸ”ĩ Trivial | ⚡ Quick win

Add Parameters/Returns sections to the docstring.

The rewritten docstring is detailed but omits the NumPy-style Parameters/Returns sections (kin, fraction, and the float return aren't documented in that format), unlike load_bias_signatures elsewhere in this PR which follows full NumPy style.

📝 Proposed docstring structure
 def suggest_min_path_len(kin: Sequence[StepKinematics], fraction: float = 0.25) -> float:
     """Return a curving-rate displacement floor: ``fraction`` x the typical *moving* stride.
 
     Scale-free (data-driven): excludes creep/dwell steps whose tiny ``path_len`` would otherwise
     make ``dtheta / path_len`` explode. The scale is the raw median stride, EXCEPT when that median
     has collapsed below ``_MOVING_STRIDE_FRACTION`` of the largest stride — i.e. the worm parks (a
     converged thermotaxis worm dwelling at its comfort target) — in which case it falls back to the
     median of the *moving* strides so the floor stays at the true stride scale rather than letting
     the creep artifact through. A continuously-moving worm keeps the raw-median floor unchanged.
-    0.0 when there are no strides.
+
+    Parameters
+    ----------
+    kin : Sequence[StepKinematics]
+        Per-step kinematics to derive the stride-length scale from.
+    fraction : float
+        Multiplier applied to the derived stride scale.
+
+    Returns
+    -------
+    float
+        The suggested minimum path-length floor, or ``0.0`` when there are no usable strides.
     """
ðŸĪ– Prompt for 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.

In `@packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py`
around lines 242 - 261, The docstring for suggest_min_path_len is missing
NumPy-style Parameters and Returns sections. Update the existing docstring to
document kin, fraction, and the float return value in the same style used by
load_bias_signatures, while keeping the current explanatory text intact.
packages/quantum-nematode/quantumnematode/agent/agent.py (1)

983-1002: 📐 Maintainability & Code Quality | ðŸ”ĩ Trivial | ⚡ Quick win

Add NumPy-style Parameters/Returns sections to the docstring.

The docstring documents the return semantics via prose but omits the standard Parameters / Returns sections for the 6 parameters and returned tuple.

As per coding guidelines, "Write NumPy-style docstrings in Python code."

📝 Proposed docstring fix
     def _behaviour_capture_fields(  # noqa: PLR0913
         self,
         sensing: SensingConfig,
         temporal: dict,
         food_grad_dir: float,
         food_grad_strength: float,
         sensing_pos: tuple[float, float],
         temperature: float | None,
     ) -> tuple[float, float, float, float]:
         """Return the captured drive fields, selected by ``capture_behaviour_modality``.
 
-        The tuple is ``(drive, drive-derivative, toward-drive direction, gradient strength)``:
+        Parameters
+        ----------
+        sensing : SensingConfig
+            Sensing configuration (reads ``capture_behaviour_modality``).
+        temporal : dict
+            Temporal sensing fields, used for the "food" fallback.
+        food_grad_dir : float
+            Live food-gradient direction (food modality only).
+        food_grad_strength : float
+            Live food-gradient strength (food modality only).
+        sensing_pos : tuple[float, float]
+            Position to sample the thermal gradient at (thermotaxis modality only).
+        temperature : float | None
+            Current temperature at the agent's position, if thermotaxis is enabled.
 
+        Returns
+        -------
+        tuple[float, float, float, float]
+            ``(drive, drive-derivative, toward-drive direction, gradient strength)``:
ðŸĪ– Prompt for 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.

In `@packages/quantum-nematode/quantumnematode/agent/agent.py` around lines 983 -
1002, Update the docstring for _behaviour_capture_fields to follow NumPy style
by adding explicit Parameters and Returns sections. Document all six inputs on
the method signature (self, sensing, temporal, food_grad_dir,
food_grad_strength, sensing_pos, temperature) and describe the returned 4-tuple
with its element meanings. Keep the existing behavioral description, but move
the prose into the structured returns/parameter entries so the docstring matches
the project’s Python docstring guidelines.
packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py (1)

100-129: 📐 Maintainability & Code Quality | ðŸ”ĩ Trivial | ⚡ Quick win

Duplicate agent/env/brain construction across both new tests.

Both tests repeat the same Continuous2DEnvironment + ConnectomePPOBrain + QuantumNematodeAgent boilerplate, differing only in ThermotaxisParams.base_temperature. Consider extending the existing _agent() helper to accept an optional thermotaxis param and capture_behaviour_modality.

Also applies to: 144-173

ðŸĪ– Prompt for 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.

In
`@packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py`
around lines 100 - 129, The new tests duplicate the same
`Continuous2DEnvironment`, `ConnectomePPOBrain`, and `QuantumNematodeAgent`
setup in `test_behaviour_capture.py`. Refactor the existing `_agent()` helper to
accept optional `thermotaxis` and `capture_behaviour_modality` parameters, and
have both tests call that helper instead of rebuilding the agent/env/brain
inline. Keep the differing `ThermotaxisParams.base_temperature` values as the
only per-test variation.
ðŸĪ– 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 `@docs/experiments/logbooks/036-realworm-thermotaxis-validation.md`:
- Around line 74-88: The Îļ-free confidence interval in the
weathervane/derivative-control summary is inconsistent with the supporting data.
Update the reported interval in this logbook entry where the thermal weathervane
collapse is described so it matches the `klinotaxis_all` values from
`derivative-control-curves.json` (the interval should reflect the rounded JSON
CI), and keep the surrounding `weathervane slope (Îļ-free)` / collapse wording
unchanged.

---

Nitpick comments:
In `@packages/quantum-nematode/quantumnematode/agent/agent.py`:
- Around line 983-1002: Update the docstring for _behaviour_capture_fields to
follow NumPy style by adding explicit Parameters and Returns sections. Document
all six inputs on the method signature (self, sensing, temporal, food_grad_dir,
food_grad_strength, sensing_pos, temperature) and describe the returned 4-tuple
with its element meanings. Keep the existing behavioral description, but move
the prose into the structured returns/parameter entries so the docstring matches
the project’s Python docstring guidelines.

In `@packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py`:
- Around line 242-261: The docstring for suggest_min_path_len is missing
NumPy-style Parameters and Returns sections. Update the existing docstring to
document kin, fraction, and the float return value in the same style used by
load_bias_signatures, while keeping the current explanatory text intact.

In
`@packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py`:
- Around line 100-129: The new tests duplicate the same
`Continuous2DEnvironment`, `ConnectomePPOBrain`, and `QuantumNematodeAgent`
setup in `test_behaviour_capture.py`. Refactor the existing `_agent()` helper to
accept optional `thermotaxis` and `capture_behaviour_modality` parameters, and
have both tests call that helper instead of rebuilding the agent/env/brain
inline. Keep the differing `ThermotaxisParams.base_temperature` values as the
only per-test variation.
🊄 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: f8d4bf16-c244-4dd1-a456-2d2ba9ae728a

ðŸ“Ĩ Commits

Reviewing files that changed from the base of the PR and between 330ad92 and b51d165.

⛔ Files ignored due to path filters (2)
  • docs/experiments/logbooks/supporting/036-realworm-thermotaxis-validation/klinotaxis-turn-rate-vs-dcdt.png is excluded by !**/*.png
  • docs/experiments/logbooks/supporting/036-realworm-thermotaxis-validation/klinotaxis-weathervane.png is excluded by !**/*.png
📒 Files selected for processing (24)
  • AGENTS.md
  • configs/scenarios/thermal_foraging/mlpppo_small_continuous2d_thermotaxis_seeking_derivative.yml
  • configs/scenarios/thermal_foraging/mlpppo_small_continuous2d_thermotaxis_seeking_klinotaxis.yml
  • data/thermotaxis/behavioural_bias_signatures.json
  • docs/experiments/README.md
  • docs/experiments/logbooks/036-realworm-thermotaxis-validation.md
  • docs/experiments/logbooks/supporting/036-realworm-thermotaxis-validation/derivative-control-curves.json
  • docs/experiments/logbooks/supporting/036-realworm-thermotaxis-validation/klinotaxis-curves.json
  • openspec/changes/archive/2026-07-06-add-realworm-thermotaxis-validation/.openspec.yaml
  • openspec/changes/archive/2026-07-06-add-realworm-thermotaxis-validation/design.md
  • openspec/changes/archive/2026-07-06-add-realworm-thermotaxis-validation/proposal.md
  • openspec/changes/archive/2026-07-06-add-realworm-thermotaxis-validation/specs/realworm-behavioural-validation/spec.md
  • openspec/changes/archive/2026-07-06-add-realworm-thermotaxis-validation/tasks.md
  • openspec/changes/phase6-tracking/tasks.md
  • openspec/specs/realworm-behavioural-validation/spec.md
  • packages/quantum-nematode/quantumnematode/agent/agent.py
  • packages/quantum-nematode/quantumnematode/utils/config_loader.py
  • packages/quantum-nematode/quantumnematode/validation/behavioural_curves.py
  • packages/quantum-nematode/quantumnematode/validation/datasets.py
  • packages/quantum-nematode/tests/quantumnematode_tests/agent/test_behaviour_capture.py
  • packages/quantum-nematode/tests/quantumnematode_tests/validation/test_behavioural_curves.py
  • packages/quantum-nematode/tests/quantumnematode_tests/validation/test_bias_signatures.py
  • scripts/analysis/behavioural_chemotaxis_validation.py
  • scripts/run_simulation.py

Comment thread docs/experiments/logbooks/036-realworm-thermotaxis-validation.md
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

â€Ķngs, test dedup

- pyright (the failing check): the T>Tc flip test compared get_temperature()
  (float | None) with `>`; coerce None -> 0.0. Type the _agent helper's
  capture_behaviour_modality as Literal["food","thermotaxis"] to match SensingConfig.
- Logbook 036: the Îļ-free weathervane CIs in the results table + the derivative
  collapse prose showed 95% bounds under an "80% CIs" table; corrected to the JSON
  80% CIs (MLP +0.020 [+0.013,+0.027]; derivative +0.000 [−0.008,+0.009]). The
  separately-labelled 95% claims in the prose are unchanged.
- NumPy-style Parameters/Returns on _behaviour_capture_fields and
  suggest_min_path_len (matching load_bias_signatures / the package's direction).
- Dedup the thermotaxis capture tests: _agent() now takes thermotaxis +
  capture_behaviour_modality; a _thermotaxis(base) helper leaves base_temperature
  as the only per-test variation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chrisjz
chrisjz merged commit 2235319 into main Jul 6, 2026
3 checks passed
@chrisjz
chrisjz deleted the feat/realworm-thermotaxis-validation branch July 6, 2026 14:07
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