Enemy#
- class curiosity_gym.core.objects.Enemy(position: tuple[int, int], state: int = 0, reach: int = 2)#
Moving grid object harmful to the agent.
Can be used to introduce additional reward sparcity by early episode termination.
- Parameters:
position (tuple[int,int]) – Position in the grid where the object will be placed. Values must be in range (
width- 1,height- 1).state (int) – State of the enemy grid object. Determines current movement direction.
reach (int) – Number of cells the enemy can move from its starting position.
Methods
Return a tuple that identifies the grid object and its state in the enviroment.
Interact with agent.
The enemy grid object is always harmful to the agent.
The enemy grid object is always walkable.
Render grid object in PyGame.
Reset attributes of the grid object to their starting values.
Simulate how grid object would change if a given action were taken.
Perform enemy movement.
Attributes
id_mapDictionary for all ids and their corresponding subclasses.
identifierUnique id number for each subclass.