ANNUBS / neurogym

A curated collection of neuroscience tasks with a common interface.
MIT License
0 stars 0 forks source link

Add `shuffle_trials` functionality #23

Open gcroci2 opened 1 month ago

gcroci2 commented 1 month ago

We need to add the shuffle_trials functionality to the class/module we will develop.

gcroci2 commented 1 week ago

In the original annubes repo, we predefined the number of trials in a sequence, allowing us to directly create it (shuffled or not). However, in the current setup, we define a general environment where sequences are generated dynamically, with stimuli types shuffled by default based on probabilities at each trial.

While this isn't an issue for plotting (we can simply modify the plotting function if we want an unshuffled sequence), it presents a challenge for the learning process. To control the sequence during training, we would need to modify the step() method to track the number of steps, along with a counter that keeps track of the total steps required. I’m unsure how to implement this total step count effectively.

My main question is whether training an agent on non-shuffled trials (e.g., first 1000 visual stimuli trials, followed by 1000 auditory trials) is even necessary. Wouldn't it make more sense to train separate agents for each modality (visual and auditory)? If training a single agent on both modalities is desired, sequential training (first visual, then auditory) could be implemented, which aligns with the approach in #21.

Please let me know if replicating the original annubes behavior is essential @jfmejias, and we can explore it further.