Skip to content

Add cycle-by-cycle stepping and view updates for bg_action simulation - #3

Draft
frankmj with Copilot wants to merge 5 commits into
masterfrom
copilot/convert-bg-project-to-golang
Draft

frankmj with Copilot wants to merge 5 commits into
masterfrom
copilot/convert-bg-project-to-golang

Conversation

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown

The bg_action sim only updated the network view once per trial (after settling), making it impossible to observe activity dynamics within a trial. Additionally, the toolbar lacked stepping controls for interactive exploration.

Changes

  • Per-cycle view updates in AlphaCyc(): The inner cycle loop now conditionally calls UpdateView() based on a configurable TrainUpdt/TestUpdt time scale (Cycle, FastSpike, Quarter, Phase, AlphaCycle)
  • New Sim fields: ViewOn, TrainUpdt, TestUpdt — exposed in the GUI struct view so users can control update granularity at runtime. Defaults to leabra.Cycle
  • Stepping toolbar buttons: Added Step Trial, Step Epoch, Test Trial with proper UpdateFunc callbacks for enable/disable state tracking
  • Stopped() method: Toolbar buttons now correctly reflect running state via Stopped() pattern (matching other sims in this repo)
  • Fixed dependency version: Downgraded emergent from v1.4.31 to v1.3.53 — leabra v1.2.10 requires emergent v1.3.x (the v1.4.x series introduced breaking API changes to emer.Layer)

Usage

Set TrainUpdt or TestUpdt to Cycle (default), then click Step Trial to watch activities settle cycle-by-cycle in the NetView. Set to AlphaCycle for faster batch runs.

Copilot AI added 2 commits June 4, 2026 15:04
….proj

New ch8/bg_action/ package implementing a biologically realistic BG model
for the Probabilistic Selection task with:
- Full BG circuit: Go/NoGo, GPe, GPi, Thalamus, PMC, SNc
- Action selection via disinhibitory gating with cortical noise
- DA-modulated Go/NoGo learning (D1/D2 rules)
- Probabilistic reward delivery (80/20, 60/40)
- PD simulation via SNc unit reduction
- D2 agonist simulation
- Training/testing loops with logging and GUI
Copilot AI changed the title Add BG action selection simulation (BG_4s_inhib_PS_e7a.proj conversion) Fix emergent/leabra version incompatibility in ch8/bg_action Jun 4, 2026
Copilot AI changed the title Fix emergent/leabra version incompatibility in ch8/bg_action Add cycle-by-cycle stepping and view updates for bg_action simulation Jun 4, 2026
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.

2 participants