August 24th-27th 2012 :: Theme: Evolution

Back to Browse Entries


by Frozen Fractal - 48 Hour Compo Entry

The space invaders are back, and this time, they're evolving!

A browser game in JavaScript using WebGL and HTML5 audio. Requires a recent Firefox, Chrome or Safari version.

Click the "How it works" link if you're curious what's happening behind the scenes.

Downloads and Links




Aug 27, 2012 @ 3:19am

This is neat, but it was kind of hard to see how it fit with the theme until I read your postmortem.

It's very clever. Well done.

csanyk says ...
Aug 27, 2012 @ 3:29am

Some HTML5 audio glitches and performance can have "mood swings" but this is a pretty neat game.

DavidErosa says ...
Aug 27, 2012 @ 3:32am

Wow, liked it, but it's a bit laggy sometimes. Thanks!

MrPhil says ...
Aug 27, 2012 @ 3:39am

Seemed like after a few generations it settles into a rut, but that might be just my playing style. Cool idea and fits the theme perfectly.

Jeremy1080 says ...
Aug 27, 2012 @ 6:11am

Wow! It was great, fun, and awesome! Loved the enemies!

Wan says ...
Aug 27, 2012 @ 8:16am

This is a clever & nerdy take on "Evolution", I like this. Not only that, but the game is actually good looking and very pleasant to play, maybe the best entry I've played so far!

Aug 27, 2012 @ 3:54pm

Wow really fun!

MortalWombat says ...
Aug 27, 2012 @ 4:30pm

This is really, really nicely designed... at some point it felt like the enemies really consciously tried to piss me off (in a good way ;)). I like the music and sounds, I like the clean visuals and great particle effects, it's a very well rounded game!
I personally think you could have played even more to your strengths and highlighted the evolutionary part of the gameplay more.

Also: This is addicting... I desperately need a highscore to show off! :D

Aug 27, 2012 @ 5:30pm

MortalWombat: You *could* post a link to the alien species you've produced; all is contained in the URL!

DustyStylus says ...
Aug 27, 2012 @ 8:06pm

Hehe, you can't go wrong with Space Invaders can you. :D Pleasant to look at, the music is cool and the sounds are perfect. I sense a wave of good scores incoming.

ratboy2713 says ...
Aug 27, 2012 @ 8:55pm

Very clever and fun, but after every generation my screen would just go blank. I could hear the sound effects and eventually "You Lose" came up, but I couldn't see anything. I'm playing on Chrome. I was able to play by just using the URL to reload the page, but it was a bit annoying.

mortehu says ...
Aug 27, 2012 @ 9:45pm

This was fun, and I played it until I found an unbeatable strategy, involving shooting the buildings I was supposed to defend.

Vordux says ...
Aug 27, 2012 @ 9:46pm

That was a really solid experience, great use of the implemented web technologies.

A really well thought out concept with some great mechanics, I appreciate you uploading a how it works.

Great game.

renatopp says ...
Aug 27, 2012 @ 9:52pm

Awesome! Simple and beautiful! These damn aliens! Hiding behind the bases! I had to destroy some bases to kill them all. It's a nice job!

Kurama_Youko says ...
Aug 27, 2012 @ 10:00pm

I came here by your request in the comments of my game... maybe 1h ago, I don't know, I think I just played some 30 levels of your game uhehueuh (translation: it was really fun).
Indeed, our ideas are similar, but I think yours deserved more the title "Space Evolvers" than mine, since my game turned out to have a very different style in the end hehe.
Now, to the nerdy stuff: my genetic algorithm implementation was simpler in the sense that I've used only mutations. I was too lazy to implement crossover, although in retrospect it seems it would have been pretty easy. But as a practical excuse, my population is much smaller (max 5, for performance reasons and to reduce difficulty) and lives too much less, so most of time there even aren't 2 aliens to mate (weak excuse, but I just needed to satisfy my psychological well-being). My cromossomes are a bit larger than yours, albeit more low-level: there are 20 genes corresponding to weights of a single layer neural network (adaline), more or less within the -1..1 range. This NN links 9 sensors + 1 bias (value always 1) to 2 motors. The 10 sensors give player's relative position, asteroid relative position, alien absolute position, alien velocity and sine() of alien age (all normalized to the -1..1 range). I don't have sensors for shots (but I had), because it's highly correlated with player x position and I needed to reduce my sensors size (for performance reasons and to reduce the search space). I used to have alien relative position and velocity sensors too, but they also got pruned. The 2 motors are x,y accelerations (-1..1). There is a chance of adding an alien to the screen at every time step whenever there are fewer than 5 aliens on screen. When adding a new alien, there is a 90% chance that it copies the chromossome of the oldest alien which is closer to the player (a linear combination of both features), plus 10% mutation (noise in the weights). In this case, the new alien's image is the same as his parent's. With 10% chance (migration rate) or when there are no aliens on the screen, the new alien is random.
I think it is possible to spot some differences between our results due to the differences in implementation: your population seems to keep evolving and to converge after some generations, giving better and better behaviors, unless the player starts to change its playing style. Mine is more "seasonal": it's easy to annihilate some species and then a new one starts from scratch. Also, more theoretically speaking (I couldn't verify this with certainty), my aliens take more time to evolve some useful behavior, first because of the small population, and second because of my low-level behavior representation.
Ah, maybe you would be interested in an experiment I made some years ago, also inspired by Space Invaders and machine learning, but this one uses Reinforcement Learning and RBF Neural Networks: . It seems to learn something, but then it starts to forget (it seems to learn to dodge and forget to attack).

