Skip to content

ctu-vras/mobile-paradigm-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

A computational model of infant sensorimotor exploration in the mobile paradigm

Usage

This is the code for the model described in the paper "A computational model of infant sensorimotor exploration in the mobile paradigm". As it is the model is set to use cpu, since it is rather light there shouldnt be a big difference but you can change it to use gpu as well. There is an option at the bottom to use console arguments which you have to set to true if you want to do so (Line 620). Examples of how we ran our experiments are also in the bottom of the file. Our standard was done like this:

runExperiment("standard",[1,1,1,True,600,0.3,0.3,False,0.1])

runExperiment uses the name to create a file where the run is recorded, here the name given would be "standard". Than we give parameters here in this case it is:

fatigue loss weight = 1

curiosity loss weight = 1

prediction loss weight = 1

use hidden layer = true

amount of motor commands = 600

baseline is centered at = 0.3

noise = 0.3

use equal distribution (motor commands to limbs) = False (so we use beta function)

novelty threshold = 0.1

The learning rate would default to 0.00075 in this case and we would not record. Should this be changed two more parts could be added to the command:

runExperiment("standard",[1,1,1,True,600,0.3,0.3,False,0.1],0.01,True)

If you did activate the command line argument the following arguments are available to set all these parameters, which will then be used directly:

--name, --fat, --cur, --pred, --hidd, --mus, --base, --noise, --equal, --nov, --lr, --rec

To run just go in to your directory with our code and do:

    python main.py

And if you activated the command line arguments:

    python main.py --name myOwnExperiment

Installation

We used python 3.9.15 You will need to install a few libraries to use this. You can either use conda or pip to install them.

Install pytorch with:

pip install torch.

(Newer versions should also work, but here we used 2.0.1)

Install pandas with :

pip install pandas.

(We used 1.5.3, again, newer versions likely work as well)

Install pytorch_lightning with:

pip install pytorch-lightning. 

(We used 2.1.0, again, newer versions likely work as well)

Install numpy with:

pip install numpy

(We used 1.22.4, again, newer versions likely work as well)

Install matplotlib with:

pip install matplotlib

(We used 3.7.1, again, newer versions likely work as well)

Apart from these modules only argparse and os are used which should already be available.

Once everything is installed and you have downloaded our code you should be able to run it. As of now one experiment with a standard configuration is not commented out. Once you want to do your own experiments you should comment or delete it and put in your own parameters.

Citation

Should you use our code in any way for your own work please consider citing our work:

    @article{spisak2025computational,
    title={A computational model of infant sensorimotor exploration in the mobile paradigm},
    author={Spisak, Josua and Popescu, Sergiu Tcaci and Wermter, Stefan and Hoffmann, Matej and O'Regan, J Kevin},
    journal={arXiv preprint arXiv:2504.17939},
    year={2025}
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages