Friday, 28 January 2011

Genetic Algorithm

This kinda thing really interests me. Evolution. Of a computer system. Wow. Evolution / adaptation is an amazing accomplishment, and we all know computers can simulate pretty much any process. What better process to simulate than evolution.

I found this site where you watch the computer try to evolve a car to traverse a track. It is pretty cool. The computer beings by creating 20 random cars, which are 8 triangles with their points at the centre and 2 wheels on hydraulics. You will see they are all one colour and most likely they will all fail real bad.

Then at each generation the cars swap pieces to form the next generation. If you have set the mutation high, you may also see some pieces changing shape.

Somehow, the computer uses the distance travelled to find the best parts and then combines that into the next generation. This process is call natural selection. Pretty sweet stuff. This one has been left going for a while.


You can see sometimes that the natural selection process along with the mutation often forms a worse car. This event occurs in real life, often when the weak that are left behind have the most likely chance of survival and so the weak take over due to pure numbers.

I may do something similar to this as a future project. We shall see.

31 comments:

  1. This game is pretty fun, very challenging.

    ReplyDelete
  2. Kinda reminds me of that bike game :)

    ReplyDelete
  3. I tried it but whenever my cars made a bunch of good shapes they all of a sudden go back to derp mode. What am I doing wrong?

    ReplyDelete
  4. It's not really a game. It's more a simulation. You sit and watch it evolve. I just liked the concept of the game.
    If you set the mutation really high then they just tend to go full retard. Which kinda makes sense. Wait until you have something that could be right then turn it down really low and natural selection should take over.

    ReplyDelete
  5. Looks interesting. Will follow.

    ReplyDelete
  6. This comment has been removed by a blog administrator.

    ReplyDelete
  7. This game is so weird. I don't understand the mutation rate and there's almost no control to it. I don't see how it's so interesting.

    ReplyDelete
  8. If you can do that, you should also run for president lol

    ReplyDelete
  9. This comment has been removed by a blog administrator.

    ReplyDelete
  10. Pretty cool, kindareminds me of linerider and trials.

    ReplyDelete
  11. Better version of this thingy here http://www.boxcar2d.com/index.html

    Some more options and explanation of what's going on

    ReplyDelete
  12. simulations make me happy. i thought it was like a game...

    ReplyDelete
  13. I've been playing this game almost everyday since I found out about it.

    So addicting.................

    ReplyDelete
  14. Pretty cool, and they come out looking like animals after a few generations.

    ReplyDelete
  15. pretty awesome man. nice blog. followed. hit me back

    ReplyDelete
  16. I love this program too. Also, I like the layout of this blog of yours.

    I guess you can't call it a "game" as you don't really get to play along. I've been running it for over a day, it's on generation 28, and my longest travel is still around 225.

    pretty weak.

    ReplyDelete
  17. wow lovely blog. very time consuming though =)

    ReplyDelete
  18. I have seen this everywhere and have yet to try it
    I guess i am going to have to now
    following now also

    ReplyDelete
  19. This is kinda cool. I took a couple of classes in ai and game design. We didn't get too much into genetic algorithms. It was mostly combinatorial search and the like. I wonder how difficult it would be to code something like this.

    ReplyDelete
  20. This comment has been removed by a blog administrator.

    ReplyDelete
  21. ive played a game similar to this never could figure it out

    ReplyDelete
  22. I remember such a game, but it was loong ago, back in the times of the C64 ... never had/played it, though, maybe it was just for Amiga ...

    ReplyDelete
  23. LOL i've been playing this the past week, up to over 500 generations. It's interesting. Though boring, not much interaction.

    Following.

    ReplyDelete
  24. <3 this game,
    im learning about this kind of stuff at uni atm (robotics degree) and its really awesome :P

    ReplyDelete
  25. This comment has been removed by a blog administrator.

    ReplyDelete
  26. I fuking LOVE DERP car, ths is one of the best online games ever


    nice blog! walk the sourdin!
    - monitoring

    ReplyDelete