
in Table 5, agents have routines for actions and strate-
gies which are applied to them. Strategies, gener-
ally, are tied to the executing agent (although a purely
functional implementation with the agent as argu-
ment is possible) and whether they are currently en-
abled/active or not.
In the Update Strategies Function, the agent calls
Update on each of its strategies, where additional
logic may happen, such as state changes, triggering
of immediate actions, or other logic which is state-
dependent. One example from this use case is, in
the case of Q
v
, agents checking whether they are still
feeling sick or if they may end their quarantine sta-
tus. Another example is T
s
, with check for disease
symptoms resulting in the triggering and execution
of a test-taking action. During the Perform Routine,
the agent executes Check Conditions for each strat-
egy and for each action until either one strategy yields
a negative result (violation of conditions for execu-
tion) or all strategies evaluated successfully. For some
strategies, such as T
r
, Check Conditions will always
yield True, since the strategy has no logical influ-
ence on individual actions in the context of routine
behaviour.
5.2 Computational Complexity and
Runtime Evaluation
While a classic approach with ad-hoc plan generation
was not implemented, the pre-compilation of plans
was tested and, using code runtime profiling, found
to have no significant impact on the runtime perfor-
mance of the simulation model due to the computa-
tion of agents’ scores only using constant-time opera-
tions. This was tested on a model with 20.000 agents
for 100 simulation steps.
Additionally, we also examined the runtime com-
plexity of a hypothetical alternative implementation
as visualised in Figure 2. The z-axis uses a loga-
rithmic scale, since linear-scaled values are skewed
beyond visibility by the range of z-values. In op-
tion a, each agent uses a greedy-search-strategy, iden-
tifies feasible plans, evaluates those using constant-
time operations and selects the best option using lin-
ear algorithms. In comparison to that, b applies our
method of binary strategies and filtering using con-
straints, followed by evaluation and selection. Fi-
nally, c depicts the proposed approach in which plans
Table 5: Overview of Agents and the Strategy Interface.
Agent StrategyInterface
Id Name
Routine List of Actions Agent Agent
Strategies List of Strategies Active boolean
update strategies() update()
perform routine() check conditions(Action)
have been generated and filtered for feasibility ahead
of simulation, rather than being a repeated step per-
formed by each agent. Due to the exponential nature
of the SAT problem, this package-based approach sig-
nificantly outperforms greedy computation if the gen-
eration and filtering of plans are performed a single
time ahead of simulations. As such, a mixed strat-
egy still retains benefits regarding communication and
modularity, but provides no better performance than
ad-hoc planning without polynomial heuristics.
These findings show that our method excels for
models with large agent populations and large palettes
of behaviours, since the computational effort primar-
ily depends on the number of agents, rather than the
size or complexity of the action space.
6 DISCUSSION
This contribution presents an efficient approach to
agent-deliberation using pre-computation and strat-
egy patterns as used in software design. With its inte-
gration within the BDI-architecture widely accepted
by developers of ABMs, this method is compatible
with existing standards and practices.
With the examination of voluntary self-protective
behaviours during the COVID-19 pandemic, we
demonstrated a practical implementation of this ap-
proach and compared it to ad-hoc planning by agents.
The main advantage of this method is twofold:
as shown in Section 5.2, this method is efficient and
scalable due to the one-time execution of the most
resource-intensive task, the initial plan generation and
filtering. Additionally, there is a strong abstraction
between code, concept and meaning. Defining be-
haviours and building a matrix can be achieved in
close interdisciplinary exchange with non-technical
experts in a communicable and structured way.
This method’s main downside is the requirement
for expert knowledge to define possible behaviours
and their relationships. With the current rise of Large
Language Models and attempts at including seman-
tic information in training data, reasoning on logical
and inconsistent action combinations might be par-
tially automated in the generation of constraints.
For actions with temporal dependencies, we can
consider planning as NP-complete problem which can
be translated into a satisfiability problem. Therefore,
it is generally possible to include actions with tempo-
ral dependencies (Ullman, 1975). Due to the expo-
nential nature of the #-SAT problem, the scaling for
temporal sequences needs to be examined to verify
performance against heuristic planning algorithms.
In general, performance is a major venue for fur-
Efficient Selection of Consistent Plans Using Patterns and Constraint Satisfaction for Beliefs-Desires-Intentions Agents
339