GOAL agent programming language

Last updated

GOAL is an agent programming language for programming cognitive agents. GOAL agents derive their choice of action from their beliefs and goals. The language provides the basic building blocks to design and implement cognitive agents by programming constructs that 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 or practical reasoning.

Contents

Overview

The main features of GOAL include:

GOAL agent program

Blokken.png Elevatorworld.png
An example blocks world problem
Another Example: A GOAL Multi-Agent Elevator Controller [1]

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 language such as Prolog, Answer set programming, SQL (or Datalog), or the Planning Domain Definition Language, 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: <agentname> {   <sections> } 

The GOAL agent code used to illustrate the structure of a GOAL agent is an agent that is able to solve Blocks world 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-style specification of preconditions and postconditions. A precondition specifies when the action can be performed (is enabled). A postcondition 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))).   } } 

The GOAL agent programming language is related to but different from other agent programming languages such as AGENT0, AgentSpeak, 2APL, Golog, JACK Intelligent Agents, Jadex, and, for example, Jason. The distinguishing feature of GOAL is the concept of a declarative 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 and the reasoning capabilities required by cognitive agents.

See also

Related Research Articles

Logic programming is a programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic programming language families include Prolog, answer set programming (ASP) and Datalog. In all of these languages, rules are written in the form of clauses:

Prolog is a logic programming language associated with artificial intelligence and computational linguistics.

A proposition is a central concept in philosophy of language and related fields, often characterized as the primary bearer of truth or falsity. Propositions are also often characterized as being the kind of thing that declarative sentences denote. For instance the sentence "The sky is blue" denotes the proposition that the sky is blue. However, crucially, propositions are not themselves linguistic expressions. For instance, the English sentence "Snow is white" denotes the same proposition as the German sentence "Schnee ist weiß" even though the two sentences are not the same. Similarly, propositions can also be characterized as the objects of belief and other propositional attitudes. For instance if one believes that the sky is blue, what one believes is the proposition that the sky is blue.

Procedural knowledge is the knowledge exercised in the performance of some task. Unlike descriptive knowledge, which involves knowledge of specific facts or propositions, procedural knowledge involves one's ability to do something. A person doesn't need to be able to verbally articulate their procedural knowledge in order for it to count as knowledge, since procedural knowledge requires only knowing how to correctly perform an action or exercise a skill.

Soar is a cognitive architecture, originally created by John Laird, Allen Newell, and Paul Rosenbloom at Carnegie Mellon University. It is now maintained and developed by John Laird's research group at the University of Michigan.

ACT-R is a cognitive architecture mainly developed by John Robert Anderson and Christian Lebiere at Carnegie Mellon University. Like any cognitive architecture, ACT-R aims to define the basic and irreducible cognitive and perceptual operations that enable the human mind. In theory, each task that humans can perform should consist of a series of these discrete operations.

The intentional stance is a term coined by philosopher Daniel Dennett for the level of abstraction in which we view the behavior of an entity in terms of mental properties. It is part of a theory of mental content proposed by Dennett, which provides the underpinnings of his later works on free will, consciousness, folk psychology, and evolution.

Here is how it works: first you decide to treat the object whose behavior is to be predicted as a rational agent; then you figure out what beliefs that agent ought to have, given its place in the world and its purpose. Then you figure out what desires it ought to have, on the same considerations, and finally you predict that this rational agent will act to further its goals in the light of its beliefs. A little practical reasoning from the chosen set of beliefs and desires will in most instances yield a decision about what the agent ought to do; that is what you predict the agent will do.

The belief–desire–intention software model (BDI) 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. In essence, it provides a mechanism for separating the activity of selecting a plan from the execution of currently active plans. Consequently, BDI agents are able to balance the time spent on deliberating about plans and executing those plans. A third activity, creating the plans in the first place (planning), is not within the scope of the model, and is left to the system designer and programmer.

Answer set programming (ASP) 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 models—are used to perform search. The computational process employed in the design of many answer set solvers is an enhancement of the DPLL algorithm and, in principle, it always terminates.

<span class="mw-page-title-main">Intelligent agent</span> Software agent which acts autonomously

In artificial intelligence, an intelligent agent (IA) is anything which perceives its environment, takes actions autonomously in order to achieve goals, and may improve its performance with learning or acquiring knowledge. They may be simple or complex — a thermostat or other control system is considered an example of an intelligent agent, as is a human being, as is any system that meets the definition, such as a firm, a state, or a biome.

A "production system " is a computer program typically used to provide some form of artificial intelligence, which consists primarily of a set of rules about behavior but it also includes the mechanism necessary to follow those rules as the system responds to states of the world. Those rules, termed productions, are a basic representation found useful in automated planning, expert systems and action selection.

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

SNePS is a knowledge representation, reasoning, and acting (KRRA) system developed and maintained by Stuart C. Shapiro and colleagues at the State University of New York at Buffalo.

In artificial intelligence, action description language (ADL) is an automated planning and scheduling system in particular for robots. It is considered an advancement of STRIPS. Edwin Pednault proposed this language in 1987. It is an example of an action language.

B-Prolog was a high-performance implementation of the standard Prolog language with several extended features including matching clauses, action rules for event handling, finite-domain constraint solving, arrays and hash tables, declarative loops, and tabling. First released in 1994, B-Prolog is now a widely used CLP system. The constraint solver of B-Prolog was ranked top in two categories in the Second International Solvers Competition, and it also took the second place in P class in the second ASP solver competition and the second place overall in the third ASP solver competition. B-Prolog underpins the PRISM system, a logic-based probabilistic reasoning and learning system. B-Prolog is a commercial product, but it can be used for learning and non-profit research purposes free of charge. B-Prolog is not anymore actively developed, but it forms the basis for the Picat programming language.

Psi-theory, developed by Dietrich Dörner at the University of Bamberg, is a systemic psychological theory covering human action regulation, intention selection and emotion. It models the human mind as an information processing agent, controlled by a set of basic physiological, social and cognitive drives. Perceptual and cognitive processing are directed and modulated by these drives, which allow the autonomous establishment and pursuit of goals in an open environment.

A semantic decision table uses modern ontology engineering technologies to enhance traditional a decision table. The term "semantic decision table" was coined by Yan Tang and Prof. Robert Meersman from VUB STARLab in 2006. A semantic decision table is a set of decision tables properly annotated with an ontology. It provides a means to capture and examine decision makers’ concepts, as well as a tool for refining their decision knowledge and facilitating knowledge sharing in a scalable manner.

Agent-oriented programming (AOP) is a programming paradigm where the construction of the software is centered on the concept of software agents. In contrast to object-oriented programming which has objects at its core, AOP has externally specified agents at its core. They can be thought of as abstractions of objects. Exchanged messages are interpreted by receiving "agents", in a way specific to its class of agents.

2APL is a modular BDI-based programming language that supports the development of multi-agent systems. 2APL provides a rich set of programming constructs allowing direct implementation of concepts such as beliefs, declarative goals, actions, plans, events, and reasoning rules. The reasoning rules allow run-time selection and generation of plans based on declarative goals, received events and messages, and failed plans. 2APL can be used to implement muti-agent systems consisting of software agents with reactive as well as pro-active behaviours.

This glossary of artificial intelligence is a list of definitions of terms and concepts relevant to the study of artificial intelligence, its sub-disciplines, and related fields. Related glossaries include Glossary of computer science, Glossary of robotics, and Glossary of machine vision.

References

  1. The elevator simulator is originally written by Chris Dailey and Neil McKellar and is available in its original form via http://sourceforge.net/projects/elevatorsim.
Notes

Literature on the notion of a goal: