GOAL Agent Programming Language
Encyclopedia
GOAL is an agent 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 programming rational agent
Rational agent
In economics, game theory, decision theory, and artificial intelligence, a rational agent is an agent which has clear preferences, models uncertainty via expected values, and always chooses to perform the action that results in the optimal outcome for itself from among all feasible actions...

s. GOAL agents derive their choice of action from their beliefs and goals. The language provides the basic building blocks to design and implement rational agents by means of a set of programming constructs. These programming constructs allow and facilitate the manipulation of an agent's beliefs and goals and to structure its decision-making. The language provides an intuitive programming framework based on common sense
Common sense
Common sense is defined by Merriam-Webster as, "sound and prudent judgment based on a simple perception of the situation or facts." Thus, "common sense" equates to the knowledge and experience which most people already have, or which the person using the term believes that they do or should have...

 or practical reasoning.

Overview

The main features of GOAL include:
  • Declarative beliefs: Agents use a symbolic, logical language to represent the information they have, and their beliefs or knowledge about the environment they act upon in order to achieve their goals. This knowledge representation language is not fixed by GOAL but, in principle, may be varied according to the needs of the programmer.
  • Declarative goals: Agents may have multiple goals that specify what the agent wants to achieve at some moment in the near or distant future. Declarative goals specify a state of the environment that the agent wants to establish, they do not specify actions or procedures how to achieve such states.
  • Blind commitment strategy: Agents commit to their goals and drop goals only when they have been achieved. This commitment strategy, called a blind commitment strategy in the literature, is the default strategy used by GOAL agents. Rational agents are assumed to not have goals that they believe are already achieved, a constraint which has been built into GOAL agents by dropping a goal when it has been completely achieved.
  • Rule-based action selection: Agents use so-called action rules to select actions, given their beliefs and goals. Such rules may underspecify the choice of action in the sense that multiple actions may be performed at any time given the action rules of the agent. In that case, a GOAL agent will select an arbitrary enabled action for execution.
  • Policy-based intention modules: Agents may focus their attention and put all their efforts on achieving a subset of their goals, using a subset of their actions, using only knowledge relevant to achieving those goals. GOAL provides modules to structure action rules and knowledge dedicated to achieving specific goals. Informally, modules can be viewed as policy-based intentions in the sense of Michael Bratman
    Michael Bratman
    Michael E Bratman is Durfee Professor in the School of Humanities & Sciences and Professor of Philosophy at Stanford University. His interests include philosophy of action and moral philosophy. His work in those areas led him to the Belief-Desire-Intention model that is used in many areas,...

    .
  • Communication at the knowledge level
    Knowledge level
    In artificial intelligence, knowledge-based agents draw on a pool of logical sentences to infer conclusions about the world. At the knowledge level, we only need to specify what the agent knows and what its goals are; a logical abstraction separate from details of implementation.This notion of...

    : Agents may communicate with each other to exchange information, and to coordinate their actions. GOAL agents communicate using the knowledge representation language that is also used to represent their beliefs and goals.

GOAL Agent Program

An Example Blocks World Problem
Another Example: A GOAL Multi-Agent Elevator Controller

A GOAL agent program consists of six different sections, including the knowledge, beliefs, goals, action rules, action specifications, and percept rules, respectively. The knowledge, beliefs and goals are represented in a knowledge representation
Knowledge representation
Knowledge representation is an area of artificial intelligence research aimed at representing knowledge in symbols to facilitate inferencing from those knowledge elements, creating new elements of knowledge...

 language such as 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...

, Answer set programming
Answer set programming
Answer set programming is a form of declarative programming oriented towards difficult search problems. It is based on the stable model semantics of logic programming. In ASP, search problems are reduced to computing stable models, and answer set solvers -- programs for generating stable...

, SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 (or Datalog
Datalog
Datalog is a query and rule language for deductive databases that syntactically is a subset of Prolog. Its origins date back to the beginning of logic programming, but it became prominent as a separate area around 1977 when Hervé Gallaire and Jack Minker organized a workshop on logic and databases...

), or the Planning Domain Definition Language
Planning Domain Definition Language
The Planning Domain Definition Language is an attempt to standardize planning domain and problem description languages. It was developed mainly to make the 1998/2000 International Planning Competitions possible....

, for example. Below, we illustrate the components of a GOAL agent program using Prolog.

The overall structure of a GOAL agent program looks like:

main: {

}


The GOAL agent code used to illustrate the structure of a GOAL agent is an agent that is able to solve Blocks world
Blocks world
The blocks world is one of the most famous planning domains in artificial intelligence. The program was created by Terry Winograd and is a limited-domain natural-language system that can understand typed commands and move blocks around on a surface....

 problems. The beliefs of the agent represent the current state of the Blocks world whereas the goals of the agent represent the goal state. The knowledge section listed next contains additional conceptual or domain knowledge related to the Blocks world domain.


knowledge{
block(a), block(b), block(c), block(d), block(e), block(f), block(g).
clear(table).
clear(X) :- block(X), not(on(Y,X)).
tower([X]) :- on(X,table).
tower([X,Y|T]) :- on(X,Y), tower([Y|T]).
}


Note that all the blocks listed in the knowledge section reappear in the beliefs section again as the position of each block needs to be specified to characterize the complete configuration of blocks.


beliefs{
on(a,b), on(b,c), on(c,table), on(d,e), on(e,table), on(f,g), on(g,table).
}


All known blocks also are present in the goals section which specifies a goal configuration which reuses all blocks.

