Programming Intentional Agents: Exercises in Jason

Similar documents
XC2 Client/Server Installation & Configuration

The ICC Duckworth-Lewis-Stern calculator. DLS Edition 2016

Technology. Using Bluetooth

How to Download a Red App

The ICC Duckworth-Lewis Calculator. Professional Edition 2008

To Logon On to your tee sheet, start by opening your browser. (NOTE: Internet Explorer V. 6.0 or greater is required.)

The Complete 100 Day Dash Guide Updated May 7, 2013

Technology. Using Bluetooth

PC Configuration software for Discovery MkVI v 1.03 User guide

TEAM MANAGER LITE ENTRY INSTRUCTIONS

UNDERGROUND SURVEY WITH MINEMODELLER

REMOTE CLIENT MANAGER HELP VERSION 1.0.2

SQL LiteSpeed 3.0 Installation Guide

Table of Content IMPORTANT NOTE: Before using this guide, please make sure you have already set up your settings in

Diver-Pocket Diver-Pocket Premium

Fencing Time Version 4.3

Orange County HMIS HPRP QPR Quick Reference Guide

How to Setup and Score a Tournament. May 2018

Mac Software Manual for FITstep Pro Version 2

Quick Start Guide. For Gold and Silver Editions

Software Manual for FITstep Pro Version 2

Allocation of referees, hours and pistes User manual of Engarde - August, 2013

PRODUCT MANUAL. Diver-Mobile for Android

Page 1 GM-FAQ Club Profile FAQs. Page

Page 1 Make more profit from your betting at Betting Speed Evolution and the Race Advisor

Ameren Oracle ebusiness CCTM Supplier

[MYLAPS INTEGRATION]

Taking Your Class for a Walk, Randomly

Operating Manual. SUPREMA Calibration. Software for Fire and Gas Warning Units. Order No.: /01. MSAsafety.com

Diver-Office. Getting Started Guide. 2007, Schlumberger Water Services

Steltronic StelPad User Guide

USA Jump Rope Tournament Software User Guide 2014 Edition

Tournament Manager: Running a VEX IQ Event - Beginner

IMGA PAIRINGS INSTRUCTIONS USING the ONLINE GOLF GENIUS SOFTWARE ROGRAM Revised as of 12/31/2017

Microsoft Windows Software Manual for FITstep Stream Version 4

Blackwave Dive Table Creator User Guide

Sailwave Scoring Instructions for Thursday Night Races 2017

Instruction Manual. BZ7002 Calibration Software BE

Inspection User Manual

Wickets Administrator

Another window pops up where you can input some parameters (called System Preferences) for your team as shown

Club Administrator Procedures Manual

Version 3.1.0: New Features/Improvements: Improved Bluetooth connection on Windows 10

Integrate Riverbed SteelHead. EventTracker v8.x and above

(POM )

POM Patch 7. Service Request: OUTREACH-8673: POM help pages are accessed via http instead of https

PPG Pre-Print Card & Auto Teaming

Inspection User Manual This application allows you to easily inspect equipment located in Onix Work.

FIRST Tech Challenge Scorekeeper Manual Part II: Scoring System Guide (For League Meet & League Tournament Events)

RUNNING MEET MANAGER IN SUPPORT OF MEETS (2016) Greg Wright(6/3/16) First, YOU DO NOT NEED TO DO THIS UNLESS YOU ARE THE HOME TEAM

Savannah S100 ALD at SCIF, UC Merced Standard operating Procedure

Club s Homepage Use this feature to return the club s website.

DakStats Football Quick Start Guide 1 of 7

Quintic Automatic Putting Report

User Guide. Version Mindjet

Previous Release Notes

Kestrel HVK Gun Loader Sofware

Horse Farm Management s Report Writer. User Guide Version 1.1.xx

SCW Web Portal Instructions

IRB Staff Administration Guide

Items 1, 2, 3, and 4: Origination, CHC-A details, Tracking status, Administrative details

Setting up the Ingenico isc250 Pinpad via USB in Windows 8

VEX IQ CHALLENGE EVENT MANAGEMENT GUIDE

Team Manager's Manual

For running only the scoresheet application without any video features only some very basic hardware / software requirements have to be fulfilled:

LEINSTER CRICKET UNION OPEN COMPETITIONS COMMITTEE

ClubNet System Instructions

Tutorial 2 Time-Dependent Consolidation. Staging Groundwater Time-dependent consolidation Point query Line query Graph Query

