ArticleslgStudy

science

3APL

3APL is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand 3APL rather than just read about it. In short: An Abstract Agent Programming Language or Artificial Autonomous Agents Programming Language or 3APL (pronounced triple-A-P-L) is an experimental tool and programming language for the development, implementation and testing of multiple cognitive agents using the Belief-Desire-Intention (BDI) approach. Overview 3APL was developed and is maintained by a team at the computer science department of Utrecht University in t…

Key takeaways

  • 3APL belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect 3APL to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of 3APL from memory before moving on to harder problems.

Reference excerpt

An Abstract Agent Programming Language or Artificial Autonomous Agents Programming Language or 3APL (pronounced triple-A-P-L) is an experimental tool and programming language for the development, implementation and testing of multiple cognitive agents using the Belief-Desire-Intention (BDI) approach.

Overview 3APL was developed and is maintained by a team at the computer science department of Utrecht University in the Netherlands. It facilitates specification of cognitive agent behavior using actions, beliefs, goals, plans, and rules. It has been subject to at least 15 papers and conferences, and at least 4 theses.

Platform The 3APL platform has a visual interface for the monitoring and debugging of agents being run therein, and a syntax-coloring editor for source code editing. It has been released as a Java-based software, which comes with some specification Java interfaces that can be used to develop Java-based plug-ins and libraries. These can be used to provide a visible representation of a virtual environment, for instance. A 3APL platform can also connect in client or server roles to other 3APL platforms across a network, to allow communication among 3APL agents on each platform. A lightweight version of 3APL for mobile applications, named 3APL-M "Toymaker", has also been released.

Language The 3APL language is relatively simple. The syntax has basic boolean logical operators AND, OR and NOT, with IF-THEN-ELSE conditional statements, and WHILE-DO control flow loop structures. While temporary variables cannot be created except by calling plug-in methods or belief/goal conditions, iterative counter loops can be constructed using a combination of WHILE-DO loops, beliefs and capabilities. A 3APL agent contains formal definitions of agent beliefs, capabilities, goals and plans. Specifically, there are six skeletal blocks that must be defined.

PROGRAM "agent" BELIEFBASE {} CAPABILITIES {} GOALBASE {} PLANBASE {} PG-RULES {} PR-RULES {}

The beliefs, defined using Prolog syntax, are used to remember information and to perform logical computations. Beliefs can be read by one another, edited by the capabilities, and read by conditional statements in the plans. The initial beliefs of an agent can be defined in its belief base.

BELIEFBASE { status(standby). at(0,0). location(r1,2,4). location(r5,6,1). dirty(r1). dirty(r5). }

Capabilities define the prerequisites and effects of actions in a STRIPS-like format, reading preexisting beliefs, removing some using the NOT operator, and adding new ones by stating them.

CAPABILITIES { {status(S1)} SetStatus(S2) {NOT status(S1), status(S2)}, {at(X1,Y1)} NowAt(X2,Y2) {NOT at(X1,Y1), at(X2,Y2)}, {dirty(R)} Clean(R) {NOT dirty(R)} }

Goals are also defined using Prolog syntax, and new goals can be adopted during runtime. Initial goals are defined in the goal base.

GOALBASE { cleanRoom(r1). cleanRoom(r5). }

Each goal ideally has associated goal planning rules, its PG rules, which serve as an abstract plans and are called from the goals as long as their guard conditions are met.

PG-RULES { cleanRoom(R) <- dirty(R) | { SetStatus(cleaning(R)); goTo(R); clean(R); SetStatus(standby); } }

The PG rules in turn can call plan revision rules, or PR rules, which serve as subroutines, and can be called upon to execute lower level and/or repetitive tasks as long as their guard conditions are met. Initial plans are defined in the plan base, executed at the beginning of the deliberation cycle.

PLANBASE { SetStatus(started); } PR-RULES { goTo(R) <- location(R,X,Y) AND NOT at(X,Y) | { NowAt(X,Y); } clean(R) <- location(R,X,Y) AND at(X,Y) | { Clean(R); } }

External methods may be called to access the environments modeled in the plug-ins. However, parameters cannot be directly passed to the methods, which means that the known environment must be correspondingly modeled in the agent's beliefs. The call returns a Prolog list, which can then be processed by the agent's own predicate logic.

Java("JanitorWorld", moveNorth(), M);

Agents can also communicate with one another using Send commands. When a piece of information X is sent with the performative P from agent A to agent B, the sending action is recorded in A's belief base as sent(B,P,X) and is registered in B's belief base as received(A,P,X).

Send(Partner,inform,dirty(R));

Download 3APL is available for download at the University of Utrecht's 3APL website, packaged with sample lone and communicative agents, and a discrete multi-agent foreground environment plug-in called BlockWorld.

See also Autonomous agent Cognitive architecture Agent communication language

Further reading 3APL User Guide for Java version Archived 2017-03-29 at the Wayback Machine 3APL deliberation cycle Archived 2013-06-19 at the Wayback Machine

External links 3APL Homepage

Worked examples

Example 1 — a first encounter with 3APL

Start with the simplest possible case. Write down what 3APL claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to 3APL before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about 3APL ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of 3APL

In research
3APL appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses 3APL in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
3APL is common in secondary-school and first-year university syllabi. It links to neighbouring topics Agent-based programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for 3APL outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “3APL” →

How to study 3APL in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what 3APL means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain 3APL out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is 3APL in simple terms?

An Abstract Agent Programming Language or Artificial Autonomous Agents Programming Language or 3APL (pronounced triple-A-P-L) is an experimental tool and programming language for the development, implementation and testing of multiple cognitive agents using the Belief-Desire-Intention (BDI) approac…

Why does 3APL matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study 3APL?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on 3APL.

Tags

  • Agent-based programming languages

Keep exploring