| layout | default |
|---|---|
| title | I - CST Core |
| subtitle |
- CST builds cognitive architectures with small concurrent units called codelets and object memories.
- BabyBench is a Multimodal Benchmark of Infant Behaviors for Developmental Artificial Intelligence.
- In this session you will build a minimal CST pipeline:
Sensor → Processing → Actuator
The pipeline will:
- Read a value from BabyBench.
- Derive an observation.
- Send back an action.
The class that holds codelets and MemoryObjects (MOs), and schedules execution.
A small, periodic computation unit that runs its proc() method.
A shared data structure used to pass information between codelets.
Each codelet declares which MOs it reads and writes.
Each codelet has a time step (e.g., 200 ms) that controls how often it runs.
-
Sensory Codelet:
- Requests a reading from BabyBench.
- Writes an integer to
INPUT (MO).
-
Processing Codelet:
- Reads
SENSOR_DATA. - Applies a simple rule.
- Writes a boolean to
PROCESSED_DATA (MO).
- Reads
-
Actuator Codelet:
- Reads
PROCESSED_DATA. - Maps it to an action string.
- Writes the last action to
ACTION (MO). - Sends the action to BabyBench.
- Reads
The Mind keeps all three running in a loop, creating a continuous perception–action cycle.
-
accessMemoryObjects()
Get references to required MOs. -
calculateActivation()
Decide if the codelet should run.- In this exercise:
return 1.0(always run).
- In this exercise:
-
proc()
Contains the logic:- Sensor: socket I/O →
INPUT. - Processing: compute observation →
PROCESSING. - Actuator: choose action → send over socket →
OUTPUT.
- Sensor: socket I/O →
-
setTimeStep(ms)
Controls how often each codelet executes.- Start with 200 ms for all.
- Open a socket:
Socket("localhost", 5000)
- Send a one-line "READY".
-
Create the three MemoryObjects.
-
Connect each codelet’s inputs/outputs to them.
-
Send SENSE.
-
Read a line, convert to int.
-
Store new ValueHolder(int) in INPUT.
-
Read ValueHolder.
-
Compute boolean (e.g., value > 10).
-
Store in PROCESSING.
-
Read boolean from PROCESSING.
-
Map:
-
true → "PUSH"
-
false → "IDLE"
-
Send ACT:.
-
Store action in OUTPUT.
-
Java connects to Python and prints a “connected/ready” message.
-
SENSOR_DATA updates over time with integers from BabyBench.
-
OBS flips according to your rule (e.g., true when value > threshold).
-
ACTION records the last command, and BabyBench reacts when actions are sent.
-
Console shows a stable cycle: Sensor → Processing → Actuator (repeating without errors)
- Access VNC: "File System" > "sharevnc"
- Open a terminal
- Run script2.sh. It should start MIMo.
- Access the folder of the project in java:
1_CSTCore/1_MIMoCoreModel - Open a terminal
- To build:
javac -cp 'lib/*' -d build $(find src -name "*.java")
- To run:
java -cp "build:lib/*" cst_attmod_app.ExperimentMain
CST should start to run its codelets.
Sensor codelets should colect data from MIMo and write into memory.
Processing codelet should process memory objects.
Actuator codelet should sent an action based on processed memory.
-
Add confidence and timestamp to sensor readings: Give ValueHolder more semantics: include reading, confidence, and timestamp in a JSONObject.
-
Simulate noise and occasional dropouts: Allow parameters (noise, dropout probability) via constructor.
-
In SimpleMind, instantiate sensors with distinct parameters (even without changing the topology).
-
Apply a moving average filter to smooth sensor values and normalize readings into a 0–1 evidence scale. Convert value to a filtered evidence field — we also keep the composite confidence.
-
Introduce adaptive thresholds with hysteresis (stable labels).Produces a stable binary label (e.g., “HIGH”/“LOW”) from evidence.
-
Generate explainable outputs (logs + JSON with multiple fields) and explore how processed evidence changes actuator behavior.
-
Use a confidence-weighted decision rule (evidence × confidence). Act only when processed confidence supports the decision.
-
Implement a refractory period to avoid chattering. Avoid repeating identical actions in short time windows.
-
Store structured action objects in memory (should_act, intensity, reason). Send dual outputs: internal memory + external channel (e.g., socket/log). Compare stable vs. unstable actuator behavior under noisy inputs.