Agent#
- class curiosity_gym.core.objects.Agent(position: tuple[int, int], state: int = 0)#
Grid object representing the RL agent.
The color of the agent grid object cannot be specified at initialisation, as it is used to represent collected
Keyobjects. The agent’s color will always be initialised as 1 (orange).- Parameters:
position (tuple[int,int]) – Position in the grid where the agent object will be placed. Values must be in range (
width- 1,height- 1).state (int) –
Rotationof the agent.
Methods
Calculate position in front of the agent grid object.
Return a tuple that identifies the grid object and its state in the enviroment.
Interact with agent.
Determine whether grid object is harmful to the agent.
Determine whether agent can move on grid object.
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 a given action.
Attributes
id_mapDictionary for all ids and their corresponding subclasses.
identifierUnique id number for each subclass.