Staredit Network > Forums > Technology & Computers > Topic: Genetic Algorithm Cars
Genetic Algorithm Cars
Jan 21 2011, 5:36 pm
By: The Starport
Pages: < 1 2 3 4 5 >
 

Jan 22 2011, 10:40 pm Raitaki Post #41



It is not that terrible. Try restarting a few times, and you'll notice that DAMN NEAR ALL of the single colored cars of generation 1 has at least one geometric figure that prevents the car from going far. With crossbred, refined populations, the population's traits have already been filtered and combined so that the cars can go a certain amount before failing. With that difference, we can clearly see that starting from an already refined population is better because to succeed only means to get a car in which one or several figures have been changed in a way that improves performance, rather than start from scratch and wait for a good one to just come by. The second problem is, when we found a good mutation in a refined population, there'll be less "alleles" of the same figure to have a chance to replace the mutation by crossbreeding, and the time it takes for the newly mutated car to become dominant is much shorter, since (almost) all other cars in the population already have some of its figures, and only need to replace a previous figure with the new figure.

So yeah, why not?



None.

Jan 22 2011, 10:52 pm Lanthanide Post #42



Yeah, if you start off with some good initial designs, like I did where it rapidly shot up to 170, then starting with a mutation rate of 0% would be worthwhile. But if you start with a terrible population, all this will do is give you the "best of the bad bunch" but it'd still be useless. Of course, since you can't actually view all 20 individuals and then choose your mutation rate, it is probably best to actually start with 0% for the first 2-3 generations, then decide whether you should increase the rate or not.

Also, I seems that if you get a car that reaches the distance quota (as Raitaki called it), then it is automatically a candidate for being a parent of the next generation - this is very evident when you start with a 0% mutation rate as your next generation is highly likely to only be a couple of colours, corresponding to the individuals that beat the quota in the first generation. Losers are also culled immediately, as per my experiment above where I got the 0.3 amongst the 197.5's and it didn't persist to the next generation - it's probably again tied to the distance quota, with a rule something like any car that gets less than 50% is automatically excluded from reproduction. Then I think there is probably a sliding chance for the rest of them. In my experiment above I got a single car that got to 206.5. This variation persisted for a few generations, but it was always only a single car that possessed it, and now after 7 generations I'm back to the uniform population of 197.5 cars with no variation between them. So it seems even though that particular car was clearly better than the rest, it wasn't better by enough to force the algorithm to always choose it as a parent, and eventually it died.

Another interesting thing can be seen in my graph - if you look at where the red line drops down and flattens out (at 0% mutation rate), about 10 generations or so before you can see a spike down and back up again, and then the red line flattens out there later. So it seems in this case there was a generation where the best car achieved 197.5, but through mixing up the parts again the next generation improved, but the weakness persisted and eventually won out. Clearly the algorithm does not always pick the 100% best candidate.



None.

Jan 22 2011, 11:04 pm Raitaki Post #43



