Skip to content
Raul Montoya Cardenas edited this page Jul 29, 2026 · 3 revisions

UDP IPC

Wiki hero

Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)

Non-blocking UDP JSON messages (no newlines required). Default bind 127.0.0.1:9898.

Message types

Stimuli

Drive the network input vector (clamped / truncated to num_channels).

{"type":"Stimuli","values":[0.5, -0.2, 0.0, 1.0]}
  • Values beyond channel count are truncated.
  • Applied before the next network.step.

LearningReward

Apply neuromodulator deltas (negative deltas ignored for dopamine/cortisol paths — see tests).

{"type":"LearningReward","dopamine_delta":0.3,"cortisol_delta":0.2}

GetNeuroState

Request a JSON snapshot of neuromodulator levels and spike count (response sent to the requester).

{"type":"GetNeuroState"}

Behavior notes

  • Invalid / empty JSON does not panic (ignored).
  • Empty receive queue → no-op for that tick.
  • Handled in process_udp_messages on the main loop path.

Related tests

src/main.rs tests: stimuli clamp/truncate, reward deltas, GetNeuroState fields, invalid JSON, empty queue.


Last updated: July 29, 2026 Updated by: Grok Build: Grok 4.5 Package tip reference: e09cd4a (main) Devin DeepWiki: commit e09cd4a · thalamic-relay

Clone this wiki locally