Skip to main content
Log in

Reflexive anticipatory reasoning by BDI agents

  • Published:
Autonomous Agents and Multi-Agent Systems Aims and scope Submit manuscript

Abstract

This paper investigates how predictions about the future behaviour of an agent can be exploited to improve its decision-making in the present. Future states are foreseen by a simulation technique, which is based on models of both the environment and the agent. Although the environment model is usually taken into account for prediction in artificial intelligence (e.g., in automated planning), the agent model receives less attention. We leverage the agent model to speed up the simulation and as a source of alternative decisions. Our proposal bases the agent model on the practical knowledge the developer has given to the agent, especially in the case of BDI agents. This knowledge is thus exploited in the proposed future-concerned reasoning mechanisms. We present a prototype implementation of our approach as well as the results from its evaluation on static and dynamic environments. This allows us to better understand the relation between the improvement in agent decisions and the quality of the knowledge provided by the developer.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Algorithm 1
Algorithm 2
Algorithm 3
Fig. 3
Algorithm 4
Fig. 4
Algorithm 5
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

Notes

  1. We use [i] to denote the i-th element of a sequence and \([-1]\) to refer to its last element. For example, if \(\pi (s_{1,1})= \langle s, sw, se, w, e, n, nw, ne \rangle\), then \(\pi (s_{1,1})_{[1]} = s\) and \(\pi (s_{1,1})_{[-1]} = ne\).

  2. We place the future verification (lines 4–5) before the main loop because we are considering a perfect model of the environment. We can thus be sure that the goal will not be achieved. However, if the environment model is not perfect, other implementations should be considered. For instance, wait for better environment conditions where the goal can be achieved.

  3. It follows some details about the BFS adaptation. (i) A search state is a tuple (sapc) where s is a state where action a is an option, p is the plan, i.e., the sequence of actions from the initial state to s, and c is the cost of p. (ii) The initial states to explore in the search (line 3) are based on the options given by the policy \(\pi\) for a state. The first option (\(i=1\)) is not considered because it leads to a future problem, the algorithm is indeed used to find another option (\(i>1\)). (iii) The search does not end when the goal state is found as in classical search. It ends when a state with a good future is found (line 7), i.e., a state where the policy preference can be followed to achieve the goal. (iv) The computational complexity of BFS algorithms is exponential \(O(b^d)\). In our case, the branching factor b is the number of options given by \(\pi\) and the search depth d is the number of actions until a state with good future. The computational complexity of the matrix function is linear O(n), where n is the number of actions to achieve some goal using the agent preferences as defined by \(\pi\).

  4. For these experiments we implemented an extension for the interpreter of the Jason programming language [15]. This extension and instructions to reproduce the experiments are available at https://github.com/jomifred/future-bdi and briefly described in Appendix A.

  5. An environment cycle starts with an environment state and ends after the execution of an action by the agent.

  6. A simple policy maps a state to only one action \(\pi : S \rightarrow A^n\) for \(n=1\).

  7. The policy from K defines several behaviours. It is conceived as presented in Sect. 2: a policy proposes more actions for a state (\(\pi : S \rightarrow A^n\) for \(n > 0\)). It implies many simple policies and thus many circles in the figure.

References

  1. Ciortea, A., Mayer, S., Gandon, F., Boissier, O., Ricci, A., & Zimmermann, A. (2019). A decade in hindsight: the missing bridge between multi-agent systems and the world wide web. In: AAMAS 2019-18th International Conference on Autonomous Agents and Multiagent Systems, p. 5.

  2. Calbimonte, J.-P., Ciortea, A., Kampik, T., Mayer, S., Payne, T. R., Tamma, V., & Zimmermann, A. (2023). Autonomy in the age of knowledge graphs: Vision and challenges. Transactions on Graph Data and Knowledge (TGDK). https://doi.org/10.4230/tgdk.1.1.13

    Article  Google Scholar 

  3. Vachtsevanou, D., Ciortea, A., Mayer, S., & Lemée, J. (2023). Signifiers as a first-class abstraction in hypermedia multi-agent systems. In: Proc. of the 2023 International Conference on Autonomous Agents and Multiagent Systems, pp. 1200–1208.

  4. Jones, S.J., & Laird, J.E. (2023) A cognitive architecture theory of anticipatory thinking. AI Magazine (June), 155–164. https://doi.org/10.1002/aaai.12102.

  5. Szpunar, K. K., Spreng, R. N., & Schacter, D. L. (2014). A taxonomy of prospection: Introducing an organizational framework for future-oriented cognition. Proceedings of the National Academy of Sciences, 111(52), 18414–18421. https://doi.org/10.1073/pnas.1417144111,https://arxiv.org/abs/www.pnas.org/doi/pdf/10.1073/pnas.1417144111

  6. Amos-Binks, A., & Dannenhauer, D. (2019). Anticipatory thinking: A metacognitive capability. In: Proceedings of the Workshop on Cognitive Systems for Anticipatory Thinking. https://doi.org/10.48550/arXiv.1906.12249.

  7. Amos-Binks, A., Dannenhauer, D., & Gilpin, L. H. (2023). The anticipatory paradigm. AI Magazine, 44(2), 133–143.

    Article  MATH  Google Scholar 

  8. Georgeff, M.P., & Lansky, A.L. (1987) Reactive reasoning and planning. In: Proc. of the Sixth National Conference on Artificial Intelligence (AAAI 87), pp. 677–682.

  9. Rao, A.S., & Georgeff, M.P. (1995). BDI agents: from theory to practice. In: Lesser, V. (ed.) Proceedings of the First International Conference on MultiAgent Systems (ICMAS’95), pp. 312–319. AAAI Pess, San Francisco, USA.

  10. Silva, L.d., Meneguzzi, F., & Logan, B. (2020). BDI agent architectures: A survey. In: Bessiere, C. (ed.) Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pp. 4914–4921 https://doi.org/10.24963/ijcai.2020/684.

  11. Russell, S. J., & Norvig, P. (2010). Artificial Intelligence: A Modern Approach (3rd ed.). New Jersey: Prentice Hall.

    MATH  Google Scholar 

  12. Ghallab, M., Nau, D., & Traverso, P. (2016). Automated Planning and Acting. Cambridge: Cambridge University Press.

    Book  MATH  Google Scholar 

  13. Sgaier, S. K., Huang, V., & Charles, G. (2020). The case for causal AI. Stanford Social Innovation Review, 18(3), 50–55. https://doi.org/10.48558/KT81-SN73

    Article  MATH  Google Scholar 

  14. Pearl, J., & Mackenzie, D. (2018). The Book of Why: The New Science of Cause and Effect. London: Basic Books.

    MATH  Google Scholar 

  15. Bordini, R.H., Hübner, J.F., & Wooldrige, M. (2007). Programming Multi-Agent Systems in AgentSpeak Using Jason. Wiley Series in Agent Technology. John Wiley & Sons, England https://doi.org/10.1002/9780470061848.

  16. Garcia, F., & Rachelson, E. (2013). 1. Markov Decision Processes, pp. 1–38. John Wiley & Sons, Ltd, UK https://doi.org/10.1002/9781118557426.ch1.

  17. Sardina, S., & Padgham, L. (2011). A BDI agent programming language with failure handling, declarative goals, and planning. Autonomous Agents and Multi-Agent Systems, 23(1), 18–70. https://doi.org/10.1007/s10458-010-9130-9

    Article  MATH  Google Scholar 

  18. Meneguzzi, F., & De Silva, L. (2015). Planning in BDI agents: A survey of the integration of planning algorithms and agent reasoning. The Knowledge Engineering Review, 30(1), 1–44. https://doi.org/10.1017/S0269888913000337

    Article  MATH  Google Scholar 

  19. Nebel, B., & Koehler, J. (1995). Plan reuse versus plan generation: A theoretical and empirical analysis. Artificial Intelligence, 76(1), 427–454. https://doi.org/10.1016/0004-3702(94)00082-C

    Article  MATH  Google Scholar 

  20. Babli, M., Sapena, Ó., & Onaindia, E. (2023). Plan commitment: Replanning versus plan repair. Engineering Applications of Artificial Intelligence, 123, 106275. https://doi.org/10.1016/j.engappai.2023.106275

    Article  MATH  Google Scholar 

  21. Bordini, R.H., Visser, W., Fisher, M., Pardavila, C., & Wooldridge, M. (2003). Model checking multi-agent programs with CASP. In: Pre-proceedings of Third Workshop on Automated Verification of Critical Systems (AVoCS 2003), 2–3 April, Southampton, U.K.

  22. Kamali, M., Dennis, L. A., McAree, O., Fisher, M., & Veres, S. M. (2017). Formal verification of autonomous vehicle platooning. Science of Computer Programming, 148, 88–106. https://doi.org/10.1016/j.scico.2017.05.006

    Article  Google Scholar 

  23. Ferrando, A., & Cardoso, R. C. (2023). Failure handling in BDI plans via runtime enforcement. In: Gal, K., Nowé, A., Nalepa, G.J., Fairstein, R., Radulescu, R. (eds.) ECAI 2023 - 26th European Conference on Artificial Intelligence, September 30 - October 4, 2023, Kraków, Poland - Including 12th Conference on Prestigious Applications of Intelligent Systems (PAIS 2023). Frontiers in Artificial Intelligence and Applications, vol. 372, pp. 716–723. IOS Press, ??? https://doi.org/10.3233/FAIA230336.

  24. Baitiche, H., Bouzenada, M., & Saïdouni, D.E. (2017). Towards a generic predictive-based plan selection approach for bdi agents. Procedia Computer Science 113, 41–48 https://doi.org/10.1016/j.procs.2017.08.283 . The 8th International Conference on Emerging Ubiquitous Systems and Pervasive Networks (EUSPN 2017) / The 7th International Conference on Current and Future Trends of Information and Communication Technologies in Healthcare (ICTH-2017) / Affiliated Workshops.

  25. Singh, D., Sardina, S., & Padgham, L. (2010). Extending BDI plan selection to incorporate learning from experience. Robotics and Autonomous Systems, 58(9), 1067–1075. https://doi.org/10.1016/j.robot.2010.05.008

    Article  MATH  Google Scholar 

  26. Singh, D., Sardina, S., Padgham, L., & James, G. (2011). Integrating learning into a BDI agent for environments with changing dynamics, pp. 2525–2530. https://doi.org/10.5591/978-1-57735-516-8/IJCAI11-420.

  27. Boissier, O., Bordini, R., Hübner, J. F., Ricci, A., & Santi, A. (2013). Multi-agent oriented programming with JaCaMo. Science of Computer Programming, 78(6), 747–761. https://doi.org/10.1016/j.scico.2011.10.004

    Article  MATH  Google Scholar 

  28. Pokahr, A., Braubach, L., & Lamersdorf, W. (2005). Jadex: A BDI reasoning engine. In: Bordini, R.H., Dastani, M., Dix, J., El Fallah Seghrouchni, A. (eds.) Multi-Agent Programming: Languages, Platforms, and Applications. Multiagent Systems, Artificial Societies, and Simulated Organizations, pp. 149–174. Springer, Cham.

  29. Hindriks, K. V. (2009). Programming rational agents in GOAL. In R. H. Bordini, M. Dastani, J. Dix, & A. E. F. Seghrouchni (Eds.), Multi-Agent Programming (pp. 119–157). Cham: Springer.

    Chapter  MATH  Google Scholar 

  30. Dastani, M. (2008). 2APL: A practical agent programming language. Autonomous Agent and Multi-Agent Systems, 16, 241–248.

    Article  MATH  Google Scholar 

  31. Bratman, M. E. (1987). Intention, Plans, and Practical Reason. Cambridge: Harvard University Press.

    Google Scholar 

  32. Cohen, P. R., & Levesque, H. J. (1987). Intention = choice + commitment. In: Proceedings of the 6th National Conference on Artificial Intelligence, pp. 410–415. Morgan Kaufmann, Cambridge.

  33. Logan, B., Thangarajah, J., & Yorke-Smith, N. (2017). Progressing intention progression: A call for a goal-plan tree contest. In: Proceedings of the 16th Conference on Autonomous Agents and MultiAgent Systems, AAMAS’17, pp. 768–772. https://doi.org/10.5555/3091125.3091234.

  34. Thangarajah, J., Padgham, L., & Winikoff, M. (2003). Detecting & Avoiding Interference Between Goals in Intelligent Agents. In: IJCAI’03: Proceedings of the 18th International Joint Conference on Artificial Intelligence, pp. 721–726.

  35. Dann, M., Thangarajah, J., & Li, M. (2023). Feedback-guided intention scheduling for bdi agents. In: Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems, AAMAS’23, pp. 1173–1181.

  36. Yao, Y., Logan, B., & Thangarajah, J. (2014). Sp-mcts-based intention scheduling for bdi agents. In: Proceedings of the Twenty-First European Conference on Artificial Intelligence. ECAI’14, pp. 1133–1134. IOS Press, NLD https://doi.org/10.5555/3006652.3006903

  37. Laird, J. E. (2019). The SOAR Cognitive Architecture. Cambridge: The MIT Press.

    MATH  Google Scholar 

  38. Söderström, T., & Stoica, P. (1989). System Identification. Saddle River, New Jersey: Prentice Hall.

    MATH  Google Scholar 

  39. Sutton, R. S., & Barto, A. G. (1998). Reinforcement Learning: An Introduction. Cambridge: Bradford.

    MATH  Google Scholar 

Download references

Acknowledgements

This work was produced at the research group headed by Professor Alessandro Ricci at the University of Bologna during the sabbatical of Professor Jomi F. Hübner. He expresses gratitude to the team for the inspiring conversations that took place at that time, which results include this paper. The sabbatical year was partially funded by Brazilian Agencies for Higher Education and Research: CNPq and CAPES, under the project PrInt CAPES-UFSC “Automation 4.0”.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jomi Fred Hübner.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

A Implementation

A Implementation

This appendix briefly describes the implementation of our proposal in Jason [15]. The implementation and the experiments are available at https://github.com/jomifred/future-bdi.

Regarding the environment model required by our proposal, a simulator should be provided. Several Jason applications, including the examples provided in the distribution, provide an environment simulator. In these cases, the environment model is easy to obtain.

Regarding the agent model. Since Jason agents do not decide their actions based only on the state of the environment, but consider all their mental state, the argument for the function \(\pi\) is the entire agent state (beliefs, plans, intentions,...). The environment state is indirectly considered because it is represented in the agents’ beliefs. Plans play an important role in the agent model, they define the set K of Fig. 8. In the case of the grid scenario, the agent goal is to be at some location and the plans for this goal (represented by pos(X,Y)) are the following:

figure f

All initial plans (marked with @) are options for the goal pos(X,Y). They are annotated with preference and cost. The preference annotation is used to order the options. The cost annotation is used to evaluated the chosen options.

