GOAL agent programming language


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.

Overview

The main features of GOAL include:
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 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:

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

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

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

goals

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.
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 is a primitive goal and we write goal to denote this. Initially, tower 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. It is also useful to be able to express that a goal has been achieved. goal-a is used to express, for example, that the tower 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 ::= goal, not
goal-a ::= goal, bel

There is a significant literature on defining the concept of an achievement goal in the agent literature.
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 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

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. A postcondition specifies what the effects of performing the action are.

actionspec

Related agent programming languages

The GOAL agent programming language is related to but different from other agent programming languages such as , AgentSpeak, 2APL, , JACK Intelligent Agents, , and, for example, . 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.