Settings

Theme

Multiplayer Genetic Cars

gencar.co

114 points by gwil 13 years ago · 67 comments

Reader

alan_cx 13 years ago

Probably missing something ...

Which is my car? Is it competing? If so, against who? How can I tell? I have no idea what Im looking at, which is my car, who Im competing against, who is doing well.

Is there some sort of dummies guide for the likes of me???? :)

Despite all that, Im mesmerized!!!

Edit: I see down votes? How is it wrong to not understand something and ask for some help. Why is that a down vote?

artjumble 13 years ago

So did you ask Rafael Matsunaga if you could copy and release his code as open source?

jsnell 13 years ago

I don't think this idea works. All players will very soon have the same top car (or the descendant of the same top car), and get a copy of that car from all other players. This creates a massively inbred mono-population.

Not sure what the appropriate fix would be. Import the top car from one random player in each generation?

  • Cthulhu_ 13 years ago

    And yet, isn't having the strongest species the goal of an evolutionary algorithm? Having multiple players do multiple runs (parallelization) and ending up with the same / a similar species sounds like a goal to me.

    Perhaps you'd like to see more varied species get comparable end-results, but I think you'll need a more varied obstacle course / 'goals' in that case.

  • eterm 13 years ago

    Given the cars are seeded (e.g. f0660f), simply importing the top n different seeds in the world pool would be enough. Right now the system is treating everyone's copies of f0660f as if they are different cars, but they are not.

    • pubnub 13 years ago

      f0660f is the top winner for World-2 right now. You will want to switch worlds! Also the cars are all slightly different if you look closely.

      • jsnell 13 years ago

        They're slightly different, but that's irrelevant. When you breed the two almost identical cars, you'll get almost identical offspring. Diversity is essential for crossover. And crossover is essential for genetic algorithms. Just mutation isn't enough.

        And right now the setup appears to be such that you'll end up destroying all diversity from the gene pool as soon as you have more than a few users.

        • eterm 13 years ago

          It's worse than that, if you're on a world on your own your top 10 cars becomes copies of your best car. You destroy diversity even quicker with fewer players!

          At least with lots of players, as pubnub said, some of those identically named cars were actually different generations and different cars, but were cousins or otherwise related from a common ancester.

          One recommendation would be to incorporate any mutations into the ID, so if it started f0660f and mutated it would be f0660f0b or something, to track parentage (And in fact it would be cool if crossovers were tracked in the ID too, a bit like the Russian patronym or spanish matronym)

          • pubnub 13 years ago

            Updates have been made and now we are at 2.52 for improved Champion Generation.

            • GhotiFish 13 years ago

              What did you do? Now most champions don't actually work. They get stuck at the start.

        • RossM 13 years ago

          The last time I looked at genetics, I remember a method that selected the top n genes and added a number of completely random (no crossover) genes to fill the population of the next generation. Would it be enough to add a number of completely random seeds each run?

        • pubnub 13 years ago

          We are working on updates! Will have details soon.

  • pubnub 13 years ago

    We are working on adjusting the algorithm.

ynniv 13 years ago

The biggest problem here is a lack of server-side validation. The "remote champion" is determined by the score claimed by a client, so set a breakpoint in the function that posts the score and you can claim that any car parameters achieved any score... You see where this is going.

A proper implementation would run the simulation server-side to verify that a configuration achieves a high score. Almost as good would be to rank configurations based on the average runs across clients. This still lets a client submit an absurd configuration, but won't let an inferior configuration continue to be "champion".

eterm 13 years ago

One problem is that everyone shares their best, which becomes someone else's best, which then gets shared. Very quickly all my cars are all the same car ID.

It needs a way to prevent 2 identical copies racing each other.

jstanley 13 years ago

Is this based at all on the HTML5 genetic cars project submitted the other day?

mistercow 13 years ago

This is a neat idea, although currently I can't really figure out what the deal is. It seems that I'll have a really effective car, and then the next round, I'll end up with a completely new set of cars, none of which resemble the previous winner, and all of which are less effective.

Anyway, would would be really cool to see would be something like Picbreeder, but for cars, where you can manually choose which cars to breed, then let them evolve on different courses, etc. Having some extra control over the situation would make for something extremely addictive.

pubnub 13 years ago

