Random Agent

class or_suite.agents.rl.random.randomAgent[source]

Randomized RL Algorithm

Implements the randomized RL algorithm - selection an action uniformly at random from the action space. In particular, the algorithm stores an internal copy of the environment’s action space and samples uniformly at random from it.

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

pick_action(obs, h)[source]

Selects an action for the algorithm.

Parameters
  • obs – a state for the environment

  • h – timestep

Returns

An action sampled uniformly at random from the environment’s action space.

update_config(env, config=None)[source]

Updates configuration file for the agent

Updates the stored environment to sample uniformly from.

Parameters
  • env – an openAI gym environment

  • config – an (optional) dictionary containing parameters for the environment

update_obs(obs, action, reward, newObs, timestep, info)[source]

Add observation to records

update_policy(h)[source]

Update internal policy based upon records