Genetic Cars 2: About

PubNub Real-time Network

Genetic Cars 2: GitHub Open Source Code - JavaScript

Genetic Cars 2: Options/Controls

Genetic Cars 2: HTML5 Canvas Graphs

Genetic Cars 2: But what about JavaScript?

Genetic Cars 2: Distributed Genome Connectivity

Genetic Cars 2: JavaScript Random Genetic Generation

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 fromin the world is added toeach 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 ) Do you like this freebie? Want to get more stuff like this?Subscribe to @PubNub news and updates to stay tuned on great designs. https://github.com/pubnub/genetic-car-2 - Click Here to Download/Fork the GitHub JavaScript Code directly.The same seed always creates the same track, so you can agree on a seed with your friends and compete. :)The chance that each gene in each individual will mutate to a random value when a new generation is born.Top score in each generation.Average of the top 10 cars in each generation.Average of the entire generation.This program uses a simple genetic algorithm to evolve random two-wheeled shapes into cars over generations. Loosely based on BoxCar2D , but written from scratch, only using the same physics engine ( box2d ).seedrandom.js written by David Bau . (thanks!)The genome consists of:- Shape: (8 genes, 1 per vertex)- Wheel size: (2 genes, 1 per wheel)- Wheel position: (2 genes, 1 per wheel)- Wheel density: (2 genes, 1 per wheel) darker wheels mean denser wheelsThis is not as deterministic as it should be, so your best car may not perform as well as it once did. The terrain gets more complex with distance.I'm not in the mood to deal with checking if all scripts have loaded before running, so refresh the page if things seem whack.Written originally by