A python library of code used for sensorimotor learning experiments with simulations, robots, etc. The basic idea is to generate states (sensors) with actions (motors), learn different predictive models from that data to approximate the sensorimotor dynamics and then use the models to infer future actions.
This repository is in an early stages of release which I push on the occasion of sharing the smp_sphero code [fn:1]. Still performing incremental clean-up and refactoring plus additions from existing other repositories so a lot of things might still change.
The main dependencies are the standard ones such as numpy, scipy, matplotlib, and sklearn which are needed regardless. You can either install them via package manager
apt-get install python-numpy python-scipy python-matplotlib python-sklearn
Optional modules are rlspy (recursive least squares implementation) from [fn:2] and jpype [fn:3], a java to python bridge which we use for computing information theoretic measures with the java information dynamics toolkit [fn:4]. Additional dependencies which might be made optional in the future are pandas, ros, pyunicorn, mdp, Oger, and igmm [fn:5].
Additional dependencies which might be made optional in the future are pandas, ros, pyunicorn, and mdp/Oger.
apt-get install python-pandas python-mdp
For installing a basic ROS stack see the wiki at https://www.ros.org/wiki, you need to have the package python-rospy.
Pyunicorn does recurrence analysis and can be obtained from https://github.com/pik-copan/pyunicorn or via pip.
Oger is an extension for MDP and can be obtained from http://reservoir-computing.org/installing_oger.
The path to some of the libraries can be set in the config file. See config.py.dist for possible options.
reservoirs.py | contains Reservoir class, LearningRules class, a few utility functions and a main method |
that demonstrates basic use of the class. It can definitely be simplified (WiP) | |
learners.py | this model embeds the underlying adaptive model into the sensorimotor context |
eligibility.py | basic eligibility windows used in a variant of learning rules |
smp\_thread.py | thread wrapper that provides constant dt run loop and asynchronous sensor callbacks |
You could try and run
python reservoirs.py
or
python reservoirs.py --help
to see possible options. Documentation and examples upcoming.
[fn:5] https://github.com/x75/igmm/tree/smp
[fn:4] https://github.com/jlizier/jidt
[fn:3] Either python-jpype via apt, or from pip either jpypex or JPype1