courtois-neuromod / task_stimuli

psychopy scripts for stimuli presentations
MIT License
7 stars 15 forks source link

How to run videogame tasks? #39

Open man-shu opened 2 years ago

man-shu commented 2 years ago

Hello Neuromod people,

I am working on Individual Brain Charting (IBC) project, and we would like to implement your videogame protocols for our project. I was trying to figure out how it would work, but it seems certain ROM files are required for that? So if you could provide a walkthrough on how could one replicate your videogame tasks, it would be great!

I am looking forward to hearing from you!

Thanks!

bpinsard commented 1 year ago

Hi @man-shu, sorry for the delay. This repo is a datalad dataset that references the stimuli datasets as subdatasets such as this one https://github.com/courtois-neuromod/shinobi.stimuli. They replicate the structure of the gym-retro game folders but with a single game in each and are also submodules of the BIDS datasets. Once having installed this repo, you should be able to datalad get data/videogames/shinobi or other subdatasets with the game you want to be played.

For the task, there are hardcoded key mapping (keypresses to gym-retro inputs) that might not fit whatever apparatus you are using for your experiment. Also, when using outside of the MRI you can use regular USB joysticks and run AntimicroX to map from joystick inputs to keyboard events that the task software takes.

Finally, the session/study definition can be tweeked in a separate files (such as https://github.com/courtois-neuromod/task_stimuli/blob/main/src/sessions/ses-mario.py) where we load design/randomization and also manage savestates for multi-session design if necessary.

Let me know if that answers your questions and if you have any issue installing the datasets. Also, the ROM files in the datalad datasets are hosted on S3 which requires access. @pbellec @julieaboyle1, do you think IBC should apply to the databank in order to be given credentials ?

julieaboyle1 commented 1 year ago

Hi @man-shu , as Basile mentioned, you might wanna apply (meaning Bertrand) to apply to use the databank so you can have log in credentials (this would also eventually give you access to cneuromod videogame datasets, once we release it). That being said, sharing the stimuli files is not sensitive so I think we can also share without. But, we would need to know which videogame you are interested in - as mentioned in the email we have quite a few.

man-shu commented 1 year ago

Thanks for the detailed description, @bpinsard and @julieaboyle1 ! I will try running the task again and will let you know if I run into specific issues. But as far as I can remember, I was getting an error that said something along the lines of "missing ROM files" etc.

So for the ROM files, I think ideally (depending on how long each acquisition is) we would like to replicate all of the video games (maybe @bthirion can also chime in on this). But for now, we can start with the first one you implemented i.e. Shinobi. And once we have everything setup -- including the controllers -- we can move on to the next ones. So it would be great if you can share those files for Shinobi so that I can begin testing everything on our setup.

bpinsard commented 1 year ago

I would recommend skipping Shinobi, as this is not the optimal design for modelling, but was a good test case for our needs. Mario, mariostars and mario3 would be better choices, and you could of course subset the levels to match the scan time constraints.

julieaboyle1 commented 1 year ago

I agree with Basile.

man-shu commented 1 year ago

OK, that is good to know. Thanks a lot :)