EEL 5937 The Bond Agent System (4) EEL 5937 Multi Agent Systems Lecture 18, March. 6, 2003 Lotzi Bölöni.

Slides:



Advertisements
Similar presentations
Introduction to NHibernate By Andrew Smith. The Basics Object Relation Mapper Maps POCOs to database tables Based on Java Hibernate. V stable Generates.
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10 Servlets and Java Server Pages.
Introduction to C Programming
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
TP4: S TATE M ACHINE D ESIGN P ATTERN  Definition  Infrastructure  Transition Code  Conclusion.
Lectures on File Management
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
Classes and Objects: Recap A typical Java program creates many objects which interact with one another by sending messages. Through the objects interactions,
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
1 Chapter 12 Working With Access 2000 on the Internet.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Classes and Objects  A typical Java program creates many objects which interact with one another by sending messages. Through the objects interactions,
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Guide To UNIX Using Linux Third Edition
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
INTRODUCTION TO WEB DATABASE PROGRAMMING
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
 2003 Prentice Hall, Inc. All rights reserved. 1 Introduction to Classes and Objects Outline Introduction Classes, Objects, Member Functions and Data.
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
MAIL MERGE Designing Documents with. Terms Mail Merge: A process that inserts variable information into a standardized document to produce a personalized.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
EEL 5937 What makes an agent? EEL 5937 Multi Agent Systems Lotzi Bölöni.
Introduction of Geoprocessing Topic 7a 4/10/2007.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Just as there are many human languages, there are many computer programming languages that can be used to develop software. Some are named after people,
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Introduction to Exception Handling and Defensive Programming.
EEL 5937 Agent models. EEL 5937 Multi Agent Systems Lecture 4, Jan 16, 2003 Lotzi Bölöni.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
EEL 5937 Ontologies EEL 5937 Multi Agent Systems Lecture 5, Jan 23 th, 2003 Lotzi Bölöni.
EEL 5937 Managing mutability in agents EEL 5937 Multi Agent Systems Lecture 26, April 10, 2003 Lotzi Bölöni.
DBT544. DB2/400 Advanced Features Level Check Considerations Database Constraints File Overrides Object and Record Locks Trigger Programs.
EEL 5937 The Bond Agent System (2) EEL 5937 Multi Agent Systems Lecture 9, Feb. 4, 2003 Lotzi Bölöni.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
EEL 5937 Agent communication EEL 5937 Multi Agent Systems Lotzi Bölöni.
EEL 5937 The Bond Agent System (3) EEL 5937 Multi Agent Systems Lecture 17, March. 4, 2003 Lotzi Bölöni.
Functions  A Function is a self contained block of one or more statements or a sub program which is designed for a particular task is called functions.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
GDT Tips and Tricks. GDT Tips and Tricks Doug Evans GDT 2004 International User Conference – Evolving the Legacy July  Tucson, Arizona GDT Tips.
EEL 5937 Mobile agents EEL 5937 Multi Agent Systems Lotzi Bölöni.
Introduction of Geoprocessing Lecture 9 3/24/2008.
EEL 5937 The Bond Agent System (1) EEL 5937 Multi Agent Systems Lecture 8, Jan 30, 2003 Lotzi Bölöni.
EEL 5937 Mobile agents (2) EEL 5937 Multi Agent Systems Lotzi Bölöni.
And other languages…. must remember to check return value OR, must pass label/exception handler to every function Caller Function return status Caller.
© 2004 Pearson Addison-Wesley. All rights reserved January 23, 2006 Creating Objects & String Class ComS 207: Programming I (in Java) Iowa State University,
Creating Java Applications (Software Development Life Cycle) 1. specify the problem requirements - clarify 2. analyze the problem - Input? Processes? Output.
© 2004 Pearson Addison-Wesley. All rights reserved September 5, 2007 Packages & Random and Math Classes ComS 207: Programming I (in Java) Iowa State University,
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED ADVANCE FEATURES.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Development Environment
Lecture 1 Introduction Richard Gesick.
Testing and Debugging.
Lecture 1 Runtime environments.
Lecture 22 Inheritance Richard Gesick.
Coding Concepts (Basics)
Lecture 5: Functions and Parameters
CodePainter Revolution Trainer Course
Lecture 1 Runtime environments.
Presentation transcript:

EEL 5937 The Bond Agent System (4) EEL 5937 Multi Agent Systems Lecture 18, March. 6, 2003 Lotzi Bölöni

EEL 5937 Bootstrapping a multi-agent system

EEL 5937 Bootstrapping multi-agent systems Creating a set of agents which will act in a coalition. –In practical deployments, only agents working on behalf a single user are started like this. All the projects can be seen as examples of this. –Even if some of the agents in the projects are in adversarial relations. It can be done: –By hand using the Jade Remote Agent Manager. –By a bootstrapping agent.

EEL 5937 Bootstrapping agent. A bootstrap agent –Bootstrap.py (see example in the prisoners dilemma directory) –Takes a bootstrap file as input. –Starts the agents described (potentially on multiple machines) –Terminates. The format of the bootstrap file: Example bootstrap file: localhost bond\applications\prisoners_dilemma\simple\Judge.py Judge localhost bond\applications\prisoners_dilemma\simple\Prisoner1.py Prisoner1 localhost bond\applications\prisoners_dilemma\simple\Prisoner1.py Prisoner2

EEL 5937 Basic strategies. Strategy database

EEL 5937 Strategy Database Contains a collection of general purpose strategies. Promotes code reuse. Utility strategies –Running applications System strategies –Running applications, running scripts –Transfering files (FTP etc) –Mail, Http Agent manipulation –Remotely starting, stopping agents, etc. Agent protocol implementation –Question/Reply –Contract net, auctions, etc.

