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

Jan 21 2011, 5:36 pm The Starport Post #1



New version! http://www.boxcar2d.com/

http://megaswf.com/serve/102223/

Almost got a working unicycle once. :awesome:

Post has been edited 2 time(s), last time on Jan 28 2011, 9:48 pm by Tuxedo-Templar.



None.

Jan 21 2011, 6:22 pm poison_us Post #2

Back* from the grave

Been running this for roughly half an hour, and I'm on Generation 20. Have yet to have anything make it past the 210 steep hill >.>




Jan 21 2011, 6:27 pm The Starport Post #3



Yeah, I've noticed you'll get terrain that becomes non-traversable sometime soon after the 200 mark each time. Still, it's fascinating to watch the algorithm do oddball things that actually work from time to time. :P



None.

Jan 21 2011, 6:29 pm Decency Post #4



Olldddd. =p

It will figure it out eventually! But I think the algorithm only runs for so long each time, so we'll never know.



None.

Jan 21 2011, 6:41 pm MadZombie Post #5



Pretty cool. Reminds me of the program/game where you have a box in which creatures show up and you control parameters of thigns like food, mutation, disease, and other random things and these things would show up and were meant to be living things and the whole thing was just evolution. It was pretty cool I guess too.



None.

Jan 21 2011, 6:52 pm poison_us Post #6

Back* from the grave

Here's the hill I'm talking about. Changing tabs pauses it, but taking focus off of chrome does not, so it's fun to use SCMD in the left half while it runs in the right :awesome:



EDIT: Oh, and what're the red/black lines supposed to indicate? Max score and average score?





Jan 21 2011, 7:03 pm Kaias Post #7



Quote from poison_us
Here's the hill I'm talking about. Changing tabs pauses it, but taking focus off of chrome does not, so it's fun to use SCMD in the left half while it runs in the right :awesome:



EDIT: Oh, and what're the red/black lines supposed to indicate? Max score and average score?
I haven't been watching it since generation 7, but I can see in my current generation (16) that two of them have made it to 240. Not sure what the graph is.



None.

Jan 21 2011, 7:22 pm MadZombie Post #8



The farther they go the more it brigns the red lines up. The black line stopped at the same point as poisons screenshot.



None.

Jan 21 2011, 8:16 pm poison_us Post #9

Back* from the grave



On Generation 44. Now I looked at the results from 44, and the black line shot up to its highest point. Now I regret clipping out the stats, might've been indicative of the meaning of the black line :(





Jan 21 2011, 8:35 pm Decency Post #10



If I had to guess, the maximum on the given generation and mean of the given generation.



None.

Jan 21 2011, 8:43 pm poison_us Post #11

Back* from the grave

Quote from name:FaZ-
If I had to guess, the maximum on the given generation and mean of the given generation.
Quote from poison_us
Max score and average score?
*cough*
LOVE YOU FaZ-!!
But seriously, I still haven't passed the 210 hill D:





Jan 21 2011, 9:16 pm Lanthanide Post #12



Interesting, but the fitness function could be tweaked to allow much faster evolution - if the shortest line between the two wheels were computed, and then the car dropped with this line parallel to the ground, you'd get much better results. I've seen, particularly early on, fairly good-looking cars that would get much farther than the average car at that point, if they hadn't spawned entirely on their back. In the current system, many of these otherwise good cars will be junked, leading to slower evolution. Also, there's no way for it to spawn more than 2 wheels ever, which would probably go a way to making the best evolved cars for this course I think.

Also the red line is the total for a given generation, and the black line is the average. So if your black line is close to your red, it means all of your cars are doing well, but if there's a big gap, it means some of your cars are doing really well and some are doing really poorly.

Post has been edited 1 time(s), last time on Jan 21 2011, 9:23 pm by Lanthanide.



None.

Jan 21 2011, 9:30 pm Fire_Kame Post #13

wth is starcraft

Its fun to watch. I'm sure you science guys have more interesting things to say about it ;awesome:

EDIT:
Quote from poison_us


On Generation 44. Now I looked at the results from 44, and the black line shot up to its highest point. Now I regret clipping out the stats, might've been indicative of the meaning of the black line :(

I think it might be showing the adjusted trend. The red line is raw data, the black line is how much is actually improving over time. I don't know what the trend line is adjusted for though.

Post has been edited 1 time(s), last time on Jan 21 2011, 10:09 pm by Fire_Kame.




Jan 21 2011, 10:45 pm poison_us Post #14

Back* from the grave

Quick note: 50% mutation rate is bad.


The sudden drop occurred roughly 1-2 generations after I adjusted it to 50%.





Jan 21 2011, 10:48 pm Lanthanide Post #15



No, the red line is the total of the scores for the previous generation, and the black line is the average. It's pretty obvious if you watch a generation and see how the lines react.

Another problem with it is that it seems too quick to end a test. There have been a few times, particularly when a car goes into a dip, where it jumps up into the air and isn't moving forwards (or moves backwards slightly), at which point if it were to land back on the ground it was probably 95% likely that it would keep moving forwards. But the fitness algorithm sees that it's not making progress, so ends the test prematurely.

In general I think it's actually a pretty poor implementation. It's obvious that big wheels are almost always better than small wheels (if we could have more than 2, then small ones might work well), but there is no clear trend in wheel sizes increasing over time - it seems to randomize them too much. Basically I don't think it's doing a good job of only mutating off the previous best unit in each slot. Eg if in generation 14, slot 15 managed to get to 200, and in generation 15 it only gets to 110 because the wheel size went down, then generation 16 will be based on generation 15's results, instead of generation 14's. The only genetic part seems to be crossing the different slots with each other and throwing in some random mutation, but because it never keeps track of the best result and always seems to let all 20 slots cross with each other (instead of only the top 5 crossing with the rest), it's very easy to go backwards or for an excellent solution to be diluted by crossing it with weak solutions.

Post has been edited 1 time(s), last time on Jan 21 2011, 10:55 pm by Lanthanide.



None.

Jan 21 2011, 10:52 pm Fire_Kame Post #16

wth is starcraft

So...yes its a trend of the averages. :P




Jan 21 2011, 11:00 pm MrrLL Post #17



Quote from name:FaZ-
Olldddd. =p

The file was uploaded earlier today, it's actually quite new.

You're probably thinking of this one, which was posted a few months ago. The maker noted on Reddit that this was his inspiration.



None.

Jan 22 2011, 1:58 am The Starport Post #18



Relevant:




None.

Jan 22 2011, 2:04 am MadZombie Post #19



Thats weird. My black line stopped lining up with the red line after the 10th generation for me.



None.

Jan 22 2011, 2:20 am poison_us Post #20

Back* from the grave

Generally as the red line remains the same, logically the black line should remain the same, but on my second trial (on generation 46 now), that remains true for large sections of flat red lines, but sudden dips in both occur. Single generations apparently easily fail.




Options
Pages: 1 2 35 >
  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: Ultraviolet