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 |