Comments (1)
To clarify for @mehulrastogi:
-
Head direction should be a variable called
Agent.head_direction
. -
It should be saved to the history dictionary each timestep, just like
Ag.pos
andAg.velocity
-
Inside the
Agent
params
dictionary there should be a new param calledhead_direction_smoothing_timescale : float
(in the equation below this is$\tau$ ). This defaults to$0.0$ . -
Update the doc string to clarify what this param does
-
Within
Agent.update()
there should be a call to a function calledself.update_head_direction(dt)
-
The update rule should be as follows (where
$\hat{v}$ is the normalised velocity vector):
$$hd = (1 - \frac{dt}{\tau}) \cdot hd + \frac{dt}{\tau} \hat{v}$$
then normalise it
$$hd = \frac{hd}{|hd|}$$
Note: you'll need a catch for if$\tau==0$ when the update should just be$hd = \hat{v}$ or else you'll get divide by zero error. Even better would be an additional warning if$\tau$ is non-zero but smaller than$dt$ as this is when the equation breaks down. This warning should strongly advise then to increase$\tau$ or decrease$dt$ to avoid numerical problems but otherwise probably let them go ahead. -
This change should then reflected in the following
Neurons
classes which use head direction:
ObjectVectorCells
BoundaryVectorCells
HeadDirectionCells
- It would be nice to keep support for 1D too even though here head direction is trivial, just a 1D array either [1.0] (forward) or [-1.0] (backwards).
Thanks! Let me know if you run into any troubles
from ratinabox.
Related Issues (20)
- Small bug relating to PR #101 HOT 1
- history not loaded when importing trajectory HOT 3
- New python version bug HOT 2
- Modules of grid cells with uniform offsets HOT 1
- add error checking to parameter settings HOT 2
- Firingrate norm for BVCs should be unscaled HOT 2
- BVC firingrates go over max_fr HOT 9
- Confused about setting multiple spatial goals in the A2C demo HOT 4
- straight trajectory with fixed speed mean, but Ag.history['vel'] is not constant HOT 5
- Spikes are sliced twice consecutively when plotting timeseries. HOT 2
- Please tag the 1.9.1 release HOT 2
- Minimum required python version currently 3.10 HOT 2
- Agent vector cells HOT 1
- New Actions HOT 3
- AgentVectorCells and FieldOfViewAVCs HOT 3
- Version mismatch in 1.11.0 metadata HOT 1
- Open discussion: Object disappear after Agent passes by HOT 3
- Name swap...
- Speed and place cells HOT 13
- "I" not updated in FeedForward Neurons HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ratinabox.