Aug 27, 2012 @ 10:01pm

@ratboy2713: Weird. I've had all aliens disappear on occasion (NaNs creeping in, probably) but the entire screen blanking is new to me. Sorry about that. Maybe some graphics driver issue?

@mortehu, @renatopp: Yeah, the bases work two ways. But try to survive the first 10 seconds if you don't have bases to hide behind...

Orni says ...
Aug 28, 2012 @ 7:59am

Best use of the theme of all games I've seen - since actual evolution is going on!
random mutation as well as natural selection (by the player)

wow, such a simple, yet brilliant idea to combine this concept with the classic space invaders gameplay

hypp says ...
Aug 28, 2012 @ 4:33pm

This game was fun! A great variation on an old theme. And I love the explosions!

Aug 28, 2012 @ 7:30pm

@Kurama_Youko: Glad you liked my game, and thank you for the detailed writeup!

It looks like your approach is more general, but also more low-level, because you didn't code explicitly for particular behaviours like dodging. In my game, dodging (and most other parameters) is done with exponential falloff, like F = a * e^(-(b + 1) * d), where F is the resulting repelling force, d is the distance to the bullet, and a and b come from the DNA (range -1..1).

Indeed my evolution has a tendency to converge, and I don't think it depends on player style very much. For what it's worth, for me they always end up narrow-faced and pale green, with evil-looking slanted eyes.

It would have been cool to change the rules a bit so that we would get different "species" with different strategies, but I don't know enough about genetics to see how to do that. It would also be nice to change the conditions from time to time, e.g. by giving the player different weapons, to force the aliens to keep evolving and adapting.

nseward says ...
Aug 28, 2012 @ 8:24pm

I thought the game was amazing and then I discovered that you could share you evolved invaders with others. That puts it over the edge. Great Amazing Fantastical Work!!!!

gnx says ...
Aug 28, 2012 @ 9:31pm

Very nice! The concept is very cool and everything looks and sounds proper.

The only criticism I have is that the gameplay isn't as sharp as it could be, since at the start there is mass of bullets coming at you, but you can also shoot the bullets it is kind of easy/random.

ggiraldez says ...
Aug 29, 2012 @ 12:33am

One of my favorites so far. Excellent!

BenW says ...
Aug 29, 2012 @ 4:46am

After a while they would all just run to the sides. It would be interesting if the ones that managed to destroy a ship had more offspring rather than the ones than that ran away.

Raptor85 says ...
Aug 29, 2012 @ 7:37am

honestly i couldn't tell any difference between the waves, there just wasn't enough difference in them to be able to tell anything is changing. The yellow barriers really got in the way too, in the classic game you could burrow holes in them and shoot through but since they're a single piece here and the enmies dont fire that much/controls are fluid they really just get in the way and block mostly YOUR shots.

tcstyle says ...
Aug 29, 2012 @ 8:49pm

Great take on a classic with a very good implementation of the theme. I really liked the graphical retro-like vector style. Good job.

polegar says ...
Aug 30, 2012 @ 4:18pm

Really well done, good feeling while playing !

Maxium says ...
Aug 30, 2012 @ 11:28pm

Nice, I liked the progression with the generations.

Andrei Barsan says ...
Aug 31, 2012 @ 3:04pm

I think stuff like abilities and new enemy weapons/ sizes could really show off the evolution better, but I liked the way the enemies "learned" things nevertheless!

pansapiens says ...
Sep 1, 2012 @ 9:44am

Awesome use of the theme - after a bunch of rounds the swarm got evil-hard for me, which I guess is my own fault for picking off the easy to hit ones and not letting them breed :)

juaxix says ...
Sep 3, 2012 @ 7:07pm

I would like to see the evidences of new evolution features in each new generation, like, something solid you can count...
I love the fireworks made out of particles and particles, loev particles!!, and think you may want to change the AI for the enemies so they dont stop at the limits of the screen :]

fruitfly says ...
Sep 4, 2012 @ 8:14pm

the old game concepts are the best. you cannot do anything wrong with space invaders for me. loved it. plays nice: nice controls, nice alien movements.
but could not find so much that the aliens are actually evolving; seemed more that they got easier; but that might also have been just the perceived impression as you get better over time...

Puzzlem00n says ...
Sep 5, 2012 @ 11:24pm

Very nice. You want to know what would make this REALLY fun? If you sort of overhauled it a bit to make the main part of the game forcing the player to only allow worse traits to breed by corralling the enemies. It wouldn't be easy to apply to this game directly, but it be cool.

wilbefast says ...
Sep 8, 2012 @ 12:14pm

5/5 everywhere for me :) fun, fits the theme perfectly, good sound, nice visual style... honestly I have nothing to add. I was going to ask what parameters influenced evolution but I found the link to your blog post.

What I found interesting is that my population quickly evolved a clustering behaviour: since only those agents that stay close together breed, this is to be expected. Fascinating seeing this principals in action! I'll be sharing this on when I'm back on my Linux partition...

pardue says ...
Sep 17, 2012 @ 1:46pm

Cool idea, well executed, overall fun experience!

You must sign in to comment.

[cache: storing page]