hive.agents.random module

class hive.agents.random.RandomAgent(obs_dim, act_dim, id=0, logger=None)[source]

Bases: Agent

An agent that takes random steps at each timestep.

Parameters
  • obs_dim – The shape of the observations.

  • act_dim (int) – The number of actions available to the agent.

  • id – Agent identifier.

  • logger (ScheduledLogger) – Logger used to log agent’s metrics.

act(observation)[source]

Returns a random action for the agent.

update(update_info)[source]

Updates the agent.

Parameters

update_info (dict) – Contains information agent needs to update itself.

save(dname)[source]

Saves agent checkpointing information to file for future loading.

Parameters

dname (str) – directory where agent should save all relevant info.

load(dname)[source]

Loads agent information from file.

Parameters

dname (str) – directory where agent checkpoint info is stored.