In this folder we provide numerous "example scripts" or "demos" which will help when learning RatInABox
.
All demos can be run in Google Colab but, for best performance, it is recommended to use a local IDE.
In approximate order of complexity, these include:
- simple_example.ipynb: a very simple tutorial for importing RiaB, initilising an Environment, Agent and some PlaceCells, running a brief simulation and outputting some data.
- extensive_example.ipynb: a more involved tutorial. More complex enivornment, more complex cell types and more complex plots are used.
- list_of_plotting_functions.md: All the types of plots available for are listed and explained.
- readme_figures.ipynb: (Almost) all plots/animations shown in the root readme are produced from this script (plus some minor formatting done afterwards in powerpoint).
- paper_figures.ipynb: (Almost) all plots/animations shown in the paper are produced from this script (plus some major formatting done afterwards in powerpoint).
- decoding_position_example.ipynb: Postion is decoded from neural data generated with RatInABox using linear regression. Place cells, grid cell and boundary vector cells are compared.
- conjunctive_gridcells_example.ipynb:
GridCells
andHeadDirectionCells
are minimally combined useingFeedForwardLayer
to create head-direction-selective grid cells (aka. conjunctive cells). - splitter_cells_example.ipynb: A simple simultaion demonstrating how
Splitter
cell data could be create in a figure-8 maze. - deep_learning_example.ipynb: Here we showcase
NeuralNetworkNeurons
, a class ofNeurons
which has a small neural network embedded inside. We train them to take grid cells as inputs and output an arbitrary function as their rate map. - reinforcement_learning_example.ipynb: RatInABox is use to construct, train and visualise a small two-layer network capable of model free reinforcement learning in order to find a reward hidden behind a wall.
- actor_critic_example.ipynb: RatInABox is use to implement the actor critic algorithm using deep neural networks.
- successor_features_example.ipynb: RatInABox is use to learn successor features under random and biased motion policies.
- path_integration_example.ipynb: RatInABox is use to construct, train and visualise a large multi-layer network capable of learning a "ring attractor" capable of path integrating a position estimate using only velocity inputs.
- vector_cell_demo.ipynb: A demo for the Vector Cells (OVCs & BVCs) and how to simulate them with various parameters and different manifolds. Also includes a demo on how to pass custom manifolds for the cells.