Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 2.73 KB

Observation.md

File metadata and controls

30 lines (23 loc) · 2.73 KB

World Object Model: structural represention of what an agent sees.

The class LabRecruitsEnvironment provides basic methods, such as observe(agentId) and moveToward(agentId,p,q) to control the Lab Recruits game. In addition to executing the command in the game, these commands also return what the in-game agent (identified by agentId) observes. This observation represented as an instance of the class LabWorldModel, which in turn is a subclass of eu.iv4xr.framework.world.WorldModel. Instances of WorldModel is also called World Object Model (WOM) as it structurally (so, not visually) describes what the game-world looks like from the agent's eye.

A WOM of Lab Recruits has the following structure:

  • the agent's id.

  • the agent's current position (center position).

  • the agent's current velocity.

  • the agent's bounding box.

  • timestamp denoting when the WOM is taken.

  • a collection of in-game entities that the agent currently sees.

  • additionally also the fragment of the in-game world that the agent current see.

    In the case of Lab Recruits, the game does not send full description of this, but instead it only sends the navigable part of the world that the agent currently sees. In other words, the game sends back information about which part of the in-game floor is visible, but it does not send any information on the walls that surround the agent. Information about the floor in enough to allow your AI to figure out how to navigate from one place in the virtual world to another, though the AI will not know if it is surrounded by walls, or by abyss.

    The data on the visible navigable part of the world is encoded in so-called navigation-graph. The 'floor' is divided into adjacent polygons (usually triangles). A navigation graph consists of the corners of these polygons, and edges representing how these corners are connected to each other. It is up to your AI how to use this information.

An in-game entity is represented by an instance of the class WorldEntity. Each has the following information:

  • an id that uniquely identify the entity.
  • a string naming the entity type (e.g. an entity with id d10 could be of type door).
  • timestamp.
  • the entity's position (center position).
  • the entity's velocity.
  • the entity's bounding box.
  • a boolean indicating whether the entity is interactable.
  • a boolean indicating whether the entity is dynamic. An entity is 'dynamic' if its state can change at the runtime.
  • a list of properties, each is a pair of (n,v) where n is the property name and v is the property value.
  • a collection of other in-game entities that is a part of this entity (e.g. if this entity is represent an in-game bag containing other stuffs).