Implement digit memory experiment with full closed-loop AutoRA integration #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements a complete digit memory experiment integrated into the closed-loop AutoSciDis workflow, replacing the previous dots comparison experiment with a cognitive memory task.
What's New
Digit Memory Experiment
The experiment measures participants' ability to remember sequences of digits:
Variables:
n_digits(3-9) - number of digits in sequenceaccuracy(0 or 1) - whether recall was correctKey Features
Implementation Details
Core Components
experiment_digit_memory.py(204 lines)trial_sequence(): Generates counterbalanced trials using SweetPea or balanced randomizationstimulus_sequence(): Compiles jsPsych JavaScript code for browser-based experimentpreprocessing.py(updated)digit_memory_to_experiment_data(): Converts raw trial data to analysis formatautora_workflow.py(adapted)Testing Zone (updated)
jsPsychSurveyHtmlFormplugin globally for experiment codeExample Usage
Data Flow
Testing
All components tested and verified:
Documentation
Migration Notes
The original dots comparison experiment files remain intact (
trial_sequence.py,stimulus_sequence.py). Users can switch between experiments by modifying imports inautora_workflow.py.Before:
After:
Deployment
Users need to:
firebase-service-account.json)npm install,pip install -r requirements.txt)firebase deploy)python autora_workflow.py)Statistics
Related Links
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.