Get started#
Many demos are provided. Reading through the example scripts (one simple and one extensive, duplicated at the bottom of the readme) these should be enough to get started. We also provide numerous interactive jupyter scripts as more in-depth case studies; for example one where RatInABox
is used for reinforcement learning, another for neural decoding of position from firing rate. Jupyter scripts reproducing all figures in the paper and readme are also provided. All demos can be run on Google Colab
Installing and Importing#
Requirements are minimal (python3
, numpy
, scipy
and matplotlib
, listed in setup.cfg
) and will be installed automatically.
Install the latest, stable version using pip
at the command line with
$ pip install ratinabox
Alternatively, in particular if you would like to develop RatInABox
code or if you want the bleeding edge (may occasioanlly break), install from this repo using
$ git clone --depth 1 https://github.com/RatInABox-Lab/RatInABox.git
$ cd RatInABox
$ pip install -e .
n.b. the “editable” -e
handle means changes made to your clone will be reflected when you next import RatInABox
into your code.
Import into your python project with
import ratinabox
from ratinabox.Environment import Environment
from ratinabox.Agent import Agent
from ratinabox.Neurons import PlaceCells, GridCells #...