GitHub - victorqribeiro/invaderz: Space invaders, but the invaders evolve with g...
source link: https://github.com/victorqribeiro/invaderz
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
InvaderZ
A game kinda like space invaders, but the invaders evolve with genetic algorithm.
If you want to see a live version of it, it's hosted here.
You can also add it as an app to your phone (menu / add to home screen), if you wish so.
How to Play
Left and Right arrow keys move the cannon, space bar shoots; or, if you are on your phone, just use the buttons
About
You are the last hope of the human kind as the defense against the InvaderZ. They are deployed by their mothership with the sole purpose of entering earth's atmosphere. Although they are not a danger for you as an individual, if 5 of them gets through, everything is doomed. You can only shoot one projectile at the time, so be mindful, as you are not getting another shot until the last fired projectile disperse into the space or hits a target. Each InvaderZ has a shape that influence how they move. When a InvaderZ dies, they upload their progress to the mothership, so it can generate more InvaderZ like the ones who did well before. After each 7 generations of InvaderZ, the mothership generates a complete new wave of InvaderZ keeping only the very best of the last past 7 generations.
Genetic Algorithm
A random population of InvaderZ are generated at the beginning of the game.
The fit score of the InvaderZ is how far it made through the earth's atmosphere.
The way they move are directly related to their body shape.
After they die, a new wave of InvaderZ are created by crossing over the InvaderZ with the higher fit score.
The cross over could happen of 6 different forms:
- First horizontal half of the first parent with the second horizontal half of the second parent.
- First horizontal half of the second parent with the second horizontal half of the first parent.
- First vertical half of the first parent with the second vertical half of the second parent.
- First vertical half of the second parent with the second vertical half of the first parent.
- Odd genes from the first parent, even genes from the second parent.
- Even genes from the first parent, odd genes from the second parent.
There's a 10% chance of mutation after each cross over, altering their body shape and so the way they move.
To keep things interesting, after 7 generations, a new wave is created from scratch and only the best of the 7 past generations is keep.
Recommend
-
76
The earliest memory I had of arcade video games was watching my older brother and cousins going at the video game machines at Genting Highlands. While our parents were at the other types of games Genting Highlands was more popularly known for, w...
-
101
invaders - Space Invaders in Go
-
52
In this series of posts, I am going to create a clone of the classic arcade game, space invaders , in C++ using only a few dependencies. In this last post of the...
-
39
Ph...
-
18
si78c is a memory accurate reimplementation of the 1978 arcade game Space Invaders in C. It requires the original arcade ROM to function to load various sprites a...
-
13
Mikael Agren patched the original ROMs to add a high-score table . Check out his project blog and demo movie.
-
4
Train Invaders Jupyter Notebook + Space Invaders!? Why? • Getting s...
-
3
SERIES ON NEW SPACE, EPISODE 4Big Tech, The New Space InvadersInternet giants are quietly entering the New Space sector, bringing their weight and brutal methods. Expect casual...
-
3
Space Invaders Chaos. This is basically Space Invaders on Steroids. Use the Arrow Keys to move, and spacebar to shoot the alien spaceships. Comment your score once you finish! (This is a very small game, so p...
-
5
space-invaders Space Invaders is a classic arcade game where the player controls a spaceship and shoots down enemy aliens. This simple game is developed using the p5.js library and is open source.
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK