How arnofeinstein/neurofeedback-task works
This MATLAB project develops a macaque behavioral task offline, then provides a thin MonkeyLogic execution scaffold. The principal task workflow generates trial conditions, applies a rule to the sample direction, evaluates the response, and can simulate trials or sessions. The MonkeyLogic branch prepares trials and placeholder task objects for a timing-file skeleton, then maps outcomes into behavioral fields. A separate documented flow-and-export capability builds flow specifications, schemas, tables, validation, and exports. Relationships are limited to those stated in the README; source excerpts were unavailable, so internal call chains are not asserted.
Main entry points: simulate_trial.m Trial simulation · sessionlog_to_table.m Session table · transform_rule.m Rule transform · simulate_session.m Session simulation
Components 24
Core task logic
- Task parameters
core/default_params.m - Trial generation
core/build_trial_table.m - Rule transform
core/transform_rule.m - Choice evaluation
core/evaluate_choice.m - Angle geometry
core/angle_to_xy.m - Default agent
core/default_agent.m
Offline simulation
- Trial simulation
core/simulate_trial.m - Session simulation
core/simulate_session.m
MonkeyLogic scaffold
- Mode userloop
ml/userloop.m - Trial preparation
ml/ml_prepare_trial.m - Task objects
ml/ml_taskobjects_for_trial.m - Timing skeleton
ml/tf_rule_rdk.m - Outcome mapping
ml/ml_log_trial_result.m
Flow and export
- Timing blueprint
ml/build_timing_blueprint.m - Error blueprint
ml/build_error_blueprint.m - Trial flow spec
ml/build_trial_flow_spec.m - Trial flow runner
ml/run_trial_flow.m - Session flow runner
ml/run_session_flow.m - Behavior schema
ml/build_behavior_schema.m - Session table
ml/sessionlog_to_table.m - Table validation
ml/validate_session_table.m - CSV export
ml/export_session_csv.m - Final export
ml/final_export_pipeline.m
Other components
- Task developer
Connections 17
- Task developer → Trial simulation: runs offline
README.md - Task developer → Session simulation: runs offline
README.md - Task developer → Mode userloop: runs scaffold
README.md - Trial generation → Rule transform: trial logic
- Rule transform → Choice evaluation: rule result
- Trial simulation → Choice evaluation: evaluates response
- Session simulation → Trial simulation: simulates trials
- Mode userloop → Trial preparation: prepares trial
README.md - Trial preparation → Task objects: builds objects
- Task objects → Timing skeleton: provides placeholders
README.md - Timing skeleton → Outcome mapping: maps outcomes
README.md - Trial flow runner → Trial flow spec: uses specification
- Session flow runner → Trial flow runner: runs trial flow
- Session table → Behavior schema: aligns fields
- Table validation → Session table: validates table
- CSV export → Session table: exports table
- Final export → CSV export: final export