Cat Racing Competition at WCCI 2008 - Leonard Kinaird Heether


Published on

Presentation of the Leonard Kinaird Heether's entry to the Car Racing Competition held at the 2008 IEEE World Congress on Computational Intelligence.

Published in: Technology, Sports
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Cat Racing Competition at WCCI 2008 - Leonard Kinaird Heether

  1. 1. Racing Controller Trained with Cultural Algorithms WCCI2008 Leonard Kinaird-Heether Dr. Robert G. Reynolds Advisor Artificial Intelligence Laboratory Wayne State University, Detroit, Michigan 48202
  2. 2. Basics <ul><li>Controller written in Java using Eclipse. </li></ul><ul><li>Trained on Windows XP. </li></ul><ul><li>Designed to work with a plugin for the TORCS racing simulator. </li></ul>
  3. 3. The Controller <ul><li>Controller receives data from the racing program and makes a decision using a system of rules. </li></ul><ul><li>The data used includes: </li></ul><ul><ul><li>The distance to the edge of the track in a 180° arc oriented around the front of the car. </li></ul></ul><ul><ul><li>The RPM (Revolutions Per Minute) reading from the car’s engine. </li></ul></ul><ul><ul><li>Whether or not the car is on the track. </li></ul></ul><ul><ul><li>Whether or not the car is traveling in the correct direction on the track. </li></ul></ul>
  4. 4. Turning <ul><li>The turning angle is determined by the distance to the edge of the track. </li></ul><ul><li>The largest distance corresponds to the angle that the car will turn. </li></ul><ul><li>This angle will then be normalized to fit within a range of -1 to 1, to correspond with the way the racing program deals with turning. </li></ul>
  5. 5. Speed <ul><li>There is a set of rules used to determine how fast the car is allowed to move in a certain area of the track. </li></ul><ul><li>This speed limit is determined by the turning angle. </li></ul><ul><ul><li>There are 10 rules for the set of turning angles: </li></ul></ul><ul><ul><ul><li>0°, -10° & 10°, -20° & 20°, -30° & 30°, -40° & 40°, -50° & 50°, -60° & 60°, -70° & 70°, -80° & 80°, -90° & 90°. </li></ul></ul></ul><ul><li>If the car is moving slower than the speed limit the controller calls for acceleration </li></ul><ul><li>If the car is moving faster than the speed limit; </li></ul><ul><ul><li>If the current speed is <20 mph over the speed limit, the controller calls for no acceleration and no braking. </li></ul></ul><ul><ul><li>If the current speed >20 mph over the speed limit, the controller calls for braking. </li></ul></ul>
  6. 6. Shifting <ul><li>The controller takes RPM measurements and determines whether or not to upshift or downshift. </li></ul><ul><ul><li>The controller waits 10 turns between shifts to eliminate repeated up and down shifting due to the initial RPM drop that occurs right after upshifting. </li></ul></ul><ul><ul><li>If the car is in neutral, something that occurs only at the start of the race, the controller shifts into first gear automatically. </li></ul></ul><ul><ul><li>The car will upshift if the RPM measurement is above 7500 and the current gear is less than 6 </li></ul></ul><ul><ul><li>The car will downshift if the RPM measurement is below 4000 if the current gear is greater than 2. </li></ul></ul><ul><ul><li>In the case where the car is in second gear, the controller will call for a downshift when the RPM measurement is below 3000, rather than 4000. </li></ul></ul><ul><ul><li>Reverse gear is only used during error correction. </li></ul></ul>
  7. 7. Error Correction <ul><li>There are three cases where car is considered in an error state. </li></ul><ul><ul><li>The car has left the track. </li></ul></ul><ul><ul><li>The car is stuck. </li></ul></ul><ul><ul><li>The car is going the wrong way on the track. </li></ul></ul><ul><li>These are solved by a set of hard coded rules that were designed to resolve the problem. </li></ul><ul><li>There is also a rule that keeps the car near the center of the track when going straight. This rule also helps smooth out the turning. </li></ul>
  8. 8. Cultural Algorithms <ul><li>The Cultural Algorithms Toolkit was used to refine the speed limit rules in the rule base. </li></ul><ul><li>Each of the speed limit rules will decide the current maximum speed depending on what the current turning angle is. </li></ul><ul><li>The original speed limits were set by hand, but proved to be unsuitable for use on the large variety of tracks in the TORCS system. </li></ul>
  9. 10. Training Setup <ul><li>The landscape has 10 dimensions, corresponding to the 10 speed limits. </li></ul><ul><li>Each of the 10 dimensions had the boundaries of 0 and 300. </li></ul><ul><li>The fitness of the track is determined by the distance that the car traveled in 10000 “turns” in the simulation. A longer distance corresponds to a higher fitness value. </li></ul>
  10. 11. Final Setup <ul><li>After each of tracks had a set of speed limits generated from the Cultural Algorithms Toolkit the results were hard coded into the controller. </li></ul><ul><li>The initial distance to the edge of the track data was stored for multiple race starting conditions. </li></ul><ul><ul><li>This data is used to determine what track is currently being raced on, and thus, what set of speed limits to use. </li></ul></ul><ul><ul><li>In the event that the track could not be determined, 4 sets of default speed limit values was created. </li></ul></ul><ul><ul><ul><li>The controller starts using the fastest set of values. </li></ul></ul></ul><ul><ul><ul><li>If the car receives a certain amount of damage, the controller switches to the next, slower, set. </li></ul></ul></ul>
  11. 12. Interesting notes <ul><li>Using different starting points on the tracks will affect the efficiency of a trained set of speed limit values. </li></ul>