Skip to content
Miguel Duarte edited this page Nov 18, 2015 · 2 revisions

JBotEvolver Results Panel

The results can be analyzed even if the experiment has not yet terminated. For instance, if the total number of generations for the evolutionary algorithm is 100, you can start analyzing results after one generation has completed. Above is a screenshot of the GUI and its main controls:

Overview of Files and Folders

In the directory tree navigate to the JBotEvolver directory. Inside this directory find a directory containing your results. The name is what was entered in the "Output Name" text field in the Configuration tab for the simulation. The file with this name followed by a ".conf" extension contains the configurations used in that simulation. It can be viewed by highlighting it and clicking on the "Edit" button.

File tree

The file tree allows you to navigate your filesystem in order to reach the experimental results quickly. Once inside the folder where the results are located, various files and folders that are available:

  • _showbest_current.conf: loads the best controller for the current generation
  • _arguments.conf: has a copy of the original configuration file used to execute the experiment
  • _generationnumber: indicates the current generation number
  • _fitness.log: saves the best, average and minimum fitness for the controllers of each generation
  • _restartevolution.conf: this file can be used to resume an experiment that was interrupted (not with the GUI)
  • populations: includes the serialized version of the controllers at each generation
  • show_best: includes configuration files that allow you to quickly check the behavior of the best controllers at each generation

Edit/Load/Plot

This set of buttons allows the user to:

  • Edit: edit the text in the configuration files
  • Load: load the select configuration file and show them in the GUI's renderer
  • Compare Fitness: shows a table with fitness of the best controller and the average fitness, of the selected experiments on the file tree (post evaluation file on the experiments folder is needed).
  • Plot fitness: plot a fitness graph of the best controllers in each generation in this folder. If the current folder has more than one experiment, it will plot the fitness graph of every experiment recursively and display it simultaneously, allowing a comparison of results.
  • New Random Seed: Generates a new random seed and starts the preview of the simulation of the selected configuration file

Extra arguments

Sometimes it is useful to be able to change the configuration parameters of experiments. In this text area, it is possible to do so without modifying the existing configuration file. A special syntax allows you to override only some arguments.

For instance, if we want to add more robots, we can add the following:

--robots +numberofrobots=10

By using the + sign, we are overriding only the number of robots. The remaining arguments in the "--robots" argument set (such as the radius or color) remains the same. If we want to change only two arguments, we just need one + sign:

--robots +numberofrobots=10,orientation=0

If we want to override the complete argument set, we just omit the + sign. In the following case, we override everything in the "--evaluation" argument set, but only some arguments in "--robots":

--evaluation classname=StayAtDistanceToNestEvaluationFunction,distance=1
--robots +numberofrobots=10,orientation=0

After changing one or more arguments, the experiment needs to be loaded again by clicking the "Load" button or double-clicking the _showbest_current.conf file in the file tree.

Simulation control

In the right panel, it is possible to control various aspects of the current simulation:

  • Start: start the preview of the simulation of the selected configuration file
  • Pause: pauses the preview of the simulation of the selected configuration file
  • Plot Graph: plots the inputs/outputs of neural network-based controllers graphically over the course of one simulation
  • Sleep: adjusts the speed of the simulation (lower values result in a faster simulation)
  • Control Step: shows the current step of the simulation preview
  • Fitness: shows the fitness obtained by the controller running on the simulation preview, in which time step

Shortcuts

The GUI has a number of useful keyboard shortcuts. In Mac OS X, CTRL is replaced by CMD:

  • CTRL + ENTER: load file
  • CTRL + P: pause/resume
  • CTRL + S: start
  • CTRL + Left/Right: rewind/fast-forward
  • +/-: zoom in/zoom out
  • ALT + arrows: pan camera

Renderer

Renderer is the responsible for drawing the graphical part of the simulation, such as the environment, robots, preys and so on. The default renderer is the TwoDRenderer class, but different renderers can be easily implemented by extending the Renderer class. After implementing a new renderer, it can be loaded by changing the renderer classname in the ViewerMain class.

new CombinedGui(new String[]{"--gui","classname=ResultViewerGui,renderer=(classname=TwoDRendererDebug))"});

The results of a completed or in progress simulation can be seen by clicking on the Results tab.