3APL
Encyclopedia
An Abstract Agent Programming Language or Artificial Autonomous Agents Programming Language or 3APL is an experimental tool
Tool
A tool is a device that can be used to produce an item or achieve a task, but that is not consumed in the process. Informally the word is also used to describe a procedure or process with a specific purpose. Tools that are used in particular fields or activities may have different designations such...

 and programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 for the development, implementation and testing of multiple cognitive agent
Software agent
In computer science, a software agent is a piece of software that acts for a user or other program in a relationship of agency, which derives from the Latin agere : an agreement to act on one's behalf...

s using the Belief-Desire-Intention
BDI software agent
The Belief-Desire-Intention software model is a software model developed for programming intelligent agents. Superficially characterized by the implementation of an agent's beliefs, desires and intentions, it actually uses these concepts to solve a particular problem in agent programming...

 (BDI) approach.

Overview

3APL was developed and is maintained by a team at the computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

 department of the University of Utrecht in the Netherlands
Netherlands
The Netherlands is a constituent country of the Kingdom of the Netherlands, located mainly in North-West Europe and with several islands in the Caribbean. Mainland Netherlands borders the North Sea to the north and west, Belgium to the south, and Germany to the east, and shares maritime borders...

. It facilitates specification of cognitive agent behavior using actions, beliefs, goals, plans, and rules. It has been subject to at least 15 papers and conference
Academic conference
An academic conference or symposium is a conference for researchers to present and discuss their work. Together with academic or scientific journals, conferences provide an important channel for exchange of information between researchers.-Overview:Conferences are usually composed of various...

s, and at least 4 theses
Thesis
A dissertation or thesis is a document submitted in support of candidature for an academic degree or professional qualification presenting the author's research and findings...

.

Platform

The 3APL platform has a visual interface for the monitoring and debugging of agents being run therein, and a syntax
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....

-coloring editor
Text editor
A text editor is a type of program used for editing plain text files.Text editors are often provided with operating systems or software development packages, and can be used to change configuration files and programming language source code....

 for source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 editing. It has been released as a Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

-based software, which comes with some specification Java interface
Interface (Java)
An interface in the Java programming language is an abstract type that is used to specify an interface that classes must implement. Interfaces are declared using the interface keyword, and may only contain method signature and constant declarations...

s that can be used to develop Java-based plug-ins and libraries
Library (computer science)
In computer science, a library is a collection of resources used to develop software. These may include pre-written code and subroutines, classes, values or type specifications....

. These can be used to provide a visible representation of a virtual environment, for instance. A 3APL platform can also connect in client
Client (computing)
A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

 or server
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

 roles to other 3APL platforms across a network, to allow communication
Communication
Communication is the activity of conveying meaningful information. Communication requires a sender, a message, and an intended recipient, although the receiver need not be present or aware of the sender's intent to communicate at the time of communication; thus communication can occur across vast...

 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
Boolean logic
Boolean algebra is a logical calculus of truth values, developed by George Boole in the 1840s. It resembles the algebra of real numbers, but with the numeric operations of multiplication xy, addition x + y, and negation −x replaced by the respective logical operations of...

 logical operators AND
Logical conjunction
In logic and mathematics, a two-place logical operator and, also known as logical conjunction, results in true if both of its operands are true, otherwise the value of false....

, OR
Logical disjunction
In logic and mathematics, a two-place logical connective or, is a logical disjunction, also known as inclusive disjunction or alternation, that results in true whenever one or more of its operands are true. E.g. in this context, "A or B" is true if A is true, or if B is true, or if both A and B are...

 and NOT, with IF-THEN-ELSE conditional statement
Conditional statement
In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false...

s, and WHILE-DO control flow
Control flow
In computer science, control flow refers to the order in which the individual statements, instructions, or function calls of an imperative or a declarative program are executed or evaluated....

 loop structures. While temporary variables
Variable (programming)
In computer programming, a variable is a symbolic name given to some known or unknown quantity or information, for the purpose of allowing the name to be used independently of the information it represents...

 cannot be created except by calling plug-in methods or belief/goal conditions, iterative
Iteration
Iteration means the act of repeating a process usually with the aim of approaching a desired goal or target or result. Each repetition of the process is also called an "iteration," and the results of one iteration are used as the starting point for the next iteration.-Mathematics:Iteration in...

 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
Prolog
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...

 syntax, are used to remember information and to perform logical computation
Computation
Computation is defined as any type of calculation. Also defined as use of computer technology in Information processing.Computation is a process following a well-defined model understood and expressed in an algorithm, protocol, network topology, etc...

s. 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
STRIPS
In artificial intelligence, STRIPS is an automated planner developed by Richard Fikes and Nils Nilsson in 1971. The same name was later used to refer to the formal language of the inputs to this planner...

-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
Deliberation
Deliberation is a process of thoughtfully weighing options, usually prior to voting. In legal settings a jury famously uses deliberation because it is given specific options, like guilty or not guilty, along with information and arguments to evaluate. Deliberation emphasizes the use of logic and...

 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, parameter
Parameter
Parameter from Ancient Greek παρά also “para” meaning “beside, subsidiary” and μέτρον also “metron” meaning “measure”, can be interpreted in mathematics, logic, linguistics, environmental science and other disciplines....

s 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
Predicate logic
In mathematical logic, predicate logic is the generic term for symbolic formal systems like first-order logic, second-order logic, many-sorted logic or infinitary logic. This formal system is distinguished from other systems in that its formulae contain variables which can be quantified...

.


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
Discrete space
In topology, a discrete space is a particularly simple example of a topological space or similar structure, one in which the points are "isolated" from each other in a certain sense.- Definitions :Given a set X:...

 multi-agent foreground environment plug-in called BlockWorld.

Further reading

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK