Cytosine by Frozen Fractal
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.
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.
Ratings
| Coolness | 80% | 2 |
| Overall | 3.83 | 31 |
| Audio | 3.48 | 63 |
| Fun | 3.83 | 21 |
| Graphics | 3.61 | 135 |
| Humor | 2.66 | 193 |
| Innovation | 3.39 | 151 |
| Mood | 3.41 | 82 |
| Theme | 3.86 | 58 |
It's very clever. Well done.
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
A really well thought out concept with some great mechanics, I appreciate you uploading a how it works.
Great game.
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: http://www.inf.ufrgs.br/~rcpinto/rlgame/ . It seems to learn something, but then it starts to forget (it seems to learn to dodge and forget to attack).
@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...
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
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.
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.
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 :]
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...
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...