How to configure the environment

Dedale configuration process

The 4 steps of the platform configuration can be modified independently. We present here the 2 first steps related to the environment: Topology and elements on the map.

In Dedale, there are three types of environments: manually designed, imported from openStreetMap or generated ones. All of them can be distributed (or not) among computers. Environment characteristics are currently defined in 3 files :

  1. map-topology : defines nodes and edges
  2. map-elements : defines the position and characteristics of the elements on the map
  3. : gives the path of the two previous files to the program

1. Map topology

A topological map is defined as a set of nodes and undirected edges, each one with a unique identifier. You can use one of the map available in the resources folder, generate one using our available generators, import a topology based on OpenStreetMap or define your own.

All our 2D maps are following the DGS File Format Specification. As illustrated bellow :

  • the two first line of a topological map file describes the type of graph to load, and mustn’t be changed in this project,
  • Then, the an and ae respectively correspond to the nodes and edges of the graph.

Here is an elementary example with 4 nodes (an) and 4 edges (ae).

null 0 0
an 0	label: 0
an 1	label: 1
an 2    label: 2
an 3	label: 3
ae e2	0 1
ae e3	2 3
ae e4   1 2
ae e5   1 3
  • an 0 label:0 : Is a node with Id 0 and label 0. In this project, the label and the Id must stay equals.
  • ae e2 0 1 : Corresponds to a non-directed edge with Id e1, between node 0 and 1.

2. Elements on the map

If you decide to load a topology, you have to choose the elements that will be on the map :gold, diamond and/or well. For the 2 first elements, you have to indicate the safe position (nodeId), the value of the treasure and its openning criteria (required strength and Lockpicking expertise). Regarding the well, only the location is needed. This file is available in the resources folder.


3. Platform and generated environment configuration, available in the princ package

This file contains two set of parameters.

  • Platform configuration

By default, the platform is not distributed, use a main container with 4 containers and the agent in charge of the environment and of the agents deployment is the gatekeeper “GK”.

   //Distributed or not, and is the current computer in charge of the main-container
   public static boolean PLATFORMisDISTRIBUTED= false;
   public static boolean COMPUTERisMAIN= true;
   //network configuration
   public static String PLATFORM_HOSTNAME="";
   public static String PLATFORM_ID="Ithaq";
   public static Integer PLATFORM_PORT=8888;
   //List of containers to be created on the current computer
   public static String LOCAL_CONTAINER_NAME=PLATFORM_ID+"_"+"container1";
   public static String LOCAL_CONTAINER2_NAME=PLATFORM_ID+"_"+"container2";
   public static String LOCAL_CONTAINER3_NAME=PLATFORM_ID+"_"+"container3";
   public static String LOCAL_CONTAINER4_NAME=PLATFORM_ID+"_"+"container4";
  • Environment configuration

If you want an autogenerated map, you will set instance-topology and instance-configuration elements to null, otherwise you will gives here the references to the two files designed above. If your environment is autogenerated, you can set several parameters : the size of the environment, the occurrence of gold/diamond/well and the type of graph (grid or dogoronev).

   // Type of environment to use (only one is publicly available: graphs)
   public static EnvironmentType ENVIRONMENT_TYPE=EnvironmentType.GS;

   //The environment is either manually designed (MANUAL), or generated with a specific generator (GRID,BARABASI,DOROGOVTSEV)
   public static GeneratorType GENERATOR_TYPE=GeneratorType.MANUAL;

   //The GateKeeper is in charge of the Platform and of the agents within, do not change its name.
   public static String DEFAULT_GATEKEEPER_NAME="GK";

    * When the environment is loaded, we need :
    *  - a) a topology, 
    *  - b) the configuration of the elements on the map,
   // a) topology
   //public static String INSTANCE_TOPOLOGY=null;
   public static String INSTANCE_TOPOLOGY="resources/topology/map2020-topologyExam1-tree.dgs";

   // b) elements available on the map, if any
   // If the environment is loaded but you do not want to define elements on the map
   public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/distributedExploration/emptyMap";
   // otherwise
   //public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/treasureHunt/map2019-elementsExam1";
   //public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/treasureHunt/Houat-elements";
   //public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/treasureHunt/map2018-elements-ica";
   //public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/interlocking/mapInterlocking2-elements";
   //public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/map2018-elements";
   //public static String INSTANCE_CONFIGURATION_ELEMENTS="resources/mapInterlocking2-elements";

    * When the environment is generated 

   //Size of the generated environment, mandatory
   public static Integer ENVIRONMENT_SIZE=10;

   // Parameters required for some generators (see
   public static Integer OPTIONAL_ADDITIONAL_ENVGENERATOR_PARAM1=1;//used by the BARABASI_ALBERT generator to know the number of childs

   // Wumpus proximity detection radius on generated map (expected to disappear on the next release)
   public static final Integer DEFAULT_DETECTION_RADIUS = 1;

   //Agents communication radius if not specified
   public static Integer DEFAULT_COMMUNICATION_REACH=3;

   // Elements to add on the generated map
   public static boolean ACTIVE_WELL=false;
   public static boolean ACTIVE_GOLD=true;
   public static boolean ACTIVE_DIAMOND=false;

    * Agents characteristics

   //public static String INSTANCE_CONFIGURATION_ENTITIES="resources/agentExplo";
   //public static String INSTANCE_CONFIGURATION_ENTITIES="resources/agentExplo-2";
   public static String INSTANCE_CONFIGURATION_ENTITIES="resources/agentExploCoop-2";
   //public static String INSTANCE_CONFIGURATION_ENTITIES="resources/agentKeyboardControlled";

You now have an environement configurated as you want it. Its time to configure and deploy the agents that will evoluate on the map.

Here is a video tutorial illustrating all these steps