Breeding Race Cars With Genetic Algorithms
smack-pot writes "Wired News has an article about how the Digital Biology Interest Group at University College, London is using genetic algorithms to breed superfast Formula-One race cars. 68 design parameters were configurable in the cars, and the generated designs were tested using the racing simulation software developed by the game developer Electronic Arts. According to the research it is possible to shave off 88/100th of a second per lap by using genetic algorithms to tune the cars. In an industry where a tiny fraction of a second matters, that's significant."
This will EVOLUTIONALIZE racing ;)
It's easier to fight for one's principles than to live up to them.
Here's a good link for people who don't know what genetic algorithms are:
It should be noted that the "research" was done with a video game and no actual tests have been conducted on real cars and situations. This does not mean the techniques cannot be applied in real situations, but just that it has not been done yet.
A blog like any other.
How long then before racecars come with a "pedigree" like a champion racehorse or a Crufts prizewinning pooch?
"And Schumacher rides to victory again in his car 'Victorious Monarch' which of course comes from the Ferrari stable and is the offspring of 'Burning Rubber' and 'Teutonic Speed Demon'"
A little planning goes a long way...
88/100 = 0.88
So it's about one second.
500 lap race = 440s. Not insignificant.
This lot must have come from one of those places where it's still legal to marry your sister...
When I am king, you will be first against the wall.
I did some research and programming in this field over a decade ago. The really frustrating thing about this field is how slow moving it is and how little it is taken seriously.
When you have constructed an environment and electronic "organisms" that can breed within that environment, and then watched the generations gradually improve and adapt to the environment, you get the feeling of a new kind of power that we haven't really tapped yet - evolution.
I think one of the problems is that people don't get what is happening in these types of projects. When I showed people the projects I was working on - even biologists and computer scientists - the first reaction was that what they were seeing was just a simulation - i.e. that I had programmed in the fact that the organisms adapted to the environment. It took a lot of explaining to convince some people that what they were seeing was actual evolution, albeit in digital form.
The fact that this research is just looking at breeding cars which are used in a computer game just demonstrates how slow moving developments in this area are. Evolution could be used to improve many aspects of cars -- their engineering, efficiency, production and even visual design. It will happen one day, but it's taking us a hell of a time to realise that we can exploit the force that produced all the wonderful things we see in nature.
After careful research, I found a visual aid that helps clear up the mystery.
**WARNING** Do not view at work (if you are a mechanic). It's a truckse.cx link.
Show me on the doll where his noodly appendage touched you.
AKA "chipping". At the expense of engine life, this can get huge power gains out of turbocharged cars by increasing the maximum boost. Normally aspirated cars can be pushed up a few bhp by messing with the fuelling, but generally the gains are less obvious so they're sold as "driveability improvements" for non-turbos. To get a decent power increase from a non-turbo engine you need to make it breathe better. Porting and gasflowing the head is most effective (and expensive). Fitting bigger valves, hotter camshafts etc will all still do a lot more than a chip!
When I am king, you will be first against the wall.
As a member of a raceteam which is about to enter the formula SAE competition. (A global university based competition aimed at building the fastest racecar) I find that 68 parameters are not nearly enough. Modern racecars have that many in the suspension alone. And all those phony calculation with determination of how many seconds are spared cannot be used for anything concrete.
This means you have to be skeptical with experiments performed just in simulation without testing the same model in reality.
All that aside, do you watch NASCAR much? I'm not what you'd call a NASCAR junkie, but I do watch at least every other race. Tenths of a second in lap times are frequently the determining factor between pole and, say, 10th qualifier. Races are often decided on margins approaching less than one second.
All that said, yes, one bad pit stop can and does ruin a race. So does one unseen oil slick. Kasey Kahne should have won Dover, period. The officials were loathe to call a caution so late in the race, after so many cautions had already been called, and cost Kasey his first win.
Sucks.
And tenths of a second did it.
"BSD: Free as in speech. Linux: Free as in beer. Windows 10: Free as in herpes." --Man On Pink Corner in #52607549.
Interestingly enough, Peter Bentley's group results on car racing would not be considered human competitive, unless the results obtained in the simulation will be tried in the real world, or if the simulator is something experts actually use to shave of seconds. In any case, it seems the Evolutionary Computation world is starting to obtain very strong results, for a part due to Moore's law. It's possible that this is caused by the fact that the field simply tries to solve things, instead of first proving that it works (AI/ML), or proving that it doesn't work (Operations Research).
Ok, having done a lot of work in Genetic Algorithms here is the elevator pitch.
A genetic algorithm is an algorithm that manipulates encoded problem solutions using a population of potential solutions. Each solution, or population member, in this case, is a set of racing car parameters. The genetic algorithm selects a couple of solutions and recombines parts of each to produce two new solutions using a recombination operator. Mutuation is normally added as well. The two new solutions are then "measured" for fitness; in the racing scenario a full scale simulation of the actual car is carried out. This produces a single value of fitness that is associated with the newly generated member.
The algorithm proceeds by selecting a couple of candidate parents; normally with random bias weighted toward fitter parents. The parents mate, new chidren produced, the children are measured, then integrated back into the population and they cycle continues.
The end result of all of this is that small "above average" solution components "accumulate" in the population at an exponential rate as time goes on. Of course, this only happens early in the first few generations before high "saturation" / convergence levels are reached. This is kind of cool because something good is happening at an exponential rate as time goes on; this is very useful when trying to solve problems with vast state spaces; eg the problem of finding a good racing car model where you need strong brew to find a resonable solution. Later on, most of the population members can often encode very fit solutions. This mathematical property (exponential accumulation) explains why the genetic algorithm is the algorithm of choice in nature, and also why an alarming proportion of PhD students are now studying genetic algorithms. This technique isn't new either, as Ratbag games have been using these techniques and other cool machine learning techniques for years to evolve the AI on their car titles such as "Dirt Track Racing" and "Powerslide".
Of course, we already know that this stuff works; as a quick trip to the zoo will show you what evolution has done to optimize the cheetah.
This is a very simplified view; there are a bunch of design issues such as encoding, premature convergence, crossover (recomination), reproduction methods, method of generation, population sizing, operator adaptation that make this whole field very interesting and addictive. Having written a dozen genetic algorithms and solved many many problem types using GAs they never cease to suprise me how powerful these methods are.
consider coffee a lubricant that helps one penetrate the coding zone
Is that genetic algorithms are nice for parametric optimisation, but not for breakthrough innovation.
- 0.88 seconds is not well within the margin of error that the human drivers would introduce.
- If you would put all 20 current f1 drivers in exactly the same car, 15 of them would qualify within 0.5 of a second.
- 0.88 seconds advantage every 73 laps (Indianapolis) would accumulate to 64,24 seconds (almost a lap).
Genetic Racing sounds great in theory, but wait until the first inbred cars come out. You know, they start all scientific with that Formula 1, but when it works its way deep inside the country with NASCAR... oh, my hominy grits... those Republicans are gonna want to force us to race whatever comes out of the oven.
Genetic algorithms are terribly clever, and are useful for many purposes, but to make them work you need a "fitness function" - the ability to check how good a solution is. And, seeing you're going to need to apply it to every member of the population in each generation, it better be pretty bloody low-overhead, and be a pretty close approximation of the real-world fitness of a solution. In fact, in my admittedly limited experience with them I found that 99.9% of the difficulty in applying genetic algorithms to a problem is finding an appropriate fitness function.
The fitness function these guys have used is to use a racing simulation game and run the race electronically. That's good if you're trying to set up a car to win that game, but if you're actually trying to win a real car race with a real car, if the only fitness function you have is sending your driver out for a few million trial laps it's just not going to cut it.
If, on the other hand, they had built software that allowed them to specify the car settings and tell them what lap time the car would achieve, that would be really impressive, and then you could bolt on the GA optmizer to find the killer setup. But using GA's like they have done is just a party trick - cute, but not that impressive.
Any sufficiently advanced technology is indistinguishable from a rigged demo
--Andy Finkel (J. Klass?)
Foremost from my amateur racer point of view is the cost: Being able to tune any one of 60 some-odd parameters probably means being able to swap out any one of 60 some-odd parts with some other part, so you've got to have one of every possible part on hand or be able to fabricate it.
For an F1 team, cost's not so much a consideration, though, the trouble is time. To be able to change that many parameters means having someone get under the car, swap a pile of parts, and send the test driver back out on track to collect the info for the next evolution. Computer simulations are neat, but they're not perfect, and when you're talking about shaving fractions of a second, that small imperfection can throw it completely away.
I also wonder if this would actually be useful in the real world with real conditions. The sun going behind a cloud for a while has a measurable effect on lap times. The amount of gas in the tank, the temperature of the track, all those things change the way a car handles on the edge. Often, race setup is to dial in a car to be a little tighter or looser than what you really wanted because you expect the track to come to you.
And then there's a possibly even bigger problem: If you go out and look at two cars that are running identical lap times, chances are they're nothing even close to identically set up, because drivers aren't machines. One driver will like a certain setup, and another won't be able to do anything with it.