Home
Jason JGOMAS User Manual (English)
Contents
1. gt Socket DF JADE AMS Figure 1 Jason JGOMAS Architecture 2 2 Maps JGOMAS can use different maps to define your virtual environment These maps by default are of size 256 x 256 so that the position of the agents is given by its coordinates x y z where x z take values between 0 and 255 while in the maps supplied y is always equal to 0 these maps do not have height Each agent has partial access to the map where the game is played since despite having access to static infor mation about it can only perceive objects that are at a distance within the cone of vision The maps are stored in the bin data maps folder of the distribution In this folder there is a subfolder for each map with the name map XX where XX is the number of the map In this folder there are several files that de fine the map For example the content of the map 04 folder is as follows e map 04 cost txt This file defines the walls of the map by means of to indicate it The content of this file IS 2K AK CK CK K OK OK RR K CE CE OK OK OK CE OK OK OK CE CE K CE OK K KKK XX XA X X X X X X X X X X X X X KF KF X XX X XA X XA X X X X X X X X X X X X Jason JGOMAS Manual 3 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial ck x KK OK OK OK K K K xk KK KKK KKK KK K K K K 2K AK CK CK K OK K OK OK K PE OK OK CE OK CE OK O
2. Grupo de Tecnolog a Inform tica Inteligencia Artificial JASON JGOMAS JASON JGOMAS Manual Grupo de Tecnolog a Inform tica 1 Introduction This paper presents a Multi Agent social simulator System based on JADE and Jason that has been developed to meet different purposes The principal is to serve as a starting point for a study of the feasibility of integra tion of Multi Agent Systems MAS and Virtual Reality VR Thus combines a 3D graphical display with a MAS which can be used in a qualitative evaluation of the current implementation of the MAS So JGOMAS Game Oriented Multi Agent System based on JADE and Jason is a test platform to study the integration between MAS and RV also allowing it to be used as a validation tool for MAS A capture the flag kind of game has been selected as simulation of the environment in the MAS developed In this kind of games two teams red and blue allies and axis must compete to capture the opponent s flag This type of game has become a standard in almost all multi player games that have have appeared since Quake game It is very easy and intuitive to implement MAS in such games because every soldier can be seen as an agent Moreover a team of agents must cooperate to achieve the objective of the team competing with the other team In our version of capture the flag the two teams are the allies and axis Allied agents must go to the base of the shaft capture the flag
3. Version 3 7 0 Build id 120110613 1736 c Copyright Eclipse contributors and others 2000 2011 All rights reserved Visit http www eclipse org platform This product includes software developed by the Apache Software Foundation http www apache org Installation Details Step 3 Select the Jasonide feature and click on the Update button fe Eclipse SDK Installation Details Installed Software Installation History Features Plug ins Configuration Version b Wh Eclipse SDK 3 7 0 120110613 173 org eclipse sdk ide FF Jasonide feature 1 0 5 201204151421 jasonide feature feature grou ason is an interpreter for an extended version of AgentSpeak ason is distributed under LGPL see file LICENSE in the Jason directory Jason JGOMAS Manual G T Grupo de Tecnolog a Inform tica Inteligencia Artificial 7 8 How to unistall the Jason plugin Step 1 Click on the Help menu and go to the option About Eclipse SDK Jason Eclipse SDK File Edit Navigate Search Project Run Window lt Welcome Help Contents Search Dynamic Help Key Assist Shift Cti L Tips and Tricks Cheat Sheets Check for Updates Install New Software About Eclipse SDK Step 2 Press the Installation Details button fe About Eclipse SDK Eclipse SDK Version 3 7 0 Build id 120110613 1736 c Copyright Eclipse contributors and others 2000 2011 All rights reserved Visit http www eclipse or
4. fieldops ALLIED offered by all fieldops agents of the ALLIED team backup ALLIED offered by all soldier agents of the ALLIED team register JGOMAS type It is used to register in the DF a service of the type type by the agent that executes it Ex register JGOMAS medic AXIS registers in the DF the service medic AXIS send msg with conversation id Rec Perf Cont ConvId It is used to send a message with a conversation id required by compatibility issues with the manager and the rest of agents Ex send msg with conversation id ag1 tell Content CFA sends a message to agent agl with the performative tell with the content Content and with the conversation id CFA that means Jason JGOMAS Manual 35 Grupo de Tecnologia Informatica Inteligencia Artificial Call for Ammo Jason JGOMAS Manual 36 Grupo de Tecnologia Informatica Inteligencia Artificial 9 4 Objectives Available objectives and plans that can be used but not modified look This objective is triggered for an agent to trigger the objects in its surroundings and updates fo vObjects ObjList which can be used to check the closer objects Its usage is internal it is not necessary to use it Ishot 0 This objective is triggered when the agent decides to shoot ladd_task task TaskPriority TaskType Agent Position Content ladd_task task TaskType Agent Position Content These two objectives
5. The code would be the following my position X Y Z2 my team AXIS El concat goto X Y Z Content1 send msg with conversation id E1 tell Content1 INT NOTE INT is a made up conversation identifier and its usage is recommended because there exist certain internal identifiers that may lead to an undesired agent behavior is they are used Following the same example the rest of agents of the team will have a plan with this shape goto X Y Z source A println Received a message of the type goto from A In this case the agent that receives the message only prints the received message but a more complex action may be carried out such as change the task to make by the agent that receives the message In this case the code would be goto X Y Z source A lt printin Received a goto message from A l add task task TASK GOTO POSITION A pos X Y Z state standing goto _ _ _ Jason JGOMAS Manual 10 CIT I ea 7 Appendix Jason Eclipse Plugin 7 1 Instalation In order to install the Jason plug in for Eclipse you should follow the steps below and have Eclipse version 3 7 0 Indigo or greater Step 1 Download the latest version of Jason at the link http sourceforge net projects jason files Step 2 After the download unpack it in any directory of your machine Step 3 If you had never run Jason on your computer execute the file lib j
6. Find more software by working with the Available Software Sites preferences Add Repository Location http jason sourceforge net eclipseplugin Select All Details o Show only the latest versions of available software O Hide items that are already installed Group items by category What is already installed O Show only software applicable to target environment Contact all update sites during install to find required software eme Step 7 Tick the option jasonide and then press the next button So you have to wait a moment while Eclipse search the dependences Work with jasonide http jason sourceforge net eclipseplugin Find more software by working with the Available Software Sites preferences Name Version Vv nY jasonide 4 Jasonide feature 1 0 0 201203182034 Jason JGOMAS Manual 13 G T Grupo de Tecnologia Informatica Inteligencia Artificial Step 8 In the next windows just press the next button again Install Install Details Review the items to be installed Name Version 7 Jasonide feature 1 0 0 201203182034 jasonide feature feature group Size Unknown Details Jason is an interpreter for an extended version of AgentSpeak First release December 2003 lason is distributed under LGPL see file LICENSE in the lason directorv Step 9 The last window that will be shown for you is about the license
7. Tick the option I accept the terms of the li cense agreements and then press the finish button Then the installation is proceeded it could take several minutes so please wait Step 10 In the end of these process will be shown a window in order to complete the installation Choose the option Restart Now Software Updates You will need to restart Eclipse SDK for the installation changes to take effect Y You may try to apply the changes without restarting but this may cause errors Not Now Apply Changes Now Restart Now Step 11 Now you have all set In order to test the installation of the plug in we suggest the creation of a simple hello world project You could do it in the menu File New Jason Project or File New Other Jason Jason Project Jason JGOMAS Manual 14 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial Select a wizard Create a Jason Project Wizards type filter text P gt General P cvs gt gt Eclipse Modeling Framework v E Jason Agent AS CArtAgO Artifact Internal Action Jason Project Step 12 Fill out the field Project name and press the Finish button z New Jason Project New Jason Project This wizard creates a new Jason Project Project name helloworld Infrastructure Centralised Environment Without environment 2 Jason JGOMAS
8. ment the plan associated to the creation of this event 6 Communication It is necessary to highlight that an agent plays only one role during the whole game if an agent Al is created as a soldier of the type Soldier and belong to the AXIS side it will be for the rest of the game Each role has different features and offers specific basic services that can be improved Indicating the role and the basic services offered by an agent is carried out at the initialization using a process known as Registration Nevertheless an agent can add new services during the development of the game 6 1 Registration A role has to register a service to allow the other role to request it Registration is carried out using the internal function register JGOMAS type In this example it is registered the service type by the agent who invoked the function The registration is used to register in the DF a service of the type type by the agent who executed it Ex register JGOMAS medic AXIS registers the service medic AXIS into the DF Exists a set of existing services depending on the role played by the soldier agent e Inthe case of ALLIED agents they register in a transparent way that they belong to this side so the rest of agents of their team may know about that Pegister TEAM ALLIED In the case of allied soldier agents it is registered the service backup ALLIED register JGOMAS backup ALLIED In the
9. v src asl 2 sample_agent asl P c9src java Istart b as jason jar home me b amp bin gt e start true lt print hello world helloworld mas2j Initial goals Plans MAS Console helloworld agent1 hello world run Running project helloworld 7 2 How to cr ate an agent Step 1 v i5 helloworld Rz src asl 2 samp MEA M ES Project Go Into A las Open Type Hierarchy i i gt w jason jar Show In Shift Alt W Annotation bin _ Class gt ese Copy cic S enum Interface Package Source Folder 9 helloworl Es Copy Qualified Name Paste Ctrl V X Delete Delete Remove from Context Shift Ctrl Alt Down P jogo Build Path gt FY Example Source Shiftt Alt S gt Refactor Shift FAlt zT gt ES Other Ctrl N Import ey Export Refresh Run As Step 2 Fill out the form The only required field is the name of the agent After it press the Finish button Jason JGOMAS Manual 17 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial New Jason Agent New Jason Agent This wizard creates a new Jason Agent Create agent in project helloworld Source Agent class Architecture class c4jason CAgentArch Number of agents 5 Verbose normal v Host to run localhost Step 3 The agent will be created and will be automatically added in the mas2
10. GET OBJECTIVE is 1000 manager Manager Indicates the name of the Manager agent It is not required to be modified team X Belief that indicates the team where an agent belongs to AXIS or ALLIED type X Indicates the type of soldier that the agent is CLASS SOLDIER CLASS MEDIC or CLASS FIELDOPS patrollingRadius X Only to agents of the team AXIS It is used to indicate the radius when patrolling Initially is 64 The higher the value the further the agents will be of the object to patrol around fovObjects Contains the list of objects currently seen by the agent The structure of an object is TEAM TYPE ANGLE DISTANCE HEALTH POSITION Example 1 200 1 0 58 14 76 78 pos 214 0 219 the object 1 of the team 200 AXIS type 1 agent with angle 0 58 with a distance of 14 76 a health 78 and its position is pos 214 0 219 Note The TEAM values are 100 Allied 200 Axis 1003 flag aimed false Indicates that the agent has no enemy to aim aimed true Indicates that the agent has an enemry to shoot Jason JGOMAS Manual 33 C T Grupo de Tecnologia Informatica Inteligencia Artificial medicAction on Indicates that the medic agent is going to help medicAction off Indicates that the medic agent will not help fieldopsAction on Indicates that the fieldops agent is decided to help fieldopsAction off Indicates that the fieldops agents is not decided to help objecti
11. This objective is triggered when the agent is shot It is necessary to implement the plan associated to the crea tion of this event to take a decision For example run if the agent has a low life value perform no ammo action Jason JGOMAS Manual 37 C T Grupo de Tecnologia Informatica Inteligencia Artificial This objective is triggered when the agent shoots and has no ammo It is necessary to implement the associat ed plan to take a decision For example to run performThresholdAction This objective is triggered when the agent has less life or bullets than the thresholds my ammo threshold X and my health threshold X An easy implementation of the associated plan is available which asks for help to medics or fieldops of its team It is interesting to improve the plan to take a more refined solution IcheckMedicAction Medics only This objective is triggered when a medic agent receives a help request An easy implementation is available which decides to always help generating the belief medicAction on It is interesting to improve that plan to take a more refined solution and sometimes to generate the belief medicAction off which makes the agent to not attend the petition because it is not interested IcheckAmmoAction Fieldops only This objective is triggered when a fieldops agent receives a help request An easy implementation of the asso ciated plan is available which always decides to help generating the be
12. and TYPE is the type of the agent soldier MEDIC FIELDOPS Therefore there are 6 files covering all possible types of agents jasonAgent ALLIED asl jasonAgent ALLIED MEDIC asl jasonAgent ALLIED FIELDOPS asl jasonAgent AXIS asl jasonAgent AXIS MEDIC asl jasonAgent AXIS FIELDOPS asl Regarding agent beliefs the main ones are e tasks task list Contains the list of active tasks of the agent Ex tasks task 1000 TASK GET OBJECTIVE Manager pos 224 0 224 task 1001 TASK WALKING PATH A2 pos 204 0 228 In this example the list has two active tasks task 1000 TASK GET OBJECTIVE Manager pos 224 0 224 that indicates that has to get the ob jective the flag that is in the position pos 224 0 224 The priority assigned to this task is 1000 task 2000 TASK GIVE MEDIPAKS A2 pos 204 0 228 that indicates that has to go to the posi tion pos 204 0 228 where the agent A2 is waiting for medicine packs the agent with this active task is an agent The priority assigned to this task is 2000 Jason JGOMAS Manual 6 C T Grupo de Tecnologia Informatica Inteligencia Artificial e fovObjects object_list Contains the list of objects currently seen by the agent The structure of an object is TEAM TYPE ANGLE DISTANCE HEALTH POSITION Example 1 200 1 0 58 14 76 78 pos 214 0 219 the object 1 of the team 200 AXIS type 1 agent with angle 0 58 with a distance of 14 76 a healt
13. are triggered to add a new task in the list of tasks of the agent 9 5 Objectives Available objectives and plans that may be modified linit This objective is triggered once during agent initialization Its associated plan can be used to introduce beliefs or new objectives required for the designed strategy lupdate targets This objective can be used to update the tasks and its priorities It is invoked when the agent changes to the standing state and has to choose a new task among the available ones It is necessary to implement the plan associated to the creation of this event perform look action This object is invoked when the agent looks around and update the list of surrounding objects fovObjects L It would be necessary to implement the plan associated to the creation of this event to be able look what is around Iget agent to aim This objective is invoked after perform look action and it would be used to decide if there is any enemy to aim An easy implementation of the associated plan is available It is interesting to improve the mentioned as sociated plan to take a more refined solution about who to aim Iperform aim action This objective is triggered if there is an enemy to aim which can be used to take a decision about what to do with the aimed agent An easy implementation of the plan is available It is interesting to improve this plan to take a more refined decision about who to aim Iperform injury action
14. JADE platform as support for JGOMAS Multi Agent System which is comprised of agents one of them acting as controller other agents and as an interface for the application of graphical display The Multi Agent System JGOMAS can be viewed as a kernel basic package which provides an interface for the graphical display to connect to the current game 2 1 Agents Taxonomy We can establish the following taxonomy of agents within JGOMAS according to their functionality e Internal agents are those who form themselves the JGOMAS management platform Their behaviors are pre defined and the user cannot change them These agents are JADE agents and there exist the follow ing types e Manager This is a special agent Its main objective is to coordinate the current game In addition you must answer requests from other agents Another task that it is responsible for is to provide an inter face for graphics viewers Therefore any instance of the graphical display can be connected to cur rent game and display the 3D virtual environment e Pack There are three different types of packs the medic packs used to give health to agents ammo packs used to give ammunition to agents and objective packs i e the flag to capture All these agents are dynamically created and destroyed with the exception of the flag there exists only one flag throughout the game and cannot be destroyed e External agents They are the current players They have a predefin
15. K OK CE OK CE CE CE CE OK CE K OK K K K e map 04 terrain bmp This file defines the artistic look of the map as you can see in the image on the left of Figure 2 e map 04 cost bmp This file defines the walls of the map using a black and white image where black rep resents the wall as you can see in the image on the right of Figure 2 Figure 2 Left map 04 terrain bmp Right map 04 cost bmp e map_04 txt This file contains the definition of different settings for the MAS and graphic display e JADE OBJECTIVE Flag initial location e JADE SPAWN ALLIED Allied base location e JADE SPAWN AXIS Axis base location e JADE COST MAP Size and name of the cost file e RENDER ART MAP Size and name of the file containing the artistic look of the map e RENDER COST MAP Size and name of the file containing the artistic look of the map costs e RENDER HEIGHT MAP Size and name of the file containing the artistic look of the map heights The content of this file is the following JADE JADE OBJECTIVE 28 28 JADE SPAWN ALLIED 2 28 4 30 JADE SPAWN AXIS 20 28 22 30 JADE COST MAP 32 32 map 04 cost txt JADE RENDER Jason JGOMAS Manual 4 Grupo de Tecnologia Informatica Inteligencia Artificial RENDER ART MAP 256 256 map 04 terrain bmp RENDER COST MAP 32 32 map 04 cost bmp RENDER HEIGHT MAP 32 32 map 04 heightmap bmp RENDER 3 Tasks A task is something that an agent has to perform in a particular positio
16. Manual 15 T Grupo de Tecnolog a Inform tica Inteligencia Artificial Step 13 U everything is fine you will have your first project created Jason helloworld helloworld mas2j Eclipse SDK File Edit Navigate Search Project Run Window Help rs aga joja e 5 MAS helloworld v i helloworld infrastructure Centralised B gr nin e agents amp sample agent asl agentl sample agent P src java b s jason jar home m b amp bin gt src helloworid mas2j aslSourcePath src ast gt ss helloworld Step 14 Jason helloworld helloworld mas2j Eclipse SDK File Edit Navigate Search Project Run Window Help v rue o a e 4 MAS helloworld v helloworld infrastructure Centralised Y e agents amp sample agent asl agentl sample agent b src java b iw jason jar home me b amp bin gt src aslSourcePath src asl helloworld mas2j Jason JGOMAS Manual B Outline 23 gt ss helloworld G T Grupo de Tecnologia Informatica Inteligencia Artificial Step 15 The result will be a hello world message in your screen G Jason helloworld src asl sample agent asl Eclipse SDK File Edit Navigate Search Project Run Window Help r joja e 4 8 Jason Navi 3 92 helloworld mas2j sample agent asl HD as Agent sample agent in project helloworld v helloworld Initial beliefs and rules m start
17. and return to their base in which case they will win the game On the other hand agents of the shaft must defend their flag and if captured must return it to the base The game has a maximum time after which if the flag has not reached the Allied base Axis team win the game 2 Jason JGOMAS Architecture JGOMAS is primarily composed of two subsystems On the one hand there is a multi agent system with two different kinds of running agents One of these types of agents handling the current game logic while the oth ers belong to one of the two teams and will be playing the full game Actually this subsystem is a layer that Jason JGOMAS Manual 1 Grupo de Tecnologia Informatica Inteligencia Artificial runs on top of a platform for multi agent specifically JADE and can take advantage of all the services provided by JADE Jason JGOMAS which is the current version of the JGOMAS platform allows the use of Jason agents to form teams of participating agents On the other hand an ad hoc graphical display Render Engine to display a 3D virtual environment has been developed According to the specific requirements of high computational cost for short periods graphics ap plications this graphic display has been designed as an external module and not as an agent It has been written in C using the OpenGL graphics library Figure 1 shows a JGOMAS architecture where all components and their relationships can be seen the
18. ason jar by double clicking over it You also could execute this file by with the following command java jar lib jason jar The following figure shows the window that you have to see after you run the file jason jar Make sure about the directories of the libs We suggest you only change the Java Home directory The others are automatically filled out but feel free to change them if you want to Jason Configuration 1 3 6 jason jar location home maicon jason 1 3 7 lib jason jar Check for new Jason versions on startup Print out warnings about singleton variables in plans and rules Java Home Directo usr lib jvm Java 1 6 0 openj dk 1 6 0 0 x86 6 Ant libs Directo home maicon Jason 1 3 7 lib Available Insfrastructures Centralised jason infra centralised CentralisedFactory Saci jason intra saci SaciFactory ade jason intra jade jadeFactory jade jar location home maicon Jason 1 3 7 lib ade jar jade Boot arguments Start management agent Start Sniffer Saci saci jar location home maicon Jason 1 3 7 lib Jsaci jar jEdit options Close all files before opening a new Jason Project Save configuration and Exit Exit without saving Jason JGOMAS Manual 11 G T Grupo de Tecnologia Informatica Inteligencia Artificial Step 4 Finally you could install the Jason plugin for Eclipse opening the Eclipse platform and going to the option In stall New Software at the He
19. case of allied medic agents it is registered the service medic ALLIED register JGOMAS medic ALLIED In the case of allied fieldops agents it is registered the service fieldops ALLIED register JGOMAS fieldops ALLIED e In the case of AXIS agents they register in a transparent way so the rest of players in their team may know register TEAM AXIS In the case of axis soldier agents it is registered the service backup AXIS register JGOMAS backup AXIS Jason JGOMAS Manual 8 Grupo de Tecnologia Informatica Inteligencia Artificial In the case of axis medic agents it is registered the service medic_AXIS register JGOMAS medic AXIS In the case of axis fieldops agents it is registered the service fieldops AXIS register JGOMAS fieldops AXIS Once an agent has registered a service it is posible for an agent of its same team to check which agents of its team offer a specific service How to know what services are available from an agent The following internal action is executed my_team type list This action returns the list of agents of the team of the invoker agent that are available through the yellow pages DF from the type type excluding itself In the example my team medic AXIS E Supposing that is executed by an agent of the AXIS team it would return the list E that contains the alive doctors of the team In this way it is posible for
20. ch Project Run Window Help tiv lav o elo Y 5 helloworld v src asl 2 sample agent asl E src java b m jasonjar home bin gt src 9 helloworld mas2 gt jogo Copy Es Copy Qualified Name 5 Paste X Delete Go Into Open Type Hierarchy Show In Remove from Context Build Path Source Refactor Import L Export Refresh Step 2 Shift Ctrl AlE Dowl ew j Project I Internal Action FA Shift Alt W gt 3 Annotation Class Enum amp 9 Interface Hf Package 4 Source Folder Ctrl C Ctrl V Delete gt Fy Example Shift Alt 5 gt Shift AlteT gt Other Ctrl4N Fill out the form An internal action is a java class so the only required field is the name of the class Jason JGOMAS Manual 19 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial Note we suggest you to give a name using the first letter in lower case and also naming the package New Jason Internal Action New Jason Internal Action by Type name is discouraged By convention Java type names usually start with an uppercase letter Source folder helloworld src java Browse Package actions Browse Enclosing type Name drawCircle Modifiers e public default abstract final Superclass DefaultinternalAction Interfaces Do you want to add comments Configure templates and default value here Generate comments S
21. e Edit Source Refactor Navigate Search Project Run Window Help ra amp Ov alec 4 vL mg m o fy e 9 lason Navigator 53 CArtAgO artifact code for project helloworld v E helloworld package artifacts va l import cartago sample agent asl src Java public class Counter extends Artifact E artifacts Counterjava bi jason jar home xsplyter sma jag cartago jar home xsplyter sn bin gt 2 src 25 helloworld mas2 7 5 How to import a Jason project Step 1 Click on the File menu and go to the option Import Search Project Run Window Help Shiftt Alt N gt Rename 2 Refresh Convert Line Delimiters To Print Switch Workspace Restart ca Import p Export Properties Alt Enter Step 2 Select the option Jason Jason Project Jason JGOMAS Manual 22 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial Select Import a Jason project to the workspace Select an import source type filter text 7 gt General E Archive File i3 Existing Projects into Workspace C File System E Preferences P CVS gt gt Install Y Jason e Jason Project gt 2 Plug in Development gt 2 Run Debug gt gt Team Step 3 Click on the Browse button and choose the directory of the project tick the project that you wish to import and finally press the Finish button Jason JGOMAS Manual 23 G T Grupo de Tecn
22. e destination of the agent when a new posible destination is calculated For example it is used when it is decided to change the destination to chase an enemy move Time This action is used to indicate the movement action during a time Time Its usage is internal it is not necessary to use it check position Position It is used to check if a position is valid or not After its execution a belief is executed position X where X can be valid or invalid create medic pack This action is used by medic agents to generate medicine packs Its usage is internal it is not necessary to use it create_ammo_pack This action is used by the fieldops agents to generate ammunition packs Its usage is internal it is not necessary to use it 9 3 Added internal actions my team type list This action returns the list of available agents of your team through the yellow pages DF that are of the type type Ex my team medic AXIS E executed by an agent of the AXIS returns the list E that con tains the members of its team The available services by default are AXIS offered by all agents of the AXIS team ALLIED offered by all agents of the ALLIED team medic AXIS offered by all medic agents of the AXIS team lfieldops AXIS offered by all fieldops agents of the AXIS team backup AXIS offered by all soldier agents of the AXIS team medic ALLIED offered by all medic agents of the ALLIED team
23. e uninstallation press the Restart Now button fe Software Updates You will need to restart Eclipse SDK for the installation changes to take effect You may try to apply the changes without restarting but this may cause errors Not Now Apply Changes Now Restart Now You will find more information at http jason sf net Jason JGOMAS Manual Grupo de Tecnologia Informatica Inteligencia Artificial 8 Appendix Execution of JGOMAS To execute JGOMAS it is first necessary to run the manager and then the agents e Run the manager Execute the following command or the file jgomas_manager bat Windows or jgomas_manager sh Linux java classpath lib jade jar lib jadeTools jar lib Base64 jar lib http jar lib iiop jar 1lib beangenerator jar 1lib jgomas jar student jar lib Mjason jar libNJasonJGomas jar classes jade Boot gui Manager es upv dsic gti ia jgomas Cmanager number of agents map re fresh time duration Example java classpath lib jade jar lib jadeTools jar lib Base64 jar lib http jar lib iiop jar 1lib beangenerator jar 1lib jgomas jar student jar lib jason jar 1lib JasonJGomas jar classes jade Boot gui Manager es upv dsic gti_ia jgomas Cmanager 4 map 04 125 10 The last line in orange represents the call to the manager agent with the name Manager the class es upv dsic gti_ia jgomas Cmanager and the following parameters e 4 number of age
24. ed set of basic behaviors that the user can modify or even add new ones These agents must be developed in Jason An agent can play a unique role in the current game There are three roles defined but the user can define new each providing a unique service Thus these agents or troop agents specialize in the following three roles e Soldier provides a backup service the agent goes to help to his team mates e Medic provides a medic service the agent goes to give medic packs e FieldOps provides an ammo service the agent goes to give ammo packs A domain like capture the flag enables a simple and entertaining way to establish a testbed either for algo rithms and optimizations individually on each agent and for competitive and cooperative strategies between teams going External agents are integrated into the virtual environment allowing the interaction between them through the perception of peers nearby enemies which can lead to cooperation coordination with partners of the same team Also being located in this virtual environment must take into account the characteristics of the terrain in which they are located difficulty moving walls Jason JGOMAS Manual 2 G T Grupo de Tecnologia Informatica Inteligencia Artificial All communication that takes place between the agents that make up the platform is performed by passing messages according to protocols established by the FIPA ACL X Socket mE S Socket
25. example to know the name of the agents of the team In order to do so this in ternal function has to be invoked my team AXIS E my team ALLIED E Then using the list E the agent can carry out the actions it considers as adequate Usage example my team AXIS El my name Me println My team is El length E1 X if X220 println I am alone and I am Me In this case an agent checks the agents of its team If the list is empty it means that it is alone 6 2 Coordination JGOMAS is provided with mechanisms that allow agent coordination It can be of one of these two types Jason JGOMAS Manual 9 C T Grupo de Tecnologia Informatica Inteligencia Artificial e No communication implicit It is achieved by sensing the environment When an agent looks around itself the objective perform look action is triggered By rewriting the associated plan it can be de cided what to do according to the perception e With communication explicit In this case it is used the message passing using the internal action send msg with conversation id send msg with conversation id Rec Perf Cont ConvId where e Rec receiver of the message could be a list e Perf gt performative tell untell achieve e Cont gt content e Convid gt Conversation Id used in Jade Usage example A1 wants to send a message to its team telling them to go to to help coordinate regroup
26. fied the asl file where its code can be found in this case jason Agent AXIS asl e Finally to visualize the graphic engine the file run jgomasrender bat is executed containing the follow ing instructions set OSG FILE _PATH data JGOMAS Render exe server hostname port integer Jason JGOMAS Manual 32 Grupo de Tecnologia Informatica Inteligencia Artificial 9 Appendix Available beliefs actions and objectives plans available in Jason JGomas application 9 1 Available beliefs tasks Contains the list of active tasks of the agent Ex tasks task 1000 TASK_GET_OBJECTIVE Manager pos 224 0 224 task 1001 TASK WALKING PATH A2 pos 204 0 228 In this example the list has two active tasks task 1000 TASK GET OBJECTIVE Manager pos 224 0 224 that indicates that has to get the ob jective the flag that is in the position pos 224 0 224 The priority assigned to this task is 1000 task 2000 TASK GIVE MEDIPAKS A2 pos 204 0 228 that indicates that has to go to the posi tion pos 204 0 228 where the agent A2 is waiting for medicin packs the agent with this active task is an agent The priority assigned to this task is 2000 task priority Task Y Indicates the priority of each task of the agent These values can be modified depending on what the agent decides Ex task priority TASK GET OBJECTIVE 1000 indicates that the priority of the task TASK
27. g platform This product includes software developed by the Apache Software Foundation http www apache org Installation Details Jason JGOMAS Manual 28 T Grupo de Tecnologia Informatica Inteligencia Artificial Step 3 Select the Jasonide feature and click on the Uninstall button f Eclipse SDK Installation Details Installed Software installation History Name Version Id f7 Jasonide feature 1 0 2 201203271721 jasonide feature feature grou 4 Xbase 2 0 1 420110802063 org eclipse xtext xbase featu 4 Xtend2 SDK 2 0 1 420110802063 org eclipse xtext xtend2 sdk 2 Xtext Documentation 2 0 1 420110802063 org eclipse xtext docs feature 2 Xtext Examples 2 0 1 v20110802063 org eclipse xtext examples fe 4 Xtext Runtime 2 0 1 v20110802063 org eclipse xtext runtime fea b i Xtext SDK 2 0 1 v20110802063 org eclipse xtext sdk feature b 2 xtext UI 2 0 1 v20110802063 org eclipse xtext ui feature g ason is an interpreter for an extended version of AgentSpeak First release December 2003 ason is distributed under LGPL see file LICENSE in the Jason directory Step 4 Confirm the process of uninstallation pressing the Finish button Uninstall Uninstall Details Review and confirm the items to be uninstalled Name Version Id f7 Jasonide feature 1 0 2 201203271721 jaso Jason JGOMAS Manual 29 G T Grupo de Tecnologia Informatica Inteligencia Artificial Step 5 In order to complete th
28. h 78 and its position is pos 214 0 219 Note The TEAM values are 100 Allied 200 Axis 1003 flag e state current state This belief is used to indicate the state of the agent in his state machine standing selecting which task to do or waiting go_to_target going to its next target tar get_reached it has reached the target quit has to finish e my health X Stores the health of the agent The initial and maximum value is 100 When this va lue reaches O the agent dies e my_ammo X Stores the amount of bullets of the agent The initial value is 100 e my position X Y Z Stores the last position known by the agent The different modifiable plans of the agents are e lperform look action This object is invoked when the agent looks around and update the list of surrounding objects fo vObjects L It would be necessary to implement the plan associated to the creation of this event to be able look what is around e lperform aim action This objective is triggered if there is an enemy to aim which can be used to take a decision about what to do with the aimed agent An easy implementation of the plan is available It is interesting to improve this plan to take a more refined decision about who to aim e lget agent to aim This objective is invoked after perform look action and it would be used to decide if there is any en emy to aim An easy implementation of the associated plan is available It is interesting to imp
29. j file Jason helloworld src asl 2 File Edit Navigate Search Project Run Window Help Ev alar leo e o t ge evo A Jason Navigator 23 O f helloworld mas2j amp F Agent agenteX in project helloworld E helloworld Initial beliefs and rules E src asl E Initial goals 2 sample agent asl start p src java E A l Plans gt jag jasonjar home xsplyter sma gt jag cartagojar home xsplyter sn start true lt print hello world gt bin gt src helloworld mas2j Jason helloworld helloworld mas2j Eclipse SDK Edit Navigate Search Project Run Window Help rv amp Q o e o v fv e ev s Jason Navigator D Ej l H3 2 agenteXasl aS MAS helloworld v E helloworld infrastructure Centralised v 8 src asl environment c4jason CartagoEnvironment agenteX asl 2 sample agent asl agents P G9 src java agenteX agentArchClass c4jason CAgentArch 5 m agentl sample agent agentArchClass c4jason CAgentArch gt a9 jasonjar home xsplyter sma b aa cartago jar home xsplyter sn aslSourcePath ib bir src asl b src 22 helloworld mas2j Jason JGOMAS Manual 18 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial 7 3 How to create an internal action Step 1 Click on the source folder named src Java using the right button and go to the option New Internal Action Jason Eclipse SDK Hle Edit Navigate Sear
30. k TaskPriority TaskType Agent Position Content ladd task task TaskType Agent Position Content Examples two options ladd task task 1000 TASK GET OBJECTIVE M pos ObjectiveX ObjectiveY ObjectiveZ 3 ladd task task TASK GET OBJECTIVE M pos ObjectiveX ObjectiveY ObjectiveZ Such objectives trigger the plan creating the task The second one assigns the priority defined by the agent 4 Execution Loop e Each JGOMAS external agent executes a FSM as the one in Figure 3 e STANDING The agent does not have any triggered task GO TO TARGET The agent has triggered a task and he is moving to the position where he has to do it e TARGET REACHED The agent has reached the position where he has to do the triggered task and he is doing the actions indicated in the task Jason JGOMAS Manual 5 Grupo de Tecnologia Informatica Inteligencia Artificial Default Default Default Figure 3 FSM defining JGOMAS external agents behaviour 5 Interface API The interface API for working with jGomas is composed of asl files written in Jason that contain the different agents each one with its own beliefs goals and behaviors Inside these files jgomas asl includes the non modifiable behaviors of the agent To modify the behavior of the agent the files with a name following the pattern jasonAgent TEAM TYPE asl have to be modified where TEAM refers to the side of the agent ALLIED AXIS
31. lief fieldopsAction on It is interest ing to improve the plan to take a more refined decision and to sometimes generate the belief fieldop sAction off which makes the agent to not attend the petition because it is not interested Isetup priorities This objective is triggered during agent initialization to fix agent task priorities Each agent has its own priori ties A simple implementation is available It is interesting to modify it to add new tasks or modify the priorities to have agents that behave in a different way cfm_agree source M This objective is triggered when it is received a message stating that medic help is coming Agent M will attend the request It is not necessary to modify the plan but it could be interesting to modify it to refine agent behav lor cfm_refuse source M This objective is triggered when a message that denies medical help is received Agent M has denied the re quest It is not necessary to modify the associated plan but it could be interesting to refine the agent behavior when help is denied cfa_agree source M This objective is triggered when it is received a message stating that ammo help is coming Agent M will attend the request It is not necessary to modify the plan but it could be interesting to modify it to refine agent behav lor cfa_refuse source M This objective is triggered when a message that denies ammo help is received Agent M has denied the request It is no
32. loworld v 38 src asl 2 sample agent asl fz src java sonare F5 Project gt wo jasonjar hor b aa cartago bn CArtAgO Artifact M DN Open Type Hierarchy FA de nt G bin Show In Shift alt w gt amp Internal Action gt amp src 9 helloworld mas PY p Ctrl C gt jogo B Copy Qualified Name 5 Paste Ctrl V X Delete Delete Annotation Class G Enum Interface H Package Build Path o Source Folder Source Shift Alt S gt 5 Example Refactor Shift Alt T gt Import F Other Ctrl N Step 2 Fill out the form A CArtAgO artifact is a java class so the only required field is the name of the class Note in contrast to an internal action in this case you could use a name with a first letter in upper case and also we suggest you to name the package New CArtAgO Artifact New CArtAgO Artifact This wizard creates a new CArtAgO Artifact Source folder helloworld src java Browse Package artifacts Browse Enclosing type Name Modifiers e public O default privati protected Ol abstract final Superclass Artifact E Browse Interfaces Do you want to add comments Configure templates and default value here Generate comments caa im Step 3 The CArtAgO artifact will be created Jason JGOMAS Manual 21 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial Jason helloworid src java artifacts Co El
33. lp menu Java Eclipse SDK File Edit Navigate Search Project Run Window lt ES oa amp G O aed V Welcome Help Contents Search Dynamic Help Key Assist Shift Ctrl L Tips and Tricks Cheat Sheets Check for Updates Install New Software About Eclipse SDK Step 5 So the following window will appear Install Available Software Select a site or enter the location of a site Work with type or select a site v Find more software by working with the Available Software Sites preferences Name Version O O There is no site selected Select All Deselect All Details Show only the latest versions of available software O Hide items that are already installed Group items by category What is already installed O Show only software applicable to target environment Contact all update sites during install to find required software Cancel Step 6 Click over the Add button and fill out the form as shown in the next figure The parameters are Name jasonide Location Eclipse Indigo http jason sourceforge net eclipseplugin Location Eclipse Juno Kepler http jason sourceforge net eclipseplugin juno Jason JGOMAS Manual 12 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial To finish click on the OK button Install Available Software Select a site or enter the location of a site A Work with type or select a site
34. n of the virtual environment There are various types of tasks which are according to the different actions that an agent can perform in the virtual environment being the main ones e TASK GIVE MEDICPAKS A medic must generate packets of medicine in a particular place the position of the agent who requested it and who has agreed to go to give them e TASK GIVE AMMOPAKS A fieldops must generate packets of ammo in a particular place the position of the agent who requested it and who has agreed to go to give them e TASK GIVE BACKUP A soldier should go to help a teammate to a particular place the position of the agent who requested it and who has agreed to give it go e TASK GET OBJECTIVE The agent from the attacking team or ALLIED must go to the starting position of the flag for it If he manage to grab the flag this task becomes going back to their home base e TASK GOTO POSITION The agent must go to a specific location A task is associated in addition to its type the agent that causes the task the agent itself or the agent who requested that he should give something like life the position where it should be performed priority and any possible contents additional Always the highest priority task is launched You can redefine the priority of each type of task The tasks the system is implemented not the user it can only add tasks to the list of active tasks the agent e JASON a plan is used to add a task add task ladd task tas
35. nts e Map 04 name of the map e 125 refreshing time specified in milliseconds e 10 duration of the execution specified in minutes e Run the agents Execute the following command or the file jgomas_launcher bat Windows or jgomas launcher bat Linux java classpath libljade jar libijadeTools jar libiBase64 jar lib Mttp jar libliiop jar liblbeangenerator jar lib jgomas jar student jar 1lib jason jar 1ib JasonJGomas jar classes jade Boot container host localhost lista de agentes Example java classpath libijade jar libijadeTools jar libiBase64 jar lib Mttp jar libliiop jar liblbeangenerator jar lib jgomas jar student jar 1lib jason jar 1ib JasonJGomas jar classes jade Boot container host localhost T1 es upv dsic gti ia JasonJGomas BasicTroopJasonArch jasonAgent AXIS as1 T2 es upv dsic gti ia JasonJGomas BasicTroopJasonArch jasonAgent AXIS MEDIC as1 A1 es u pv dsic gti ia JasonJGomas BasicTroopJasonArch jasonAgent ALLIED FIELDOPS asl A2 es upv dsic gti ia JasonJGomas BasicTroopJasonArch jasonAgent ALLIED asl As in the case of the manager the latest lines are used to define agents In this case there are defined the agents T1 T2 Al and A2 For example in the case of the agent T1 its name is represented with T1 its class with es upv dsic gti ia JasonJGomas BasicTroopJasonArch Jason JGOMAS Manual 31 Grupo de Tecnologia Informatica Inteligencia Artificial and finally it is speci
36. olog a Inform tica Inteligencia Artificial Import Projects Select a directory to search for existing Eclipse projects Select root directory home xsplyter teste helloworld Browse Select archive file Projects mi helloworld home xsplyter teste helloworld Select All Deselect All Refresh Copy projects into workspace Working sets C Add project to working sets cancel Bish 7 6 How to export a Jason project Step 1 Click on the project using the right button and go to the option Export File Edit Navigate Search Project Run Window Help Cav 0 Ss amp helloworld New Go Into Show In Shift Alt W gt Copy Ctrl C Es Copy Qualified Name 3 Paste Ctrl V Delete Delete Build Path gt Refactor Shift Alt T gt g 3 Import ti Export Step 2 Select the option Jason gt Jason Project Jason JGOMAS Manual G T Grupo de Tecnolog a Inform tica Inteligencia Artificial Select Export a Jason project to local file system Select an export destination Y gt General Ant Buildfiles E Archive File D File System id Preferences b amp Install gt amp jaca Y gt Jason Jason Project b gt Java gt gt Plug in Development gt 2 Run Debug NNI Step 3 Click on the Browse button and select the directory that you wish to export the project and press the Finish button File system E
37. rove the mentioned associated plan to take a more refined solution about who to aim e perform no ammo action This objective is triggered when the agent shoots and has no ammo It is necessary to implement the associated plan to take a decision For example to run e perform injury action This objective is triggered when the agent is shot It is necessary to implement the plan associated to the creation of this event to take a decision For example run if the agent has a low life value e performThresholdAction This objective is triggered when the agent has less life or bullets than the thresholds my ammo threshold X and my health threshold X An easy implementation of the associated plan is available which asks for help to medics or fieldops of its team It is interesting to improve the plan to take a more refined solution e Isetup priorities This objective is triggered during agent initialization to fix agent task priorities Each agent has its own priorities A simple implementation is available It is interesting to modify it to add new tasks or modify the priorities to have agents that behave in a different way Jason JGOMAS Manual 7 Grupo de Tecnologia Informatica Inteligencia Artificial e update targets This objective can be used to update the tasks and its priorities It is invoked when the agent changes to the standing state and has to choose a new task among the available ones It is necessary to imple
38. t necessary to modify the associated plan but it could be interesting to refine the agent behavior when help is denied Jason JGOMAS Manual 38
39. tep 3 The internal action will be created Jason helloworld src java actions drawCircle java Eclipse File Edit Source Refactor Navigate Search Project Run Window Help Ev a owalac s vs m O sr e o 9 Jason Navigator x i gt 0 118 x Internal action code for project helloworld Y 15 helloworld package actions E src asl F import jason m sample agent asl Y src java public class drawCircle extends DefaultInternalAction v ff actions verride M drawCircle java public Object execute TransitionSystem ts Unifier un Term b ag jason jar home xsplyter sma execute the internal action ts getAg getLogger info executing internal action ad if true just to show how to throw another kind of amp P bin throw new JasonException not implemented b src 22 helloworld mas2j b ag cartago jar home xsplyter sn everything ok so returns true b jogo return true 7 4 How to create an artifact Note A CArtAgO artifact is only used if you are using the CArtAgO as an environment for your MAS Step 1 Click on the source folder named src java using the right button and go to the option New CArtAgO Arti fact Jason JGOMAS Manual 20 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial E Jason Eclipse SDK Elle Edit Navigate Search Project Run Window Help riv av e o ev x 4 nj Y hel
40. vePackTaken on Indicates that the agent has the flag state State This belief is used to indicate the state of the agent in his state machine standing selecting which task to do or waiting go to target going to its next target target reached it has reached the target quit has to finish current task Task Stores the current task Ex current task task 1000 TASK GET OBJECTIVE Manager pos 224 0 224 the current task is to get the flag in position 222 0 224 my health X Stores the health of the agent The initial and maximum value is 100 When this value reaches 0 the agent dies my ammo X Stores the amount of bullets of the agent The initial value is 100 my_position X Y Z Stores the last position known by the agent objective ObjectiveX ObjectiveY ObjectiveZ Stores the latest known position of the Guarda la posici n ltima conocida del objetivo del agente my ammo threshold X Stores the threshold of bullets that the agent has to reach before asking for help or taking a decision The initial value is 50 my health threshold X Stores the threshold of health that the agent has to reach before asking for help or taking a decision Initially it Is 50 debug X Indicates the degree of verbosity of the agent between 1 and 3 Jason JGOMAS Manual 34 C T Grupo de Tecnolog a Inform tica Inteligencia Artificial 9 2 Acciones update destination Destination This action modifies th
41. xport resources to the local file system Fi E helloworld I B classpath P oO jogo M E project F helloworld mas2j Filter Types Select All Deselect All To directory home xsplyter teste v Browse Options Overwrite existing files without warning Create directory structure for files a Create only selected directories Jason JGOMAS Manual 25 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial 7 7 How to update the Jason plugin You have two ways to update your Jason eclipse plugin First way Simply click on the Help menu and go to the option Check for Updates Jason Eclipse SDK File Edit Navigate Search Project Run Window ta Help Contents Search eS Jason Navig Dynamic Help Key Assist Shift Cti L Tips and Tricks Cheat Sheets Check for Updates Install New Software About Eclipse SDK Second way Step 1 Click on the Help menu and go to the option About Eclipse SDK Jason Eclipse SDK File Edit Navigate Search Project Run Window Welcome Help Contents Search Dynamic Help Key Assist Shift Ctrl b Tips and Tricks Cheat Sheets Check for Updates Install New Software About Eclipse SDK Jason JGOMAS Manual 26 G T Grupo de Tecnolog a Inform tica Inteligencia Artificial Step 2 Press the Installation Details button ve About Eclipse SDK Eclipse SDK
Download Pdf Manuals
Related Search
Related Contents
English - GigaBlue TAFCO WINDOWS NU2-398S-I Installation Guide ACLA #01-06 - California Department of Alcohol and Drug Programs KanexPro HD50FTCL314 Copyright © All rights reserved.
Failed to retrieve file