The Jason agent reasoning cycle was customised so that whenever the agent has to select a plan for a goal, it creates a matrix (as introduced in Sect. 3) to foresee if the first option will produce a problem in the future. To build the matrix, we take the environment simulator and a clone of the agent. This clone has a customised architecture that redirects its perception and actions towards the simulator instead of the real environment. Although the environment is simulated in the matrix, the decisions of the agent are not simulated, its reasoning cycle is executed as usual in Jason.

The matrix runs until a problem is identified, a timeout is reached, or the goal is achieved. The notion of problem is: the environment returns to an already seen state, entering thus in a loop (the problem represented by \(p^l\) in Sect. 3).

In the case that a problem is identified, a failure event-!pos(X,Y) is produced for the goal and the developer can then decide how to handle it. In the experiments, we used the following code:

figure g

This plan can be read as follows: if there is failure in goal pos(X,Y) due to a problem FI in the future, use the internal action jason.future.plan_for to build a new plan for this goal using strategy solve_m. The internal action implements the search for alternative options and returns (in variable Plan) a Jason plan that avoids the future problem. This plan is added in the Plan Library as the preferred option for the goal. The goal is then retried.

In our implementation, the developer provides the environment and agent models, which are domain dependent. The matrix simulator, problem detection, and the search for alternative options are general and provided as a Jason customised agent architectures and internal actions.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hübner, J.F., Burattini, S., Ricci, A. et al. Reflexive anticipatory reasoning by BDI agents. Auton Agent Multi-Agent Syst 39, 7 (2025). https://doi.org/10.1007/s10458-025-09687-8

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10458-025-09687-8

Keywords