Abstract
An intriguing and relatively new metaphor in the programming community is that of an intelligent agent. The idea is to view programs as intelligent agents acting on our behalf. By using the metaphor of intelligent agents the programmer views programs as entities which have a mental state consisting of beliefs and goals. The computational behaviour of an agent is explained in terms of the decisions the agent makes on the basis of its mental state. It is assumed that this way of looking at programs may enhance the design and development of complex computational systems.
To support this new style of programming, we propose the agent programming language 3APL. 3APL has a clear and formally defined semantics. The operational semantics of the language is defined by means of transition systems. 3APL is a combination of imperative and logic programming. From imperative programming the language inherits the full range of regular programming constructs, including recursive procedures, and a notion of state-based computation. States of agents, however, are belief or knowledge bases, which are different from the usual variable assignments of imperative programming. From logic programming, the language inherits the proof as computation model as a basic means of computation for querying the belief base of an agent. These features are well-understood and provide a solid basis for a structured agent programming language. Moreover, on top of that 3APL agents use so-called practical reasoning rules which extend the familiar recursive rules of imperative programming in several ways. Practical reasoning rules can be used to monitor and revise the goals of an agent, and provide an agent with reflective capabilities.
Applying the metaphor of intelligent agents means taking a design stance. From this perspective, a program is taken as an entity with a mental state, which acts pro-actively and reactively, and has reflective capabilities. We illustrate how the metaphor of intelligent agents is supported by the programming language. We also discuss the design of control structures for rule-based agent languages. A control structure provides a solution to the problem of which goals and which rules an agent should select. We provide a concrete and intuitive ordering on the practical reasoning rules on which such a selection mechanism can be based. The ordering is based on the metaphor of intelligent agents. Furthermore, we provide a language with a formal semantics for programming control structures. The main idea is not to integrate this language into the agent language itself, but to provide the facilities for programming control structures at a meta level. The operational semantics is accordingly specified at the meta level, by means of a meta transition system.
Similar content being viewed by others
References
M. E. Bratman, Intentions, Plans, and Practical Reasoning, Harvard University Press: Cambridge, MA, 1987.
P. R. Cohen and H. J. Levesque, “Intention is choice with commitment,” Artificial Intelligence, vol. 42, pp. 213–261, 1990.
B. Dunin-Keplicz and J. Treur, “Compositional formal specification of multi-agent systems,” in M. J. Wooldridge and N. R. Jennings (eds), Intelligent Agents (LNAI 890), Springer-Verlag: Berlin, 1995, pp. 102–117.
R. E. Fikes and N. J. Nilson, “STRIPS: A new approach to the application of theorem proving to problem solving,” Artificial Intelligence, vol. 2(3–4), pp. 189–208, 1971.
M. Fisher, “A survey of concurrent metateM--The language and its applications,” in Proceedings of First International Conference on Temporal Logic (LNCS 827), Springer-Verlag: Berlin, 1994, pp. 480–505.
G. De Giacomo, Y. Lespérance and H. J. Levesque, “Reasoning about concurrent execution, prioritized interrupts, and exogenous actions in the situation calculus,” in M. E. Pollack (ed.), Proceedings of the Fifteenth International Joint Conference on Artificial Intelligence, Morgan Kaufman: Los Altos, CA, 1997, pp. 1221–1226.
G. De Giacomo and H. J. Levesque, “An incremental interpreter for high-level programs with sensing,” Department of Computer Science, University of Toronto, Technical Report, 1998.
K. V. Hindriks, F. S. de Boer, W. van der Hoek and J.-J. Ch. Meyer, “A formal embedding of AgentSpeak(L) in 3APL,” in G. Antoniou and J. Slaney (eds.), Advanced Topics in Artificial Intelligence (LNAI 1502), Springer-Verlag: Berlin, 1998, pp. 155–166.
K. V. Hindriks, E. S. de Boer, W. van der Hoek and J.-J. Ch. Meyer, “Failure, monitoring and recovery in the agent language 3APL,” in G. de Giacomo (ed.), AAAI 1998 Fall Symposium on Cognitive Robotics, 1998, pp. 68–75.
K. V. Hindriks, F. S. de Boer, W. van der Hoek and J.-J. Ch. Meyer, “Formal semantics for an abstract agent programming language,” in M. P. Singh, A. S. Rao and M. J. Wooldridge (eds.), Intelligent Agents IV (LNAI 1365), Springer-Verlag: Berlin, 1998, pp. 215–229.
K. V. Hindriks, F. S. de Boer, W. van der Hoek and J.-J. Ch. Meyer, “Formal semantics of the core of AGENT-0,” ECAI'98 Workshop on Practical Reasoning and Rationality, 1998, pp. 20–29.
K. V. Hindriks, F. S. de Boer, W. van der Hoek and J.-J. Ch. Meyer, “Control structures of rule-based agent languages,” in J. P. Müller, M. P. Singh and A. S. Rao (eds.), Intelligent Agents V (LNAI 1555), Springer-Verlag: Berlin, 1999, pp. 381–396.
K. V. Hindriks, F. S. de Boer, W. van der Hoek and J.-J. Ch. Meyer, “Semantics of communicating agents based on deduction and abduction,” Department of Computer Science, University Utrecht, Technical Report UU-CS-1999–09, 1999.
R. Kowalski and E. Sadri, “Towards a unified agent architecture that conmbines rationality with reactivity,” in Proc. International Workshop on Logic in Databases (LNCS 1154), Springer-Verlag: Berlin, 1996, pp. 137–149.
R. Kowalski, F. Toni and G. Wetzel, “Towards a declarative and glass-box clp language,” in N. E. Fuchs and G. Gottlob (eds.), in Proc. of the 10th Logic Programming Workshop, University of Zurich, 1994, (ifi-Report Nr. 94.10).
Y. Lespérance, H. J. Levesque, F. Lin, D. Marcu, R. Reiter and R. B. Scherl, “Foundations of a logical approach to agent programming,” in M. J. Wooldridge, J. P. Müller and M. Tambe (eds.), Intelligent Agents II (LNAI 1037), Springer-Verlag: Berlin, 1996, pp. 331–346.
J. W. Lloyd, Foundations of Logic Programming, Springer-Verlag: Berlin, 1987.
G. Plotkin, “A structural approach to operational semantics,” Aarhus University, Computer Science Department, Technical Reports, 1981.
A. Poggi, “DAISY: An object-oriented system for distributed artificial intelligence,” M. J. Wooldridge and N. R. Jennings (eds.), Intelligent Agents (LNAI 890), Springer-Verlag: Berlin, 1995, pp. 341–354.
A. S. Rao, “AgentSpeak(L): BDI agents speak out in a logical computable language,” in W. van der Velde and J. W. Perram (eds.), Agents Breaking Away (LNAI 1038), Springer-Verlag: Berlin, 1996, pp. 42–55.
A. S. Rao, “Decision procedures for propositional linear-time belief-desire-intention logics,” in M. J. Wooldridge, J. P. Müller and M. Tambe (eds.), Intelligent Agents II (LNAI 1037), Springer-Verlag: Berlin, 1996, pp. 33–48.
Y. Shoham, “Agent-oriented programming,” Artificial Intelligence, vol. 60, pp. 51–92, 1993.
M. P. Singh, Multiagent Systems (LNAI 799), Springer-Verlag: Berlin, 1994.
S. R. Thomas, “PLACA, an agent oriented programming language,” Ph.D. thesis, Department of Computer Science, Stanford University, 1993.
W. van der Hoek, B. van Linder and J.-J. Ch. Meyer, “A logic of capabilities,” in A. Nerode and Y. V. Matiyasevich (eds.), Proc. of the Third Int. Symposium on the Logical Foundations of Computer Science (LNCS 813), Springer-Verlag: Berlin, 1994, pp. 366–378.
B. van Linder, W. van der Hoek and J.-J. Ch. Meyer, “Formalising motivational attitudes of agents: On preferences, goals, and commitments,” in M. J. Wooldridge, J. P. Müller and M. Tambe (eds.), Intelligent Agents II (LNAI 1037), Springer-Verlag: Berlin, 1996, pp. 17–32.
M. J. Wooldridge, “A knowledge-theoretic semantics for concurrent MetateM,” in J. P. Müller, M. J. Wooldridge and N. R. Jennings (eds.), Intelligent Agents III (LNAI 1193), Springer-Verlag: Berlin, 1997, pp. 357–374.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Hindriks, K.V., De Boer, F.S., Van der Hoek, W. et al. Agent Programming in 3APL. Autonomous Agents and Multi-Agent Systems 2, 357–401 (1999). https://doi.org/10.1023/A:1010084620690
Issue Date:
DOI: https://doi.org/10.1023/A:1010084620690