We've pushed a few updates but are still working on making improvements! Soon a Chat feature will be added too....

Glyptodon 13 years ago

It seems a bit opaque/confusing. Pretty soon everyone seems to be based on the same root 'genome' and you can't even tell which cars are 'yours' so to speak. Likewise, you can't wall off your own gene pool so that it doesn't get cross-contaminated.

  • pubnub 13 years ago

    We added the "Your Car" label which is mutated based on the current Champion of the World. We are working on improving the manipulation capabilities for Intelligent Design.

webjprgm 13 years ago

I've been watching "PubNub-World-4" for a while (28 generations, animation is still on). It has a nasty hill to climb that stops all cars at about 160 meters. I saw one almost make it over. So now I don't want to refresh and lose the chance that one might eventually evolve to make it.

Most of the cars seem to be quite similar, though. Also, the one that almost made it over doesn't seem to be marked as the leader so there's no net improvement in the cars. I saw one more, in about Gen 30, almost make it over too (it jumps up and sits on the ledge a while before falling back, as opposed to not getting past the ledge or jumping straight up in the air and falling back down).

Very mesmerizing thing.

  • pubnub 13 years ago

    After some improvements on the multiplayer aspects we are starting to see better generations being created and breading between champions.

qwerty_asdf 13 years ago

Let's all coordinate on the "HackerNews" world.

Join World: HackerNews

Ra1d3n 13 years ago

Im hitting performance problems after about 5 minutes. I get massive lags. Running on latest Chrome i5 3.4GHz x 4 and 8GB RAM.

Edit: Just press "New Population" a few times and watch your browser slow down. There is a memory leak somewhere.

emehrkay 13 years ago

Hmm, things started off interesting with the best car i've seen thus far (short, wheels covered the top and bottom, etc) then this

http://imgur.com/a/XFCYZ

  • extrapolate 13 years ago

    The track/car generation is done through JS, so some modifications aren't anything Chrome Dev Tools can't handle. Add to that the fact that the "best" car is populated into the gene pools of all the other users and that's the outcome.

hyramgraff 13 years ago

I've found the the string "HN" generates a nice but challenging world.

pubnub 13 years ago

Adding the chat shortly and we will change the world number again.

FORK us - https://github.com/pubnub/genetic-car-2

ndr 13 years ago

Now put a js based bitcoin miner on the background and you're done.

MWil 13 years ago

The go button is not working for me (firefox 22)

  • pubnub 13 years ago

    FireFox 21 is working as expected can you provide more details?

  • pubnub 13 years ago

    Thank you for the detail we are fixing this ASAP.

    • MWil 13 years ago

      All buttons seem to work well when it first loads but then over time (generations) they seem to require a reload to work again.

pubnub 13 years ago

We just pushed a new update go check it out. Upgraded Chat. Soon to come is a Intelligent Design (God Mode).

pubnub 13 years ago

We are working on improvements to the Genetic Algorithm! Updates Shortly.

deletes 13 years ago

Is the world based on the same map(terrain) or the same pool of cars?

  • pubnub 13 years ago

    Same pool of champion cars that work best across a similar terrain.

    • deletes 13 years ago

      Identical terrain for the example `PubNub-World-2`?

      EDIT: Looks identical to me.

      >>Join World: The same seed always creates the same track, so you can agree on a seed with your friends and compete. :)<<

snake_plissken 13 years ago

Ummm can someone explain to me what exactly is going on here?

  • pubnub 13 years ago

    This game is connected to the world, all players are sharing their best cars each game round. Only the dominant cars win. The TOP car from each player in the world is added to your car list each game cycle. This car is therefore added to your gene pool and is then genetically spliced and paired with your other cars. Top cars are transmitted around the world from other players who are online RIGHT NOW using WebSockets style technology for data streaming ( PubNub ).

dta5003 13 years ago

Watch out for the XSS in the chat.

  • alan_cx 13 years ago

    Yeah. I've been sat here watching people trying it as they update the site to combat it.

    Still dont know what Im looking at though...

    • qwerty_asdf 13 years ago

      Hmmm... people are complaining about their browsers mysteriously crashing, interspersed with random strings of Russian conversation...

  • pubnub 13 years ago

    fixed!

pubnub 13 years ago

VERSION 2.35 UPDATED!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection