Skip to content

Commit f34fdd2

Browse files
galenlynchclaude
andcommitted
chore: trim redundant comments on the operant-abort PR
Per review feedback. Drop the InstantiateSite.bonsai location pointer after the abort_velocity_threshold field (its semantics live in the field description) and condense the 13-line inline block in _probability_grid_blocks to the stage-specific values plus the stop-threshold constraint; the parameter mechanics are already in make_patch's docstring and the field description. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 17293d4 commit f34fdd2

2 files changed

Lines changed: 4 additions & 16 deletions

File tree

  • src/packages
    • aind_behavior_vr_foraging_curricula/src/aind_behavior_vr_foraging_curricula/single_site
    • aind_behavior_vr_foraging/src/aind_behavior_vr_foraging

src/packages/aind_behavior_vr_foraging/src/aind_behavior_vr_foraging/task_logic.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ class OperantLogic(BaseModel):
216216
"by a GAIN updater) whereas this is a fixed absolute, only enable the velocity abort on stages where the "
217217
"stop threshold is already floored below it (e.g. a static stop threshold of 8 with this set to 15); never "
218218
"pair a low fixed abort with an actively-shaped, still-high stop threshold.",
219-
) # Implemented in InstantiateSite.bonsai as a third input merged ALONGSIDE the grace-distance and leave-site
220-
# sources (the CheckDistanceFromEntry groups under WaitDelay and WaitForLick), comparing
221-
# FilteredCurrentVelocity.Item1 -- the same signal used for stop detection -- against this value.
219+
)
222220

223221

224222
class _PatchUpdateFunction(BaseModel):

src/packages/aind_behavior_vr_foraging_curricula/src/aind_behavior_vr_foraging_curricula/single_site/stages.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,9 @@ def _probability_grid_blocks(
143143
) -> list[task_logic.Block]:
144144
"""The 13-block band: every grid (p_A, p_B) whose sum is allowed, plus the 5%
145145
no-reward distractor odor C (occupancy 0.475 / 0.475 / 0.05)."""
146-
# is_operant=True: on the grid stages, abandoning a wait forfeits the reward, so the
147-
# long delay is a real wait-or-abandon decision. The shaping stages stay non-operant.
148-
# abort_velocity_threshold=15 cm/s adds a velocity abort ALONGSIDE grace distance +
149-
# leaving the site. It catches slow-creepers who lick while drifting forward (e.g.
150-
# 860900: velocity stays <15 while engaged, ramps to ~45-55 to leave).
151-
# grace_distance_threshold raised to 50 cm (a full reward-site length, vs the 10 cm
152-
# default) so the spatial source does not also clip that creep -- here velocity and
153-
# leaving the site do the work, with grace only a far backstop.
154-
# The 15 sits safely above this stage's stop velocity threshold (a static 8 -- the grid
155-
# stages carry no STOP_VELOCITY_THRESHOLD updater, so the gate does not shape up into it).
156-
# abort_velocity_threshold must stay >= the stop threshold or a locked stop would instantly
157-
# abort; that is why the abort is off on learn_to_stop, where the gate is still shaping 60->8.
158-
# See OperantLogic.abort_velocity_threshold for the full interaction.
146+
# Grid stages are operant with a 15 cm/s velocity abort and grace raised to 50 cm (see
147+
# make_patch). 15 stays above this stage's static stop threshold of 8 (no
148+
# STOP_VELOCITY_THRESHOLD updater here) as OperantLogic.abort_velocity_threshold requires.
159149
make_patch_kwargs = {
160150
**_POST_STOP_PATCH_KWARGS,
161151
"delay": delay,

0 commit comments

Comments
 (0)