What is Sodarace?
Sodarace is an online competition where racers, sometimes called "creatures", compete against each other on various race tracks. These races pit human intelligence and creativity against the ever-developing capabilities of artificial intelligence-driven evolution algorithms.
The first version of a Sodarace-like program was written nearly ten years ago in BASIC, before its creators noticed its growing popularity and created a Java-based version, the latest of which is the current Sodarace.
What is this report?
This report website explores the features and capabilities of the Sodarace Kiosk application. Presented in these pages are some experiments performed by the authors, attempting to create racers that will succeed on all three terrains Sodarace Kiosk offers.
Also presented are tests regarding the efficiency of the built-in evolution algorithms and how racers resulting from said algorithms compare to those the authors considered best. We personally thought the results to be very interesting.
Our Experiments
We set out with a particular goal in mind. This was to produce a 'racer' or 'creature' that was able to compete and either win or come as close as possible to first position in all three terrain types presented in the Sodarace Kiosk. First we decided to look at the Kiosk version of Sodarace and familiarise ourselves with the way the prebuilt racers behaved in relation to the terrain.
After many experiments we found that the generic racers that are immediately available to the user at the beginning of the system are quite formidable, usually coming in second or third. This was much better than some of our first attempts!
After this we set out our goals for the experiments and how they were going to be run.
Experiments
The first thing we did was set out our goals:
- Create a creature that would compete successfully in a race (a creature for each terrain)
- Compare the effectiveness of the creature we created against that of the machine generated mutation
- Generate a hypothesis as to the most effective method for creating a creature that will compete effectively across multiple terrains
Creating the creature
To create the creature we first had to choose one of the three pre-designed creatures. We chose to use the first of the three creatures as a start. We would be racing this one on the second of the three terrains. This second terrain only poses one difficult area, this is the dip in the middle shown in the picture.
We found that all of our attempts to change the racer would end up with it getting stuck in the dip. This was a difficult problem to overcome as anything we did just made the creature get stuck again. Eventually we realised that we had to slow the frequency of the creature's movement down. This would allow the creature to stay flat against the terrain. This means that the creature looked as though it was a tank moving slowly across the terrain. But when the other creatures were finding problems with getting up the hill our creature just carried on moving at the same pace.
since this creature was so successful on the middle terrain, we decided to try it on the third terrain. Shown here.
We found that again this creature, in it's default version, only came in second. But our modified version was much quicker. Where the other creatures seemed to get held up after the drop, ours, because of it's simple construction, would run right up. This meant that as soon as it had fallen of the drop, it was off and finished first!
Comparing our Racer!
Next we wanted to compare our creature with a mutation chosen by the system. There was no easy way to do this as we could not save our creature and put it in with the mutation. So we decided to see how well the mutated creature would perform on the second and third maps. We did not do a comparison using the first terrain, since it is just a simple ramp.
The Mutation
With the Sodarace Kiosk you can choose to edit the creature automatically. This then runs through a number of generations of creature until it has reached a desirable level of speed on the terrain. This then is the fully mutated creature. We decided to again pick the first racer of the three racers available.
We used a large number of generations to attempt to produce the best creature mutation possible! After many many generations we had what we thought was the best possible Racer. So we tested it. And... it worked! It won every race by a large margin. This was far far superior to our own creature. Thus proving that the computer generated creature is far more advanced than that which we made. Both of them won the races but the machine generated mutation won by a huge margin! Thus proving that machines may still one day take over!
Sodarace Kiosk's AI
Sodarace Kiosk uses artificial intelligence-driven genetic algorithms to automatically improve racers. The criteria for choosing the most 'evolved' is the time it takes the creature to complete the chosen race track. Compared to fully-fledged algorithms, Sodarace's version is greatly simplified. The basic pattern consists of taking the existing racer, then having it compete against a version of itself that has been mutated in some way by the program. After the race simulation is completed, the program keeps the winner and restarts the process using that as the new base for mutation.
Obviously this is far from the most efficient or reliable method of evolving the racers. It is sometimes extremely quick in finding changes that make a great difference to the results a racer obtains on a particular track, and other times it may go through many 'generations' before making any kind of improvement, let alone a significant one.
About AI in general
Prominent experts define artificial intelligence as the study and design of systems that perceive their environments and react in ways that maximise their chances of succeeding in whatever tasks their are striving to accomplish. Researchers are hoping to create systems capable of exhibiting traits such as reasoning, planning and perception, among others.
There have been lengthy discussions about the implications and consequences of actually creating such a system and the concept has been used by fiction authors on many, many occasions. Some scientists even consider AI the future of evolution.
Sodarace & Evolution
Sodarace is an application built to explore evolution. It is written in the Java programming language and as with any programming language they are artificial languages that are used to control the behaviour of a machine. This confines expression and interpretation to a set of syntactic and semantic rules which the machine logic can understand and execute. This makes implementing the concept of evolution in a program a difficult task to accomplish, with one solution being to use a category of algorithm known as genetic algorithms (or evolutionary algorithms).
Genetic Algorithms
Genetic algorithms are a way of solving problems by mimicking the processes found in nature. They use the same combination of selection, recombination and mutation to "evolve" a solution to a problem. Imagine the genetic algorithm contains abstract representations of chromosomes inside the creature objects in the Sodarace kiosk. This "chromosome" could be as a string of real numbers or, as is more typically the case, a binary bit string. It might look something like this: 100010011100101110. When the program is first run a random chromosome could be generated, this pattern can then be used to generate a "fitness" score and determine how good the creature is at solving the problem.
Then the creature can be changed and the new model would have a bit pattern that is not random but instead formed from some calculation based on the bit pattern of the earlier creature. These two steps represent the computerised versions of the real-world examples of survival of the fittest and evolution.
Within Sodarace, the automated mutation option could work such that during each successive generation, a proportion of the existing creatures is selected to breed a new generation. Individual creatures could be selected through a fitness-based process, where fitter creatures are typically more likely to be selected.
References
Sodarace Website - Information about Sodarace and access to Sodarace Kiosk
Sodarace on Wikipedia - Various bits of information on Sodarace
AI on Wikipedia - Useful information on artificial intelligence
ai-junkie - Excellent resource for information on genetic algorithms and artificial intelligence
Other resources
FamFamFam - Free to use icons
PNG Fix Hack - IE 6 fix for PNG Alpha Transparency
JavaScript Accordions - JavaScript fade-out effect
About the Project
The project is the culmination of an assignment set by one of the module lecturers at Queen Mary, University of London. The project consisted of analysing the Sodarace Kiosk application from Sodarace, gathering results and writing a report on Artificial Intelligence and use of genetic algorithms to simulate rudimentary evolution.
Authors
The authors of the project are a small bunch of Computer Science students (4 to be precise) working towards completion of their first year at QMUL. Due to the nature of the assignment for which this website was part of the requirements, the website is considered to be a digital report and therefore will not be maintained by any of the authors.