/ genetic algorithms

Introduction to Atlas

Atlas is a project of mine that combines artificial intelligence and evolution, by simulating a virtual world with organisms that move around, feed, learn, and evolve.

The inspiration was this Google Talk given by Virgil Griffith:

Virgil said that he believes some kind of strong AI can be achieved by combining evolution and artificial intelligence, but I'm more interested in the following for now:

  • development of species
  • division of work (inter species behaviors)
  • studying how complexity can emerge a from relatively simple system
  • adaptation

Polyworld probably got good results on all of those points, but I'd really like to recreate it on my own, and inject some ideas I believe would be beneficial for simulators like these, mainly multicellular organisms and a neural network of my own design. I'll will add some physics in there, but I was also interested in the technical part of the redesign.

Polyworld was created using Qt and OpenGL, all meant to be ran on the same computer, I presume. I approached this design problem with a different paradigm. I wanted to have one computer that could run the simulation (the server), and not have that computer bother about rendering. I decided to split the application into three parts: the server, the simulation part, and the client.


Communication (Node.js & socket.io)

The communication part of the server is responsible for two things: serve the HTML page in which the simulation is going to render, and communicate with the client about the simulation(s). Basically, a client ("a webpage") can subscribe to any of the multiple running simulations, and the server is responsible for pushing updates about the worlds/simulations to the clients.

Client (HTML5)

The client is essentially a web page with a canvas element, that uses the aforementioned Socket.io to either issue commands to the server or to receive world updates. Nothing exceptional, except it uses my Irenic engine to render the world.

Simulation (JavaScript)

This is the most important part of the project. I'm trying to decouple it from the server as much as I can, so I could maybe implement some parts in pure C, but for now it's still all JavaScript, which is fast enough, and its expressive power is just what I need for these sorts of tasks. The main class here is the "World", which houses all creepers, regular blocks, food, and updates the physics.