Genetic Algorithm used to build a car with the Box2D physics library.

Discussion in 'Off Topic' started by Seba, Jan 25, 2011.

  1. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,692
    I've gotten 417 in the twelfth or so gen; after that, every single gen averaged 208.5; it's a stupidly annoying curve, and it might be what Snark described.

    [​IMG]

    EDIT: I'm an idiot, didn't realise that a new track is generated every gameload.
     
    Last edited: Jan 26, 2011
  2. Randdalf

    aa Randdalf

    Messages:
    1,054
    Positive Ratings:
    466
    One of mine got to 500 on the 5th generation or so. Guess I had an easy track.

    I also tried 0% for a while, and though it's obviously not as good at making a vehicle, as with mutation, but there's enough variety in the initial gene pool to eventually reach the standard-ish model.

    For posterity, this should be redone with quicker animations/physics, and 5 different tests on new randomly generated tracks for each generation, rather than the same one. At the moment they're being trained to traverse one particular track.
     
    Last edited: Jan 26, 2011
  3. Exist

    Exist L6: Sharp Member

    Messages:
    306
    Positive Ratings:
    136
    On side note, this was posted on /b/ today.
     
  4. Numerous

    Numerous L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    72
    You know what wopuld beawesome?

    A genetic algorithm to generate the best troll on 4chan. Have it only acivate once every 2 months to avoid people catching on, and VOILA.

    2327 CE wil be a year to remember.
     
  5. Zhan

    Zhan L5: Dapper Member

    Messages:
    208
    Positive Ratings:
    123
    Haha, how would you write the fitness function?
     
  6. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,437
    Positive Ratings:
    3,780
    The one thing i dislike about this is that several potentially successful car designs were spawned vertically and fell over backwards despite the fact the over all design was far superior to the others that can't get past the first bump.

    Mine are looking like motorbikes: (mutation rate was 5%, but i just boosted it to 10%)
    [​IMG]

    There's a dip at about the 100 mark that just causes all evolutions to flip onto their back. Also i wish it would rotate the front suspension. It doesn't seem to realise there's a problem there because the front wheel spends a lot of the time in the air it doesn't snag until 60 or 100 metres.
     
    Last edited: Jan 27, 2011
  7. drp

    aa drp

    Messages:
    2,264
    Positive Ratings:
    2,602
    i left mine running over night a few days ago. it got up to generation 30

    it built a transformer and popped out of my screen.
     
  8. Mr. P. Kiwi

    Mr. P. Kiwi L5: Dapper Member

    Messages:
    244
    Positive Ratings:
    95
    Mine are built for spikes:
    [​IMG]
    Oh, evolution.
     
  9. Mr. Happy

    Mr. Happy L6: Sharp Member

    Messages:
    320
    Positive Ratings:
    158
    Around 22 to 24 generations the cars plateued, always reaching either 157.5 units or 159.9 and reusing the same design over and over. Then generation 25 hit and suddenly they were all mutant rejects that just flopped around and failed haha.
     
  10. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,184
  11. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,692
    [​IMG]
    the bestest

    Also, that page ate my Firefox.
     
  12. Zhan

    Zhan L5: Dapper Member

    Messages:
    208
    Positive Ratings:
    123
    This one's totally going to win

    [​IMG]
     
  13. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,522
    It was doing so well... then it encountered a hole that just couldn't be defeated.
    [​IMG]

    Always dived right in headfirst and lost all speed, didn't get any grip with the backwheel and got stuck.
     
  14. Xi.Cynx

    aa Xi.Cynx Former Alias: †Blade†

    Messages:
    775
    Positive Ratings:
    786
    I don't have this "max wheels" or "frequency" or "Framerate" OR Up/Down buttons on mine... odd
    On a side note, As you can see from the graph, it seems to have encountered a rough part as well.
    I think if the track segments where 1/2 the size it would make this much better.

    [​IMG]
     
  15. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,692
    Blade, use Icky's link (last post on the previous page).

    IN OTHER NEWS
    [​IMG]
     
    Last edited: Jan 30, 2011
  16. sniprpenguin

    sniprpenguin L6: Sharp Member

    Messages:
    266
    Positive Ratings:
    130
    More wheels = more power.

    Seriously, one time I bumped it up to 8 max and the damn things were just wheels. There was no way it could get stuck.

    I tried it at one wheel, but seeing 25 generations with a high of 15 was depressing.
     
  17. sniprpenguin

    sniprpenguin L6: Sharp Member

    Messages:
    266
    Positive Ratings:
    130