Ratinabox

Latest version: v1.15.1

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

2.0.0

This will be unpinned as a soon as important associated packages (`matplotlib`, `scipy` etc.) support 2.0.0.

1.15.1

Just cleans up some API stuff for the SubAgent class introduced in version v1.15.0

1.15.0

`SubAgent` contrib and minor QOL upgrades

This release adds `save_fig()` kwargs which aer passed directly to `matplotlib.save_figure` function so you can modify how figures are saved.

Also adds `SubAgent` class in the controls. `SubAgent`s take as input, and are "subservient" to, another `Agent` (the LeadAgent). The key thing idea is that the `SubAgent` may have an update() function which relies heavily on the state of the LeadAgent. Examples included are:

* `DumbAgent` a noisy version of `LeadAgent`
* `ThetaSequenceAgent` theta sweeps around the `LeadAgent`s position
* `ReplayAgent` occasional short replay events


The API is as follows


Env = Environment()
Ag = Agent(Env) the lead agent
DumbAg = DumbAgent(LeadAgent=Ag, params = {'drift_distance':0.1})

while Ag.t < 60:
Ag.update()
DumbAg.update()


`DumbAg.animate_trajectory()` then returns something like:


https://github.com/user-attachments/assets/cf472dc3-f33e-41db-bd63-1587949df141



**Full Changelog**: https://github.com/RatInABox-Lab/RatInABox/compare/v1.14.1...v1.15.0

1.14.1

Minor interpolation bug fix as pointed out by 114. Also changed `save_to_history()` from using `list(array)` to `array.tolist()`

1.14.0

`numpy-2.0.0` compatibility

No substantial changes, I just fixed a few bugs to make compatible with `numpy>=2.0.0`

1.13.0

Grids cell

- Grid cells work in 1D
- Grid cells have a `width_ratio` parameter which sets the ration of the width of the receptive field to the grid scale. It mist be between 0 (very sharp grid fields) and 1 (very diffuse grid fields) and only works for the `rectified_cosines` models.

![grid_geometry](https://github.com/RatInABox-Lab/RatInABox/assets/41446693/4cab78cd-36cd-4049-b514-7222bf6e3413)

- Minor api change (warning thrown, will not break) `three_shifted_cosines` --> `shifted_cosines`
- Default grid cells have been changed to 30 grid cells in three increasingly slightly rotated modules.

![gridcells_default](https://github.com/RatInABox-Lab/RatInABox/assets/41446693/cc75cfe7-6e25-4e2b-a104-fd47381c6cf4)

- Grid cell documentation on the readme has been improved

Plotting:

- Plotting the rate map of a single neuron in 1D can now be optimised using `optimise_plot_for_single_neuron` (without this it just does a mountain plot with a single line, which isn't ideal.

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.