Entity

class sorrel.entities.Entity

Base element class. Defines the non-optional initialization parameters for all entities.

location

The location of the object. It may take on the value of None when the Entity is first initialized.

value

The reward provided to an agent upon interaction. It is 0 by default.

Type:

float

passable

Whether the object can be traversed by an agent. It is False by default.

Type:

bool

has_transitions

Whether the object has unique physics interacting with the environment. It is False by default.

Type:

bool

kind

The class string of the object.

Type:

str

Methods

Entity.transition(world: W)

Change the environment in some way.

By default, this function does nothing.

Parameters:

env (Gridworld) – The world toenact transition to.