goals{
on(a,e), on(b,table), on(c,table), on(d,c), on(e,b), on(f,d), on(g,table).
}


A GOAL agent may have multiple goals at the same time. These goals may even be conflicting as each of the goals may be realized at different times. For example, an agent might have a goal to watch a movie in the movie theater and to be at home (afterwards).

In GOAL, different notions of goal are distinguished. A primitive goal is a statement that follows from the goal base in conjunction with the concepts defined in the knowledge base. For example, tower([a,e,b]) is a primitive goal and we write goal(tower([a,e,b]) to denote this. Initially, tower([a,e,b]) is also an achievement goal since the agent does not believe that a is on top of e, e is on top of b, and b is on the table. Achievement goals are primitive goals that the agent does not believe to be the case and are denoted by a-goal(tower([a,e,b]). It is also useful to be able to express that a goal has been achieved. goal-a(tower([e,b]) is used to express, for example, that the tower [e,b] has been achieved with block e on top of block b. Both achievement goals as well as the notion of a goal achieved can be defined:


a-goal(formula) ::= goal(formula), not(bel(formula))
goal-a(formula) ::= goal(formula), bel(formula)


There is a significant literature on defining the concept of an achievement goal in the agent literature (see the references).

GOAL is a rule-based programming language. Rules are structured into modules. The main module of a GOAL agent specifies a strategy for selecting actions by means of action rules. The first rule below states that moving block X on top of block Y (or, possibly, the table) is an option if such a move is constructive, i.e. moves the block in position. The second rule states that moving a block X to the table is an option if block X is misplaced.


main module{
program{
if a-goal(tower([X,Y|T])), bel(tower([Y|T])) then move(X,Y).
if a-goal(tower([X|T])) then move(X,table).
}
}


Actions, such as the move action used above, are specified using 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...

-style specification of preconditions and postconditions. A precondition
Precondition
In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification....

 specifies when the action can be performed (is enabled). A postcondition
Postcondition
In computer programming, a postcondition is a condition or predicate that must always be true just after the execution of some section of code or after an operation in a formal specification. Postconditions are sometimes tested using assertions within the code itself...

 specifies what the effects of performing the action are.


actionspec{
move(X,Y) {
pre{ clear(X), clear(Y), on(X,Z), not(X=Y) }
post{ not(on(X,Z)), on(X,Y) }
}


Finally, the event module consists of rules for processing events such as percepts received from the environment. The rule below specifies that for all percepts received that indicate that block X is on block Y, and X is believed to be on top of Z unequal to Y, the new fact on(X,Y) is to be added to the belief base and the atom on(X,Z) is to be removed.


event module{
program{
forall bel( percept(on(X,Y)), on(X,Z), not(Y=Z) ) do insert(on(X,Y), not(on(X,Z))).
}
}

Download

GOAL is available for download from the GOAL webpage hosted at the Delft University of Technology
Delft University of Technology
Delft University of Technology , also known as TU Delft, is the largest and oldest Dutch public technical university, located in Delft, Netherlands...

. Besides the GOAL installer the GOAL webpage provides the GOAL Programming Guide, GOAL IDE User Manual, and a Video Tutorial.

Related Agent Programming Languages

The GOAL agent programming language is related to but different from other agent programming languages such as [ftp://db.stanford.edu/pub/cstr/reports/cs/tr/91/1389/CS-TR-91-1389.pdf AGENT0], AgentSpeak
AgentSpeak
AgentSpeak is an agent-oriented programming language. It is based on logic programming and the BDI architecture for autonomous agents...

, 2APL, Golog, JACK Intelligent Agents
JACK Intelligent Agents
JACK Intelligent Agents or JACK is a framework in Java for multi-agent system development. JACK Intelligent Agents was built by Agent Oriented Software Pty. Ltd. and is a third generation agent platform building on the experiences of the Procedural Reasoning System and Distributed Multi-Agent...

, Jadex, and, for example, Jason. The distinguishing feature of GOAL are the concept of a declarative
Declarative
Declarative may refer to:* Declarative learning, acquiring information that one can speak about* Declarative memory, one of two types of long term human memory* Declarative programming, a computer programming programming paradigm...

 goal. Goals of a GOAL agent describe what an agent wants to achieve, not how to achieve it. Different from other languages, GOAL agents are committed to their goals and only remove a goal when it has been completely achieved. GOAL provides a programming framework with a strong focus on declarative programming
Declarative programming
In computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. Many languages applying this style attempt to minimize or eliminate side effects by describing what the program should accomplish, rather than...

 and the reasoning capabilities required by rational agents.

See also

  • Autonomous agent
    Autonomous agent
    An autonomous agent is an intelligent agent operating on an owner's behalf but without any interference of that ownership entity. An intelligent agent, however appears according to a multiply cited statement in a no longer accessible IBM white paper as follows:Intelligent agents are software...

  • Agent communication language
  • Declarative programming
    Declarative programming
    In computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. Many languages applying this style attempt to minimize or eliminate side effects by describing what the program should accomplish, rather than...

  • Cognitive architecture
    Cognitive architecture
    A cognitive architecture is a blueprint for intelligent agents. It proposes computational processes that act like certain cognitive systems, most often, like a person, or acts intelligent under some definition. Cognitive architectures form a subset of general agent architectures...

  • Practical reasoning
  • Rational agent
    Rational agent
    In economics, game theory, decision theory, and artificial intelligence, a rational agent is an agent which has clear preferences, models uncertainty via expected values, and always chooses to perform the action that results in the optimal outcome for itself from among all feasible actions...


External links

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