AF-AgentSpeak

From Agent Factory

Jump to: navigation, search

Introduction

AF-AgentSpeak (AF-AS) is a basic implementation of the Rao's AgentSpeak language for Agent Factory. It is intended primarily to demonstrate how Agent Factory can be used to rapidly prototype different Agent Programming Languages / Models. The implementation of the language is based on the well known Jason implementation of AgentSpeak with a few modifications:

  • There are some minor syntactic differences to the logic to make the language more consistent with AFAPL2.
  • The interface with the environment is realised through Actions and Sensors (similar to AFAPL2 Actuators and Perceptors) as opposed to an environment class.
  • Support for reuse is realised through a #include statement.

Additionally, AF-SE comes with a basic set of interfaces that can be used to debug programs via the Agent Factory Debugger.

A basic AF-SE example can be found in the Agent Factory Eclipse Plugin guide.

Basic Syntax

A program is a set of statements that may be a sensor declaration, an action declaration, a module declaration, or a plan rule.

<program> ::= (<sensor> | <action> | <module> | <plan-rule>) ";"

An action declaration is used to declare the primitive actions that an agent can perform. Action declarations map an action identifier to a class that is the Java implementation of the action.

<action> ::= action <id> -> <class>

A sensor declaration is used to declare the primitive sensing capabilities of an agent. Sensor declarations associate unique ids for the sensors of the agent and map these ids to the Java classes that implement the sensing capabilities.

<sensor> ::= sensor <id> -> <class>

A module declaration is used to declare a private resource of an agent. Modules are a combination of some internal data structures together with an associate set of actions that support manipulation of those data structures. Module declarations are used to associate unique ids

<module> ::= module <id> -> <class>

Plan Rule

<plan-rule> ::= <triggering-event> : <context> <- <plan-body>