RandomBlock#

class curiosity_gym.core.objects.RandomBlock(position: tuple[int, int], color: int = 0, state: int = 0)#

A non walkable grid object that randomly changes color at every time step.

Can be used to test the Noisy-TV problem, where certain curiosity-based RL algorithms get stuck when encountering stochastic environment components.

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

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

Randomly change grid object color.

Attributes

id_map

Dictionary for all ids and their corresponding subclasses.

identifier

Unique id number for each subclass.