Fastball Baseball Manager 2.5 for Joomla 2.5x

Boyle s Law: Pressure-Volume Relationship in Gases

Getting Started with the LabVIEW Toolkit for LEGO MINDSTORMS NXT

3. Select a colour and then use the Rectangle drawing tool to draw a rectangle like the one below.

Oracle ebusiness CCTM Supplier: Rate Card

BVIS Beach Volleyball Information System

Technology. In the My Files [My Files] submenu you can store all the programs that you have made on the NXT or downloaded from your computer.

Golf Genius Software

User Guide. Two-Wheeled Add-on. Created By: A-Lab Software Limited. Date Created: Feb Date Modified: Feb Revision: 1.

Carolinas GHIN Support

1. SYSTEM SETUP AND START TOURNAMENT... 8

Laboratory 2(a): Interfacing WiiMote. Authors: Jeff C. Jensen (National Instruments) Trung N. Tran (National Instruments)

1. First start a new scratch project and remove the default sprite.

CHRVA Scorer Certification Process Adult Provisional Scorer Certification Requirements

FIRST Tech Challenge Scorekeeper Manual Part II: Scoring System Guide (For Non-League Event Types)

Hot Springs Village Member Portal User Guide

DIVE MEET SCORING INSTRUCTIONS. Day before meet

LEO SEM SOP Page 1 of 9 Revision 1.4 LEO 440 SEM SOP. Leica Leo Stereoscan 440i

Diver Training Options

Users Manual for MSPDP Tab 5.04 DRAFT 9/15/17. Table of Contents

RUNNING A MEET WITH HY-TEK MEET MANAGER

LEGO Engineering Conferences ROBOLAB and MINDSTORMS Education Version 4.5 March 2008

FAQ RCGA Network. The RCGA is dedicated to offering you the best customer support possible. Our goal is to respond to your requests within 24hrs.

Observations Possible Causes Recommended Actions. Turquoise color

Inventor Hole Notes: How to Annotate with Drill Numbers Not Diameters Author: David Ponka, Senior Applications Expert Manufacturing

GN21 Frequently Asked Questions For Golfers

Race Screen: Figure 2: Race Screen. Figure 3: Race Screen with Top Bulb Lock

Wire Buddy Manual IOpath Software

GN21 Frequently Asked Questions For Golfers

MyCricket User Manual

Robot Soccer Challenge

CLUB REGISTRATION & SUPPORT / TICKETING

Transcription:

Programming Intentional Agents: Exercises in Jason Autonomous Systems Sistemi Autonomi Stefano Mariani, Andrea Omicini {s.mariani, andrea.omicini}@unibo.it Dipartimento di Informatica Scienza e Ingegneria (DISI) Alma Mater Studiorum Università di Bologna Academic Year 2014/2015 Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 1 / 19

Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 2 / 19

Getting Started Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 3 / 19

Getting Started Get Jason go to Jason home page http://jason.sourceforge.net/wp/ on the right, click on This will take you to the SourceForge download page... under Jason banner to go to Jason download page, on SourceForge http://sourceforge.net/projects/jason/files/ click on the quick link next to Looking for the latest version? to obtain Jason latest version (currently, 1.4.1) Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 4 / 19

Getting Started Install Jason Jason comes with its own IDE (jedit enhanced with Jason plugin), but also a Eclipse plugin exists: we will use Eclipse once downloaded Jason bundle, unpack it in any directory then run java -jar lib/jason.jar in a command prompt (assuming you are positioned within Jason directory, e.g. Jason-1.4.1/) a configuration window should pop-up, letting you set up the Jason runtime environment properties (e.g. location of Jason jar, available distribution infrastructures, etc.): be sure the Java Home field points to the JVM you want to use now open Eclipse and click Help > Install New Software... > Add.., then type in the Location field http://jason.sourceforge.net/eclipseplugin/juno/ for Juno or newer http://jason.sourceforge.net/eclipseplugin/ for Indigo click Ok and wait for the jasonide feature to appear, then tick the checkbox and step through the installation process (Eclipse restart included) Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 5 / 19

Basic Examples Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 6 / 19

Basic Examples Hello World in Eclipse, open the Jason perspective ( Window > Open Perspective > Other... > Jason ) then create a new Jason project (click on New icon on top left corner then selects Jason Project ) name the project and leave default options (centralised infrastructure without environment) two files are automatically created (filenames do matter: change them wisely).asl is the Jason agent source file.mas2j is the Jason MAS configuration file give a look at the code then right-click on.mas2j file and Run Jason Application : the MAS console window should pop-up, showing agent1 printing hello world. click button! Stop to stop MAS execution Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 7 / 19