EEL 5937 Utility strategies: WaitAndTransitionStrategy Usage: –addState(WaitAndTransitionStrategy()) –addState(WaitAndTransitionStrategy(5000, SUCCESS)) Functionality: –Waits for the specified number of milliseconds than performs the transition specified. Transition: –The transition specified (SUCCESS by default)

EEL 5937 Utility strategies: DummyStrategy Usage: –addState(DummyStrategy()) Functionality: –Blocks indefinitely. (Used for debugging) Transition: –None.

EEL 5937 Utility strategies: ShowMessageStrategy, ShowErrorStrategy Usage: –addState(ShowMessageStrategy(“Message”)) –addState(ShowMessageStrategy(“ErrorMessage”)) Functionality: –Shows a message / error message in a dialog box. Transitions when the user clicks on the button. Transition: –SUCCESS

EEL 5937 Utility strategies: ChoiceStrategy Usage: –addState(ChoiceStrategy(“Proceed?”)) Functionality: –Shows a dialog with the message with two buttons. Transition: –SUCCESS if the Yes button is pressed. –FAILURE if the No button is pressed.

EEL 5937 Utility strategies: ExitAgentStrategy Usage: –addState(ExitAgentStrategy()) Functionality: –Terminates the agent by calling doDelete(). Transition: –None (the agent will be terminated).

EEL 5937 Embedding Python/Blueprint code in strategies There is a special strategy called BlueprintStrategy which allows us to write the entire strategy in Python Useful for: –Rapid prototyping (no compilation needed) –Machine generated code. –Code with evaluated expressions. –Strategies which need the parsing capabilities of Python. Usage (in Blueprint) s = BlueprintStrategy(“print ‘Hello’\ncurrentStrategy.exitWith(SUCCESS)") S = BlueprintStrategy(blueprintfile=“Strategy1.py”)

EEL 5937 Python/Blueprint strategies The code you specify is going to be executed in the action() function. There are several predefined variables: –agent – points to the agent –currentStrategy – points to the current strategy Terminating the strategy: –currentStrategy.exitWith(SUCCESS) –Or FAILURE, IDLE etc. Remember, that this has to be valid Python code –Line alignment –Import You can use all the Java functionality as well. Most of the utility strategies are implemented this way.

EEL 5937 State in the agents

EEL 5937 Understanding the state and knowledgebase The knowledgebase of the agent contains highly structured, ontologically represented information There is also some other state information stored in the strategies themselves.

EEL 5937 Using the Jade “datastore” in Bond agents

EEL 5937 Using the data store The data store of strategies is a small associative memory attached to the individual strategies. It can store any Java object. Adding values to the data store: –String value = “Hello”; –getDataStore().put(“Label”, value); Retrieving values from the data store: –String value2 = getDataStore().get(“Label”) The data store is attached to strategies. Its role is essentially similar to local variables. Advantage: it can be managed when checkpointing or migrating agents (much more difficult for local variables…)

EEL 5937 Sharing data between strategies using data stores The planes and the multiplane state machine itself have their own data stores. This can be used to share data between strategies. Eg. sharing the data with all the strategies in the same plane: getPlane().getDataStore().put(“CommonValue”, “x”); Sharing the data with all the strategies in all planes: theAgent().getTheMultiplaneStateMachine(). getDataStore().put(“ReallyCommon”, “z”);

EEL 5937 Using the Protégé-2000 knowledgebase in Bond

EEL 5937 Using the Protégé-2000 knowledgebase Every Bond agent has a private knowledgebase, which is implemented using the Protégé-2000 backend. The knowledgebase is created when the agent started and deleted when terminated. –You can explicitly save it, however. The Bond knowledgebase can be accessed from the agent: –theAgent.getBondKnowledgeBase() You can also have access to the underlying Protégé-2000 knowledgebase directly: –theAgent.getBondKnowledgeBase().getProtegeKB(); –It is recommended that you use this only when it is really needed.

EEL 5937 Bond core ontology By default, the knowledgebase of a Bond agent contains this. –To check it in Protégé-2000, the file name is kb/BondCore.pprj Contains basic definitions: –AgentInfo, Belief, Desire, Intention –Program, File –Small ontology of time

EEL 5937 Domain specific ontologies (creating) Agent designers should create their own ontology specific to the problem the agent solves. For example: –Commerce ontology (money, products, customer types etc) –Battlefield ontology (units) –Geographical ontology (geographical entities, terrain types etc) Multiple agents can share the same ontology. Some agents might need more than one. When designing ontologies: –Ontologies might rely on each other (“include” concept in Protégé) –All domain specific ontologies can rely on BondCore

EEL 5937 Domain Specific Ontologies (importing in agents) The ontologies should be imported into agents in the Blueprint script: –includeKnowledgeBase(“Geography") –This assumes the existence of the file kb/Geography.pprj You don’t need to explicitly include BondCore You don’t need to explicitly include the ontologies on which your domain specific ontologies rely on. You can share domain ontologies between agents (these files will not be changed).

EEL 5937 Domain Specific Ontologies (using in strategies) theKB = theAgent.getBondKnowledgeBase(); Cls theClass = theKB.getCls(“Customer"); for (Iterator it=theClass.getDirectInstances().iterator(); it.hasNext(); ) { InstanceWrapper inst = new InstanceWrapper( (Instance) it.next(), theKB); String customer = inst.getSlotAsString(“Name"); System.out.println(“Customer = ” + customer) inst.setSlot(“Touched”, new Boolean(true)); }