Class
RandomAgent
A random agent.
Inherits from:
This agent acts randomly chosing an action given an uniform probability in all possible actions
- edit Alexis BRENON alexis.brenon@imag.fr
Metamethods
keyboard_arrow_up-
__init ( args )
Default constructor.
Parameters:-
args
-
table
actions
Available actions
-
table
-
Public Methods
keyboard_arrow_up-
get_action ()
-
get_experienced_interactions ()
Return how many interactions the agent lived.
Overrides: BaseAgent:get_experienced_interactions
- number Number of interactions done
-
get_learned_epoch ()
Return how many times the agent actually learned from its experience.
Overrides: BaseAgent:get_learned_epoch
-
number
0
-
number
-
give_reward ( reward )
Reward or punish the agent.
Overrides: BaseAgent:give_reward
-
number
reward
Reward if positive, punishment if negative
-
self
-
number
-
integrate_observation ( state )
Integrate current observation from the environment.
Overrides: BaseAgent:integrate_observation
-
state
The current state of the environment-
torch.Tensor
observation
The actual observations -
boolean
terminal
Is this state terminal?
-
torch.Tensor
-
self
-
-
report ()
Return pretty-printed informations about the agent. For this agent, it returns the actions frequecies.
Overrides: BaseAgent:report
- string A human readable string about the agent