Arcades

Class RandomAgent

A random agent.

Inherits from:

This agent acts randomly chosing an action given an uniform probability in all possible actions

Info:
  • __init ( args )

    Default constructor.

    Parameters:
    • args
      • table actions
        Available actions

Public Methods

keyboard_arrow_up
  • get_action ()

    Return an action to do.

    Returns:
  • get_experienced_interactions ()

    Return how many interactions the agent lived.

    Returns:
    • number Number of interactions done
  • get_learned_epoch ()

    Return how many times the agent actually learned from its experience.

    Returns:
  • give_reward ( reward )

    Reward or punish the agent.

    Parameters:
    • number reward
      Reward if positive, punishment if negative
    Returns:
    • self
  • integrate_observation ( state )

    Integrate current observation from the environment.

    Parameters:
    • state The current state of the environment
      • torch.Tensor observation
        The actual observations
      • boolean terminal
        Is this state terminal?
    Returns:
    • self
  • report ()

    Return pretty-printed informations about the agent. For this agent, it returns the actions frequecies.

    Overrides: BaseAgent:report

    Returns:
    • string A human readable string about the agent