Class BDIAgent
java.lang.Object
org.episteme.natural.computing.ai.agents.bdi.BDIAgent
A base implementation of a BDI (Belief-Desire-Intention) Agent.
This agent follows the reasoning cycle: Perceive -> Update Beliefs -> Deliberate (Generate Desires) -> Plan (Select Intentions) -> Act.
- Since:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConcurrentHashMap<String, Belief> protected Environmentprotected UUIDThe intention stack represents the active commitments of the agent.protected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidact()Execute intentions.voidaddBehavior(Behavior behavior) Adds a behavior to this agent.voidvoidvoidDeliberate to update desires based on current beliefs.Helper to get the current environment this agent is in.getId()Returns the unique identifier of this agent.getName()Returns the name of this agent.protected voidhandleEvent(BDIEvent event) Handles an internal or external BDI event.voidInteracts with another agent.abstract voidperceive()Perceive changes from the environment and update beliefs.voidplan()Select intentions (plans) to achieve desires.voidreceive(ACLMessage message) Receives a message from the environment.voidremoveBehavior(Behavior behavior) Removes a behavior from this agent.voidrun()The main execution cycle of the agent.voidSets the environment for this agent.
-
Field Details
-
id
-
name
-
beliefs
-
desires
-
behaviors
-
eventQueue
-
intentions
-
planLibrary
-
environment
-
-
Constructor Details
-
BDIAgent
-
-
Method Details
-
getId
-
getName
-
run
-
handleEvent
Handles an internal or external BDI event. -
perceive
public abstract void perceive()Perceive changes from the environment and update beliefs. -
deliberate
public void deliberate()Deliberate to update desires based on current beliefs. -
plan
public void plan()Select intentions (plans) to achieve desires. -
act
public void act()Execute intentions. -
addBelief
-
getBelief
-
addBehavior
Description copied from interface:AgentAdds a behavior to this agent. Behaviors define the agent's actions and responses.- Specified by:
addBehaviorin interfaceAgent- Parameters:
behavior- the behavior to add.
-
removeBehavior
Description copied from interface:AgentRemoves a behavior from this agent.- Specified by:
removeBehaviorin interfaceAgent- Parameters:
behavior- the behavior to remove.
-
addPlan
-
receive
Description copied from interface:AgentReceives a message from the environment. -
interact
-
getEnvironment
Description copied from interface:AgentHelper to get the current environment this agent is in.- Specified by:
getEnvironmentin interfaceAgent- Returns:
- the environment or null if not registered.
-
setEnvironment
Description copied from interface:AgentSets the environment for this agent. Called by the environment upon registration.- Specified by:
setEnvironmentin interfaceAgent- Parameters:
env- the environment wrapper.
-