In Genetic Algorithim Cars, there is no "bad lunch", just "lunch consisted of stuff that is horrible when eaten together and some real shitty food". What makes the cars suck is either a terrible terrible trait (like a long spike to the ground or wheels on top) or a bad mixture. After awhile of crossbreeding, even a population with only 2 out of 19 cars with the ability to satisfy the first quota (6) can turn out fine, infact far better than the best 2 cars that made it to the quota (from the way they moved and the hill just a bit to the right, they couldn't have even go 10). I'm not saying that the best cars are preserved, I'm just saying that their traits have more chance of being preserved and passed to other cars. So a bad starting population doesn't mean they fail without mutations.

EDIT: After reading the post about mutations affecting many figures at once and one generation of 8% mutation, I think it's better to just leave the mutation rates on 1 generation at a time, because it's more likely to generate cars with entirely new stuctures by mutations than I expected.

Post has been edited 1 time(s), last time on Jan 22 2011, 11:28 pm by Raitaki.



None.

Jan 22 2011, 11:24 pm ClansAreForGays Post #44



Anyone have an Intelligent Design version of this?




Jan 22 2011, 11:25 pm Raitaki Post #45



Quote from ClansAreForGays
Anyone have an Intelligent Design version of this?

...Meaning? o.o;



None.

Jan 22 2011, 11:39 pm The Starport Post #46



A level editor?



None.

Jan 23 2011, 12:13 am Lanthanide Post #47



http://www.phunland.com/wiki/Home



None.

Jan 23 2011, 1:46 am NudeRaider Post #48

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch


Believe it or not, but this is almost as effective as my cars with bigger wheels. There's just 1 place where it flips over due to its height.

Btw. To keep the simulation running you just have to make sure that the applet is still visible on the screen. E.g. 2nd browser window which isn't maximized but is stretched across the whole screen save a small part at the bottom where you can see the simulation window in the background.




Jan 23 2011, 1:52 am Decency Post #49



I just opened 5 windows and they all ran fine simultaneously. =o



None.

Jan 23 2011, 2:27 am Lanthanide Post #50



I'm running chrome, and it doesn't run if it's in another tab, but if it's in a new browser window with that tab selected, it's fine. So the windows don't need to be visible for it to run.



None.

Jan 23 2011, 2:36 am Raitaki Post #51



I think Flash versions 9+ fuck up abit, and it either stops (your situation) or slows down greatly (mine, using Firefox) running Flash objects if you switch to another tab, so you just have to either downgrade to Flash 8 (I think) or leave it in a window of its own :kame:

And Nude, there are shitloads of structures which do well normally, but if you run into a wave track (more specifically tracks that have many M slopes in it) like mine, bye bye imbalanced car =(



None.

Jan 23 2011, 2:58 am Lanthanide Post #52



Yeah, rolling slopes are fairly easy to traverse by most cars, or even steep ones (to a certain degree). It's the jaggy M and W layouts that suck all momentum out of the car and require large wheels that seems to drive the most evolution.



None.

Jan 23 2011, 3:35 am poison_us Post #53

Back* from the grave

Yeah, it turns out if the algorithm will find the small-car big-wheel design, it rapes the course.






Jan 23 2011, 3:40 am Raitaki Post #54



Quote from poison_us
Yeah, it turns out if the algorithm will find the small-car big-wheel design, it rapes the course.


...Until it falls into a gutter big enough to stop it from cumming, like the one right to it replaced with a V.



None.

Jan 23 2011, 5:49 am The Starport Post #55



I have to wonder if shifting the start position/angle could drastically effect the outcomes of many of these designs. I bet some that trip or get stuck just got the rotten luck of having the wrong trajectory from a leap into a crevice or something. The slightest difference in start position could maybe affect the outcome significantly in these cases.

Post has been edited 3 time(s), last time on Jan 23 2011, 9:40 am by Tuxedo-Templar.



None.

Jan 23 2011, 6:08 am poison_us Post #56

Back* from the grave

Quote from Raitaki
Quote from poison_us
Yeah, it turns out if the algorithm will find the small-car big-wheel design, it rapes the course.


...Until it falls into a gutter big enough to stop it from cumming, like the one right to it replaced with a V.
Ironically the next generation with the same exact configuration passed by that easily. It stopped just before it hit the ground in that pic because it hit the 226.2 limit.

EDIT: I found a pretty damn good method for ensuring a high score gain per generation and accompanying average. Will edit or make another post explaining the theory and pics.

Unrelated: anyone else think that the following is too damn weird to work in real life?



EDIT2:

Not too bad. I think the path tends to get impossible at a certain point, and I might've hit it. I'll let Gen. 10 run its course, and if its still at that peak I'll turn the mutation up to 1% and let it have its way overnight.


Post has been edited 2 time(s), last time on Jan 23 2011, 8:17 am by poison_us.




Jan 23 2011, 8:55 am FlashBeer Post #57



I got just below 600 after leaving it on for a whole day.



None.

Jan 23 2011, 10:05 am NudeRaider Post #58

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from poison_us
Unrelated: anyone else think that the following is too damn weird to work in real life?

This looks like the perfect car for the course. In real life it can work too as long as you have a strong material connecting the axles with the body and the car isn't too heavy. It's pretty much the offroad bike design.



Quote from FlashBeer
I got just below 600 after leaving it on for a whole day.
600 what? Average, Max. or Target?

Quote from Raitaki
And Nude, there are shitloads of structures which do well normally, but if you run into a wave track (more specifically tracks that have many M slopes in it) like mine, bye bye imbalanced car =(
It does traverse those M/W parts because it won't ever hit the ground with a solid part. It flips over when it hits a structure like this though:
Quote from poison_us





Jan 27 2011, 9:16 pm CaptainWill Post #59



For some reason none of mine can get past 150ish. There's a bit where the road zigzags about four times which no design has managed to get through yet. The long-framed designs get caught on the points, some of the uneven designs flip and the big-wheeled designs eventually stall on the second or third V.

It's really irritating.



None.

Jan 27 2011, 9:25 pm NudeRaider Post #60

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from CaptainWill
It's really irritating.
It is. That's why I gave up on it.
I thought the path is generated in a certain way that the cars can pass any spot if they find the right parameters. I thought I could watch evolution get the most effective car eventually. But after some simulations I realized it's all pretty random and the applet isn't well thought-out enough to get satisfying results.




Options
Pages: < 1 2 3 4 5 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
Please log in to shout.


Members Online: Roy, Ultraviolet