Ball#

class curiosity_gym.core.objects.Ball(position: tuple[int, int], zone_low: tuple[int, int], zone_high: tuple[int, int], color: int = 9)#

Non walkable grid object that can be moved by agent interaction.

Can be used to define more complex task objectives that differ from navigation tasks.

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

  • zone_low (tuple[int,int]) – Low boundaries of the zone in which the ball grid object can be moved.

  • zone_high (tuple[int,int]) – High boundaries of the zone in which the ball grid object can be moved.

  • color (int) – Color of the grid object.

Methods

get_identity

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

interact

Move ball one cell in direction of agent rotation.

is_harmful

Determine whether grid object is harmful to the agent.

is_walkable

Determine whether agent can move on grid object.

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

Compute grid object changes after single timestep.

Attributes

id_map

Dictionary for all ids and their corresponding subclasses.

identifier

Unique id number for each subclass.