Skip to content

ExtensionBDI

Arthur edited this page Jul 22, 2026 · 1 revision

BDI Extension

Extension: gama.extension.bdi

The BDI (Belief-Desire-Intention) extension provides operators for reasoning and planning in the GAMA environment.

Basic Constructs

new_predicate(name) — New Predicate

Creates a new predicate with a given name and additional properties (values, agent causing the predicate, whether it is true).

Overload Description
new_predicate(name) Creates a predicate with a given name
new_predicate(name, values) Adds a values map
new_predicate(name, is_true) Adds a truth value
new_predicate(name, cause_agent) Adds an agent that caused the predicate
new_predicate(name, values, is_true) Adds values and truth
new_predicate(name, values, cause_agent) Adds values and cause agent
new_predicate(name, values, is_true, cause_agent) Adds all properties

new_emotion(name) — New Emotion

Creates a new emotion with various combinations.

Overload Description
new_emotion(name) Just the name
new_emotion(name, intensity) Name and intensity
new_emotion(name, intensity, about) Name, intensity, predicate it is about
new_emotion(name, about, cause_agent) Name, predicate, and cause agent
new_emotion(name, intensity, cause_agent) Name, intensity, and cause agent
new_emotion(name, intensity, about, decay) Name, intensity, about, and decay
new_emotion(name, intensity, about, cause_agent) Name, intensity, about, and cause agent
new_emotion(name, intensity, about, decay, cause_agent) All properties

new_mental_state(modality) — New Mental State

Creates a new mental state with a given modality (bel, bel_em, des, int) and various properties.

Overload Description
new_mental_state(modality) Just the modality
new_mental_state(modality, predicate) Adds a predicate
new_mental_state(modality, predicate, strength) Adds strength
new_mental_state(modality, predicate, lifetime) Adds lifetime
new_mental_state(modality, predicate, cause_agent) Adds cause agent
new_mental_state(modality, predicate, strength, lifetime) Adds strength and lifetime
new_mental_state(modality, predicate, strength, cause_agent) Adds strength and cause agent
new_mental_state(modality, predicate, lifetime, cause_agent) Adds lifetime and cause agent
new_mental_state(modality, predicate, strength, lifetime, cause_agent) All properties
new_mental_state(modality, emotion) Adds an emotion about
new_mental_state(modality, emotion, strength) Adds emotion and strength
new_mental_state(modality, emotion, lifetime) Adds emotion and lifetime
new_mental_state(modality, emotion, cause_agent) Adds emotion and cause agent
new_mental_state(modality, emotion, strength, lifetime, cause_agent) All properties
new_mental_state(modality, mental_state) Adds about another mental state
new_mental_state(modality, mental_state, strength) Adds mental state and strength
new_mental_state(modality, mental_state, lifetime) Adds mental state and lifetime
new_mental_state(modality, mental_state, cause_agent) Adds mental state and cause agent
new_mental_state(modality, mental_state, strength, lifetime, cause_agent) All properties

new_social_link(agent) — New Social Link

Creates a new social link with another agent with optional parameters (appreciation/dominance/solidarity/familiarity values).

Overload Description
new_social_link(agent) Link to another agent
new_social_link(agent, appreciation, dominance, solidarity, familiarity) With all parameters

Predicate Operators

Operator Description
predicate with_truth value Changes the truth value of a predicate
predicate with_values map Changes the values map of a predicate
predicate add_values map Adds to the values map

Emotional Modifiers

Operator Description
emotion with_agent_cause agent Changes the cause agent of an emotion
emotion with_intensity intensity Changes the intensity value of an emotion
emotion with_decay decay Changes the decay rate of an emotion
emotion with_about predicate Changes the predicate an emotion is about

Social Link Modifiers

Operator Description
social_link with_agent agent Changes the target agent of a social link
social_link with_liking value Changes the liking value of a social link
social_link with_dominance value Changes the dominance value
social_link with_solidarity value Changes the solidarity value
social_link with_familiarity value Changes the familiarity value
social_link with_trust value Changes the trust value
get_agent(social_link) Returns the target agent of a social link

Logical Connectives

Operator Description
p1 and p2 Creates a composite predicate combining two as conjunctive subintentions
p1 or p2 Creates a composite predicate combining two as disjunctive subintentions
not p1 Returns a predicate with inverted truth value

Mental State Modifiers

Operator Description
mental_state set_modality mode Changes the modality of a mental state
mental_state set_predicate pred Changes the predicate of a mental state
mental_state set_strength strength Changes the strength of a mental state
mental_state set_lifetime life Changes the lifetime of a mental state

Belief Queries

Operator Description
get_beliefs_with_name_op(agent, name) Gets all beliefs whose predicate has a given name
get_belief_with_name_op(agent, name) Gets one belief whose predicate has a given name
get_belief_op(agent, predicate) Gets a belief by its exact predicate
get_beliefs_op(agent, predicate) Gets all beliefs matching a predicate
has_belief_op(agent, predicate) Checks if a belief exists for a given predicate
has_belief_with_name_op(agent, name) Checks if a belief exists with a given name

Desire Queries

Operator Description
get_desires_with_name_op(agent, name) Gets all desires whose predicate has a given name
get_desire_with_name_op(agent, name) Gets one desire whose predicate has a given name
get_desire_op(agent, predicate) Gets a desire by its exact predicate
get_desires_op(agent, predicate) Gets all desires matching a predicate
has_desire_op(agent, predicate) Checks if a desire exists for a given predicate
has_desire_with_name_op(agent, name) Checks if a desire exists with a given name

Intention Queries

Operator Description
get_intentions_with_name_op(agent, name) Gets all intentions whose predicate has a given name
get_intention_with_name_op(agent, name) Gets one intention whose predicate has a given name
get_intention_op(agent, predicate) Gets an intention by its exact predicate
get_intentions_op(agent, predicate) Gets all intentions matching a predicate
has_intention_op(agent, predicate) Checks if an intention exists for a given predicate
has_intention_with_name_op(agent, name) Checks if an intention exists with a given name
get_current_intention_op(agent) Gets the currently active intention of an agent

Other Base Queries

Operator Description
get_plan_name(agent) Returns the name of a plan
get_uncertainties_with_name_op(agent, name) Gets all uncertainties with a given name
get_uncertainty_op(agent, predicate) Gets an uncertainty by predicate
has_uncertainty_op(agent, predicate) Checks if an uncertainty exists
get_ideals_with_name_op(agent, name) Gets all ideals with a given name
get_ideal_op(agent, predicate) Gets an ideal by predicate
has_ideal_op(agent, predicate) Checks if an ideal exists
get_obligations_with_name_op(agent, name) Gets all obligations with a given name
get_obligation_op(agent, predicate) Gets an obligation by predicate
has_obligation_op(agent, predicate) Checks if an obligation exists

Statement/Action Reference

See SimpleBdiArchitecture for the full list of actions and variables provided by the BDI skill (e.g., add_belief, add_emotion, add_intention, add_desire, add_ideal, add_uncertainty, add_obligation, add_social_link, add_belief_emotion, comply, violate, instantiate_norm, enforce, sanction, make_law, etc.).

Plan Evaluation

Operator Description
eval_when(plan) Evaluates the "when" condition (context expression) of a plan
eval_achieve(plan) Evaluates the "achieve" expression of a plan
eval_reduce(plan) Evaluates the "reduce" expression of a plan

See Also

  1. What's new (Changelog)
  2. Migration Guide (2025-06 → 2026-06)
  1. Installation and Launching
    1. Installation
    2. Launching GAMA
    3. Updating GAMA
    4. Installing Plugins
  2. Workspace, Projects and Models
    1. Navigating in the Workspace
    2. Changing Workspace
    3. Importing Models
  3. Editing Models
    1. GAML Editor (Generalities)
    2. GAML Editor Tools
    3. Validation of Models
  4. Running Experiments
    1. Launching Experiments
    2. Experiments User interface
    3. Controls of experiments
    4. Parameters view
    5. Inspectors and monitors
    6. Displays
    7. Batch Specific UI
    8. Errors View
  5. Running Headless
    1. Getting Started
    2. Headless Legacy
    3. Headless Batch
  6. Preferences
  7. Troubleshooting
  1. Introduction
    1. Start with GAML
    2. Organization of a Model
    3. Basic programming concepts in GAML
  2. Manipulate basic Species
  3. Global Species
    1. Regular Species
    2. Defining Actions and Behaviors
    3. Interaction between Agents
    4. Attaching Skills
    5. Inheritance
  4. Defining Advanced Species
    1. Grid Species
    2. Graph Species
    3. Mirror Species
    4. Multi-Level Architecture
  5. Defining GUI Experiment
    1. Defining Parameters
    2. Defining Displays Generalities
    3. Defining 3D Displays
    4. Defining Charts
    5. Defining Monitors and Inspectors
    6. Defining Export files
    7. Defining User Interaction
  6. Classes and Objects
    1. Class Definition and Instantiation
    2. Attributes and Actions
    3. Inheritance
    4. Virtual Classes
    5. Advanced Features
  7. Exploring Models
    1. Run Several Simulations
    2. Batch Experiments
    3. Exploration Methods
  8. Optimizing Models
    1. Runtime Concepts
    2. Analyzing code performance
    3. Optimizing Models
  9. Multi-Paradigm Modeling
    1. Control Architecture
    2. Defining Differential Equations
  1. Manipulate OSM Data
  2. Cleaning OSM Data
  3. Diffusion
  4. Using Database
  5. Using Dataframes
  6. Using FIPA ACL
  7. Using BDI with BEN
  8. Using Driving Skill
  9. Manipulate dates
  10. Manipulate lights
  11. Using comodel
  12. Save and restore Simulations
  13. Using network
  14. Writing Unit Tests
  15. Ensure model's reproducibility
  16. Going further with extensions
    1. Calling R
    2. Using Graphical Editor
    3. Using Git from GAMA
  1. Built-in Species
  2. Built-in Skills
  3. Built-in Architecture
  4. Statements
  5. Data Type
  6. File Type
  7. Stats Extension
  8. Sound Extension
  9. BDI Extension
  10. FIPA Skill
  11. Expressions
    1. Literals
    2. Units and Constants
    3. Pseudo Variables
    4. Variables And Attributes
    5. Operators (Definition)
    6. Operators [A-A]
    7. Operators [B-C]
    8. Operators [D-H]
    9. Operators [I-M]
    10. Operators [N-R]
    11. Operators [S-Z]
  12. Exhaustive list of GAMA Keywords
  1. Installing the development version
    1. Install GAMA source code with Eclipse plugin
  2. Developing Extensions
    1. Developing Plugins
    2. Developing Skills
    3. Developing Statements
    4. Developing Operators
    5. Developing Types
    6. Developing Species
    7. Developing Control Architectures
    8. Index of annotations
  3. Introduction to GAMA Java API
    1. Architecture of GAMA
    2. IScope
  4. Using GAMA flags
  5. Creating a release of GAMA
  6. Documentation generation

  1. Predator Prey
  2. Road Traffic
  3. Incremental Model
  4. Luneray's flu
  5. BDI Agents
  6. Forager RL
  7. SIR Analysis
  8. 3D Model

  1. Team
  2. Projects using GAMA
  3. Scientific References
  4. Training Sessions

Resources

  1. Videos
  2. Conferences
  3. Pedagogical materials

Clone this wiki locally