Giter Site home page Giter Site logo

citiususc / citius-invaders Goto Github PK

View Code? Open in Web Editor NEW
24.0 4.0 8.0 5.2 MB

An old-style HTML5 arcade game for teaching genetic algorithms to kids, made with PhaserJS

Home Page: https://citiususc.github.io/citius-invaders/

License: MIT License

JavaScript 99.40% HTML 0.03% Python 0.56%
genetic-algorithm evolutionary-algorithms space-invaders phaser-game phaserjs

citius-invaders's Introduction

CiTIUS Invaders

An old-style arcade game to learn evolutionary algorithms and genetic algorithms.

Play the web version!

About

This game was created to explain the basic concepts of evolution and genetic programming to college students. The game starts with 4 invaders that mate themselves. Each invader has different genes that codify their behavior, such as speed, probability of changing direction, size, color... During evolution time, the invaders start mating in order to create new invaders that inherit the attributes of their parents. Best invaders (invaders with higher fitness) have more probability to be selected for mating. The fitness of an invader corresponds with the number of evolutions that it has survived. This mechanism allows the invaders to improve their behavior against the player over time by learning the best set of features that allows them to survive.

If you want to learn how the game is implemented, Siraj Raval made a great analysis of the game, which is available on Youtube:

IMAGE ALT TEXT HERE

How to play

Controls are very easy. Just use left/right arrow to move your robot and space to shot. The goal is to keep the number of invaders below 100, otherwise the game is over. There are always at least 4 invaders (elitism), which are protected with blue shields. The player earns 1 point for each evolution time.

Code

There are two versions of the game, a python version built on top of the SGE Game Engine and a HTML5 version made with Phaser. You can play the HTML5 version here: https://citiususc.github.io/citius-invaders

Authors

This game was made by Tomás Teijeiro and Pablo Rodríguez Mier because why not?

The music was composed by the amazing Constantino Antonio García Fernández, who, despite being involved in thousands of projects and activities, still finds time to help his friends with these stupid things.

Screenshots

Main menu

Main menu

Game screen

Game screen

License

This project is licensed under the terms of the MIT license.

citius-invaders's People

Contributors

pablormier avatar tomas-teijeiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.