Skip to content

v1.15.0

Compare
Choose a tag to compare
@TomGeorge1234 TomGeorge1234 released this 01 Nov 13:18
· 11 commits to main since this release

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. SubAgents 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 LeadAgents 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:

trajectory_1317.mp4

Full Changelog: v1.14.1...v1.15.0