Here are direct links to the web star version of the soda race application, and the web start version of the soda constructor application. Here are links to describing the race application, and the soda race artificial intelligence forum.
I read somewhere that people were using global search techniques (simulated annealing and genetic algorithms) to both optimise existing soda structures and design new soda structures. Of course I became instantly interested. Using the open source genetic algorithm library ECJ and a Java decompiler I constructed a simple set of tools for optimising and designing competitive soda constructions.
I reverse engineered the soda race and soda constructor applications and reengineered them so that the fitness function of the genetic algorithm (running of a race) would be as fast as possible. All tools are similar in that they optimise a model for a terrain. The common process for all tools is as follows:
A race is simply a terrain with a number of contenders. Contenders can be added to a race in an online mode by loading the model XML in the soda constructor then connecting the soda constructor to soda race. This is problematic for GA produced models. Thus, the best way of getting a produced model in the race is the copy-paste method prescribed above.
Essentially, the API and tools provided are nothing more than a problem definition for ECJ, and associated mechanics for converting between vector format and XML files. The three basic tools provided for each optimisation task are as follows;
These tools can easily be extended and or used in alternative soda based applications. For example, it would be trivial to extend the tools to optimise a structure for multiple domains, or build a pretty user interface for optimising structures.
The four genetic algorithm based tools for optimising soda structures are as follows:
1. Eight Mass Amoeba Optimiser - The eight mass amoeba is a very efficient structure for moving across a terrain. The dynamics of the amoeba have been defined and hard coded .This tool allows the 14 parameters that control those rotation dynamics to be optimised by the algorithm. Like all tools, configuration is controlled by an ECJ parameters file. The additional (non ECJ standard parameters) required include the specification of a base amoeba XML file that defines the structure to optimise, and the terrain XML to optimise the amoeba for. An example one population and two population GA configuration is provided.
2. Variable Mass Amoeba Optimiser - This tool optimises the same 14 parameters as the eight mass amoeba as well as the number of masses used in the amoeba. The dynamics and connectivity of the model are fixed as in the case of the eight mass amoeba.
3. Any Model Parameter Optimiser - This tool requires that a terrain and model file be specified. The tool will optimise all parameters of the model. These include all environment parameters, all rest lengths and muscle amplitudes. The structure of the model is not adjusted, only the structures parameters.
4. Any Model Parameter and Structure Optimiser - This is probably the most interesting tool. The gene definition generator takes as a parameter the number of masses the model has. The genetic algorithm will then design a structure with the defined number of masses. The masses are static during the evolution, though all connections are dynamic both in type (mass or spring) and connectivity (connected or not connected) between all masses. Imagine a two-dimensional matrix with all nodes across the top and bottom and each cell represents a possible connection.
Naturally, the genetic algorithm parameter files can be adjusted to configure the algorithm. For a full explanation of various GA modules, see the ECJ website and tutorials. It may be useful to fine tune the gene definitions for a given problem to optimise specific elements of a structure or to optimise within a specific area of the state space.
The following are examples I posted to the soda race artificial intelligence forum, they are linked here for convenience. Clicking on a link will start the soda race application and demonstrate some of my soda creations prepared using this genetic algorithm tool set.
The tool bat files were separated from the required libraries for download size reasons. Simply unzip the library in the appropriate tool directory and run the relevant bat file. Bat files are not needed to run the tools of course, they are only provided for convenience.