SmallReward#

class curiosity_gym.core.objects.SmallReward(position: tuple[int, int], reward: float)#

Grid object yielding a small reward when the agent moves over it.

Parameters:
  • position (tuple[int,int]) – Position in the grid where the object will be placed. Values must be in range (width - 1, height - 1).

  • reward (float) – Amount of reward to yield when agent walks over the grid object.

Methods

get_identity

Return a tuple that identifies the grid object and its state in the enviroment.

interact

Interact with agent.

is_harmful

Determine whether grid object is harmful to the agent.

is_walkable

SmallReward grid object is always walkable.

render

Render grid object in PyGame.

reset

Reset attributes of the grid object to their starting values.

simulate

Simulate how grid object would change if a given action were taken.

step

Determine whether agent is walking over the grid object.

Attributes

id_map

Dictionary for all ids and their corresponding subclasses.

identifier

Unique id number for each subclass.