Basic Examples Greeting go to http://jason.sourceforge.net/mini-tutorial/getting-started/ go to section Creation of a simple example and follow steps 1-8 (ignore JADE distribution) to set up another simple example 1 create a new project as done for the hello world example create new agents by right-clicking on src/asl/ source folder then selecting New > Agent and giving them a name (leave other fields as default): this will automatically add the newly created agent to the.mas2j configuration file 1 Icons do not match because the example is done in jedit, not Eclipse. Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 8 / 19

AgentSpeak(L) Example Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 9 / 19

AgentSpeak(L) Example Import Jason Project go to this lab APICe page 2 and download sa1415 agentspeakl.zip unzip it anywhere you want in Eclipse click File > Import... > Jason/Jason Project and in Select root directory browse to the folder you just unzipped (the one storing the.mas2j file), then click Finish (check Copy projects into workspace to have the source files copied, not linked) 2 http://apice.unibo.it/xwiki/bin/view/courses/sa1415lab Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 10 / 19

AgentSpeak(L) Example AgentSpeak(L) Very basic example of AgentSpeak(L) program featuring achievement-goal addition events belief addition events plan contexts test-goals Can you spot what should NOT be in an AgentSpeak(L) program? Hint: but can be in a Jason program... Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 11 / 19

Jason Example: Domestic Robot Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 12 / 19

Jason Example: Domestic Robot Scenario go to this course APICe page 3 and download sa1415 domesticrobot.zip from the attachments Domestic Robot A domestic robot has the goal of serving beer to its owner Thus, it receives beer requests from the owner, goes to the fridge, takes out a beer, brings it back to the owner The robot eventually orders beer using a nearby supermarket s home delivery service Also, the robot obeys hard-wired rules from the Department of Health (e.g. do not serve more than 10 beers a day ) 3 http://apice.unibo.it/xwiki/bin/view/courses/sa1415lab Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 13 / 19

Jason Example: Domestic Robot Highlights The robot should remember if beer is available irrespective of its location in the environment, because the perception about beer stock is available only when the robot is in front of the open fridge as soon as it closes the fridge, the perception is gone How to ensure that the robot will respond only to its owner s requests? What happens if we change the order of +!at(robot, P) plans? And if we drop the plan context from either one? Again, what happens if we change plans order in this case? How to ensure each external action is available only to the right agent? Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 14 / 19

Jason Example: ContractNet Protocol Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 15 / 19

Jason Example: ContractNet Protocol Scenario go to this course APICe page 4 and download sa1415 contractnetprotocol.zip from the attachments ContractNet Protocol One agent, called initiator, wishes to have some tasks performed, thus asks other agents, called participants, to bid to perform that task This asking message is called call for proposals (cfp, for short), and participants may reply by either sending their proposals or by refusing the call It can happen that participants do not even reply, so when a deadline chosen by the initiator expires, it evaluates the received proposals and selects one agent to perform the task 4 http://apice.unibo.it/xwiki/bin/view/courses/sa1415lab Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 16 / 19

Jason Example: ContractNet Protocol Highlights Note that plan @contracting is atomic: when it starts executing, no other intention is selected for execution before it finishes: the first action of the plan is to change the protocol state, which is also used in the context of the plan this ensures that the intention for the goal!contract is never performed twice Suppose the initiator wants to cancel the cfp add a plan in the initiator program for events such as +!abort(cnpid) which kind of illocutionary force (or performative) may this plan exploit to inform participants accordingly? hint basically, we want to remove an agent s belief from another agent... Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 17 / 19

Outline 1 Getting Started 2 Basic Examples 3 AgentSpeak(L) Example 4 Jason Example: Domestic Robot 5 Jason Example: ContractNet Protocol Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 18 / 19

Programming Intentional Agents: Exercises in Jason Autonomous Systems Sistemi Autonomi Stefano Mariani, Andrea Omicini {s.mariani, andrea.omicini}@unibo.it Dipartimento di Informatica Scienza e Ingegneria (DISI) Alma Mater Studiorum Università di Bologna Academic Year 2014/2015 Mariani & Omicini (DISI, Univ. Bologna) E1 - Jason A.Y. 2014/2015 19 / 19