# How to deploy my agents

In order to deploy your agents in Dedale, you need to do three things :

2. Create java agents able to interact with the environment

# 1. Defining entities characteristics

Entities characteristics refers to the capabilities of your agents within the environment. They are defined in the entities files in the ressources folder. This file is given to the system when you configure the environment. The structure of the file is the following :

mapname:mapName


with :

• agentType : wumpus, agentExplo, agentCollect, agentTanker. The platform adapts the actions available to one agent within the environment according to its type. agents Explo and tanker cannot pick ressources, only collector agents can. The size of one's backPack is not taken into account.
• communicationRange : maximal radius autorised for this agent to communicate with others
• initialLocation : nodeId to deploy the agent or free is the system can choose randomly
• BackPackCapacityGold : maximum quantity of ressources that the agent can transport. -1 if none.
• BackPackCapacityDiamond : maximum quantity of ressources that the agent can transport. -1 if none.
• detectionRadius : distance from wich the agent can be perceived
• lockpicking : level of lockpicking expertise of the agent [0,maxint]
• strength : level of strength the agent [0,maxint]

Illustrative example of an entities configuration file (available in the resources folder).

mapname:map2018MultiTypes
wumpus:Golem:0:free:200:0:1:0:0
agentExplo:Explo1:3:free:-1:-1:0:1:1
agentExplo:Explo2:3:free:-1:-1:0:2:1
agentCollect:Collect1:3:free:41:-1:0:1:2
agentTanker:Tanker1:3:free:300:200:0:1:5


If your agents respect the Create agents able to interact with the environment then, in the Principal.java file, you just have to add your agents in the createAgent() method, under the ADD YOUR AGENTS HERE comment :


//1) Get the container where the agent will appear
c = containerList.get(ConfigurationFile.LOCAL_CONTAINER2_NAME);

//2) Give the name of your agent, MUST be the same as the one given in the entities file.
agentName="Explo1";

//3) If you want to give specific parameters to your agent, add them here
Object [] entityParameters2={"My parameters"};

//4) Give the class name of your agent to let the system instantiate it
ag=createNewDedaleAgent(c, agentName, DummyMovingAgent.class.getName(), entityParameters2);



That's it, you can Select the Principal.java file, Right-Click on it and select run as../Java application.

Here is a video tutoral illustrating agent's deployment.