Skip to content

Commit

Permalink
Merge pull request #25 from TomGeorge1234/dev
Browse files Browse the repository at this point in the history
v1.2 <-- v1.1
  • Loading branch information
TomGeorge1234 authored Mar 7, 2023
2 parents ceb9f04 + e751543 commit ec84ef0
Show file tree
Hide file tree
Showing 25 changed files with 2,649 additions and 1,662 deletions.
Binary file added .images/readme/fig_of_eight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .images/readme/theta_sequences.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .images/readme/trapezium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .images/readme/wall_repel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ Here is a list of features loosely organised into three categories: those pertai

(i) the [`Environment`](#i-environment-features)
* [Adding walls](#walls)
* [Polygon-shaped Environments](#polygon-shaped-environments)
* [Holes](#holes)
* [Boundary conditions](#boundary-conditions)
* [1- or 2-dimensions](#1--or-2-dimensions)


(ii) the [`Agent`](#ii-agent-features)
* [Random motion](#random-motion-model)
* [Importing trajectories](#importing-trajectories)
* [Policy control](#policy-control)
* [Wall repelling](#wall-repelling)
* [Advanced `Agent` classes](#advanced-agent-classes)

(iii) the [`Neurons`](#iii-neurons-features).
* [Cell types](#multiple-cell-types)
Expand All @@ -105,8 +107,28 @@ Here are some easy to make examples.

<img src=".images/readme/walls.png" width=1000>

#### Polygon-shaped `Environments`
By default, `Environments` in RatInABox are square (or rectangular if `aspect != 1`). It is possible to create arbitrary environment shapes using the `"boundary"` parameter at initialisation:
```python
Env = Environment(params={'boundary':[[0,-0.2],[0,0.2],[1.5,0.5],[1.5,-0.5]]})
```
<img src=".images/readme/trapezium.png" width=300>


#### Holes
One can add holes to the `Environment` using the `"holes"` parameter at initialisation
```python
Env = Environment(params={
'aspect':1.8,
'holes' : [[[0.2,0.2],[0.8,0.2],[0.8,0.8],[0.2,0.8]],
[[1,0.2],[1.6,0.2],[1.6,0.8],[1,0.8]]]
})
```
<img src=".images/readme/fig_of_eight.png" width=300>


#### Boundary conditions
Boundary conditions can be "periodic" or "solid". Place cells and the motion of the Agent will respect these boundaries accordingly.
Boundary conditions (for default square/rectangular environments) can be "periodic" or "solid". Place cells and the motion of the Agent will respect these boundaries accordingly.
```python
Env = Environment(
params = {'boundary_conditions':'periodic'} #or 'solid' (default)
Expand Down Expand Up @@ -172,7 +194,13 @@ Under the random motion policy, walls in the environment mildly "repel" the `Age
Αgent.thigmotaxis = 0.8 #1 = high thigmotaxis (left plot), 0 = low (right)
```

<img src=".images/readme/wall_repel.png" width=400>
<img src=".images/readme/wall_repel.png" width=900>


#### Advanced `Agent` classes
One can make more advanced Agent classes, for example `ThetaSequenceAgent()` where the position "sweeps" (blue) over the position of an underlying true (regular) `Agent()` (purple), highly reminiscent of theta sequences observed when one decodes position from the hippocampal populaton code on sub-theta (10 Hz) timescales. This class can be found in the [`contribs`](./ratinabox/contribs/) directory.

<img src=".images/readme/theta_sequences.gif" width=350>


### (iii) `Neurons` features
Expand Down
Loading

0 comments on commit ec84ef0

Please sign in to comment.