Skip to content

v1.11.0

Compare
Choose a tag to compare
@TomGeorge1234 TomGeorge1234 released this 12 Nov 16:17
· 22 commits to dev since this release

AgentVectorCells and FieldOfViewAVCs

AgentVectorCells are like ObjectVectorCells but respond to other Agents in the Environment.
FieldOfViewAVCs are a subclass of AVCs arranged in a "field of view" as shown in the attached video. A demo can be found here (scroll to the bottom). This relates to #89 and closes #91.

trajectory_1606.mp4
from ratinabox.Neurons import AgentVectorCells, FieldOfViewAVCs

Env = Environment()
Ag1 = Agent(Env)
Ag2 = Agent(Env)
AVCs_1to2 = FieldOfViewAVCs(Ag1, Other_Agent=Ag2)
AVCs_2to1 = FieldOfViewAVCs(Ag2, Other_Agent=Ag1)

#remember to update both agents and neurons in the update loop: 
for _ in range(int(20/Ag1.dt)):
    Ag1.update()
    Ag2.update()
    AVCs_1to2.update()
    AVCs_2to1.update()

Other minor changes

  • Changes to VectorCells and GridCell API for how parameters are initialised/sampled (should be backward compatible, a warning might be thrown if you use old parameter names).
  • Bug fixes
  • New DNN demo