pantheonrl.envs.liargym.liar.LiarDefaultAgent

class LiarDefaultAgent[source]

Bases: Agent

The default liar’s dice agent

Methods

get_action

Return an action given an observation.

update

Add new rewards and done information if the agent can learn.

get_action(obs)[source]

Return an action given an observation.

Parameters:

obs – The observation to use

Returns:

The action to take

update(reward, done)[source]

Add new rewards and done information if the agent can learn.

Each update corresponds to the most recent get_action.

If there are multiple calls to update that correspond to the same get_action, their rewards are summed up and the last done flag will be used.

Parameters:
  • reward – The reward receieved from the previous action step

  • done – Whether the game is done