Class BDIAgent

java.lang.Object
org.episteme.natural.computing.ai.agents.bdi.BDIAgent
All Implemented Interfaces:
Runnable, Agent

public abstract class BDIAgent extends Object implements Agent
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 Details

  • Constructor Details

    • BDIAgent

      public BDIAgent(String name)
  • Method Details

    • getId

      public UUID getId()
      Description copied from interface: Agent
      Returns the unique identifier of this agent.
      Specified by:
      getId in interface Agent
      Returns:
      the agent's UUID.
    • getName

      public String getName()
      Description copied from interface: Agent
      Returns the name of this agent.
      Specified by:
      getName in interface Agent
      Returns:
      the agent's name.
    • run

      public void run()
      Description copied from interface: Agent
      The main execution cycle of the agent. Usually invoked by the agent container or scheduler.
      Specified by:
      run in interface Agent
      Specified by:
      run in interface Runnable
    • handleEvent

      protected void handleEvent(BDIEvent event)
      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

      public void addBelief(Belief belief)
    • getBelief

      public Belief getBelief(String name)
    • addBehavior

      public void addBehavior(Behavior behavior)
      Description copied from interface: Agent
      Adds a behavior to this agent. Behaviors define the agent's actions and responses.
      Specified by:
      addBehavior in interface Agent
      Parameters:
      behavior - the behavior to add.
    • removeBehavior

      public void removeBehavior(Behavior behavior)
      Description copied from interface: Agent
      Removes a behavior from this agent.
      Specified by:
      removeBehavior in interface Agent
      Parameters:
      behavior - the behavior to remove.
    • addPlan

      public void addPlan(Plan plan)
    • receive

      public void receive(ACLMessage message)
      Description copied from interface: Agent
      Receives a message from the environment.
      Specified by:
      receive in interface Agent
      Parameters:
      message - the ACL message to process.
    • interact

      public void interact(Agent other)
      Description copied from interface: Agent
      Interacts with another agent.
      Specified by:
      interact in interface Agent
      Parameters:
      other - the agent to interact with.
    • getEnvironment

      public Environment getEnvironment()
      Description copied from interface: Agent
      Helper to get the current environment this agent is in.
      Specified by:
      getEnvironment in interface Agent
      Returns:
      the environment or null if not registered.
    • setEnvironment

      public void setEnvironment(Environment env)
      Description copied from interface: Agent
      Sets the environment for this agent. Called by the environment upon registration.
      Specified by:
      setEnvironment in interface Agent
      Parameters:
      env - the environment wrapper.