wopr - morinim/ultra GitHub Wiki

WOPR - Visualisation tool for ULTRA

Analysing the large amount of data produced by evolutionary algorithms is a complex and critical task.

WOPR is a visualisation tool designed to simplify this process by displaying data at various levels, enabling a deeper understanding of the underlying evolutionary processes. It also allows testing on multiple datasets with real-time comparisons against reference results.

The name WOPR pays homage to the iconic "War Operation Plan Response" computer from the film Wargames. The main interface evokes the aesthetic of the fictional system, with its blinking panels and multiple screens.

Monitoring evolution

wopr monitor

Search logs

ULTRA can be configured to produce several types of search logs, each offering unique insights into the evolutionary process:

  • the dynamic file contains summary information recorded per generation, including changes in fitness (both of the best individual found so far and of the entire population);
  • the layers file provides a snapshot of each layer in the population structure, detailing data such as ages and fitness levels;
  • the population file offers a detailed representation of the clustering of individuals during evolution.

As the evolution process progresses, ULTRA continuously updates these files generation by generation. Simultaneously, WOPR polls the files and generates graphical representations of the system's current state and its trajectory over time.

Methods of Visualisation

WOPR employs a variety of visualisation methods to present data effectively.


Plots based on the dynamic file

  • An error bar plot displaying the mean and standard deviation of the population's fitness, alongside the best fitness achieved in each generation.
  • An error bar plot showing the mean, maximum, and standard deviation of the population's age per generation.
  • A combo box presenting a sequential list of the best individuals found.

Plots based on the population file

  • A histogram showing the distribution of individuals across fitness bins.
  • A shaded plot illustrating the trend in entropy.

Plots based on layers file

  • A heat map where each row represents a layer and each column corresponds to an individual's fitness.
  • An error bar diagram illustrating the range of ages within each layer, with vertical lines marking the suprema (upper bounds) of ages in each layer.

By turning complex numerical data into clear, visually intuitive formats, WOPR provides a powerful environment for exploring and understanding the dynamics of evolutionary algorithms.

Examples

wopr monitor iris

Displays evolution information for the Iris dataset (requires at least one of the files iris.dynamic.txt, iris.layers.txt, iris.population.txt).

User can also specify a directory:

wopr monitor iris_folder/

This works only if iris_folder/ contains exactly one test file (.csv).

Testing

wopr test

Performs a search on one or multiple datasets, optionally comparing the results with reference data. Produces one XML output file per input dataset.

Examples

wopr test --runs 4 --generations 100 iris.csv

Runs 4 evolutions of 100 generations each using the Iris dataset. The results are saved to iris.summary.xml.

Comparing

wopr compare

Compares test results contained in two directories.

Examples

wopr compare current/ reference/

Compared all results int the current directory with those in reference.

Command line guide

 _       ___   ___   ___ 
\ \    // / \ | |_) | |_)
 \_\/\/ \_\_/ |_|   |_| \

GREETINGS PROFESSOR FALKEN.

Please enter your selection:

> wopr compare <directory> <directory>

  Only results contained within the first directory are considered for
  comparison with results from the second directory.

> wopr monitor [log directory or specific test name]

  The directory must contain at least one search log produced by Ultra.
  If omitted, the current working directory is used.
  When using a test name, skip the extension (e.g. use "/path/test" and
  NOT "/path/test.csv").

  Available switches:

  --dynamic    filepath
  --layers     filepath
  --population filepath
      Allow monitoring of files with names different from the defaults.
  --refresh seconds
      Set the refresh rate for updating plots.
  --window  n
      Restrict monitoring window to the last `n` generations.

> wopr test [folder or file]

  The argument must be either a folder containing at least one .csv
  dataset (and optionally a test configuration file), or a specific
  dataset file. If omitted, the current directory is used.
  Available switches:

  --generations <nr>
      Set the maximum number of generations in a run.
  --nogui
      Disable the graphical user interface performing the test in headless
      mode.
  --reference directory <directory>
      Specify a directory containing reference results.
  --runs <nr>
      Perform the specified number of evolutionary runs.
  --threshold <val>
      Set the success threshold for a run. If the value ends with '%', it
      is interpreted as accuracy; otherwise, as a fitness value.

--help
    Display this help screen.
--imguidemo
    Enable ImGUI demo panel.

SHALL WE PLAY A GAME?

Related tools

  • merge_summary.py. A small command-line utility designed to merge two ULTRA experiment summaries into a single consolidated XML report.
⚠️ **GitHub.com Fallback** ⚠️