Embodiment
Agents are situated in an environment, and many are embodied in it: they have a physical or simulated presence, such as a robot in a room, through which they perceive and act. Behaviour-based robotics argued that intelligence emerges from this interaction with the world rather than from abstract reasoning alone1, and agent platforms connected to an environment commonly keep the agent apart from the entity it controls in it2. The agent's mind deliberates; its body is what the environment sees of the agent, and what the agent senses and acts through.
Bodies in JaKtA
Each agent has a body: its representation inside the node. The body owns what belongs to the agent in the world, such as its position, the direction it faces, or its sensors and actuators, while the agent's mind — its beliefs, goals and plans — stays apart from it.
The separation matters because the two can disagree: the body holds where the robot is, the beliefs where the robot thinks it is, and the agent only learns about its body by perceiving it. It also lets the same mind be embodied in different ways, e.g. a simulated robot in tests and a real one in production.
The body type is the third type parameter of agent<Belief, Goal, Body>, and of the node builder,
NodeBuilders.baseNode<Body>(). embodiedAs { id -> ... } gives the agent its body when it joins the node.
Agents that need no body use Any, with embodiedAs { Any() }, as in the tutorials.
What a body is for
- Acting: a skill finds the body of the acting agent and acts through it, e.g. moving the robot it belongs to.
- Perceiving:
publishEvent(perception) { body -> ... }delivers a perception only to the agents whose body passes the filter, e.g. only to the robot that made a sensor reading. - Being addressed: messages reach their receiver through its body.
- Being perceived: a body can expose data about its agent, such as its position, to the rest of the world.
Since
node.agentsmaps every agent to its body, a skill or the external environment can read the bodies of the other agents and publish what it finds as perceptions, e.g. the robots close to the one that looks around: agents then perceive each other through their bodies.
Give each agent a distinct body instance (embodiedAs { Any() } does), so that bodies identify agents unambiguously.
The how-to Give agents a body builds the body of the vacuum robot step by step, and the Vacuum World showcase explains why the world, the body, the skill and the agent are kept apart.