Practical work on Agent Oriented Programming: The Jason Language

Introduction

The Jason (Java-based interpreter for an exended version of AgentSpeak) can be dowloaded from: http://sourceforge.net/projects/jason/ or locally. The current version is 1.3.8

Configuration

  • The Jason Platform is installed on your working environment (under Windows in Program Files)
    • If this is not the case or if you are working under Linux, you have to download and install the Jason platform in the MAOP directory to have the complete distribution with examples, documentation, tutorial

To do

  • Launch the Jason program and configure it so that it points to the right Java distribution (see Eclipse plugin for some help). After having configured the Jason program, you can quit.
  • Launch Eclipse IDE. The JaCaMo plugin is already installed in your Eclipse IDE (under windows).
    • If this is not the case, you can install the plugin from http://jason.sourceforge.net/eclipseplugin/ in the eclipse IDE
    • You can also use the JEDIT IDE which is distributed with Jason with a dedicated plugin. In this part of the practical work you can use either Eclipse or JEDIT. In the other parts of the practical work we will use Eclipse IDE.

First steps in Jason

  • To start learning and using Jason, we will follow the tutorial where you'll learn how to install Jason and write some Jason Program.

Exercise

  • Do the tutorial (This tutorial use the JEDIT IDE, but you can do it without any difficulties using the ECLIPSE IDE, in case of problems for the creation of a project, of agents, just have a look here).
  • Do the following changes to the "sending hello" exercise:
    • Create another agent called "alice" who sends "bonjour" to bob ;
    • Change "bob"'s code so that as soon as he receives a message, he replies to the sender with the same content ;
    • Change the code of the agents "bob" and "alice" so that they fall into an infinite loop of message exchanges.

Jade and Jason

  • Using Jade and Jason is quite easy.

Exercise

Note

The list of all available standard actions are described in the jason.stdlib package described in the standard documentation (available here)


Olivier Boissier, May 2013