Autonomous Flappy Bird is an educational lab built with Phaser 4 and TypeScript. 

It uses a Flappy Bird-like game to demonstrate how artificial intelligence can learn to control a bird autonomously.

The neural network and genetic algorithm are implemented manually, without any Machine Learning library. 

The goal is to make the learning process visible and understandable, not simply to provide another score-based game.

autonomous flappy bird

Human Mode

Control the bird directly and try to pass through as many obstacles as possible.

- Tap the game area, click, or press Space to flap.

- This mode lets you experience the physics, collisions, and difficulty of the game.

- Your best human score is stored separately in the browser.


Evolution Mode

Watch a population of neural networks learn through a genetic algorithm.

- Multiple birds play simultaneously using the same physics.

- Each bird owns a separate neural network.

- Birds are evaluated according to survival time and the number of obstacles passed.

- The best networks are selected, reproduced, and mutated to create the next generation.

- An evolution run ends after a maximum of 25 obstacles to guarantee evaluation and champion preservation.

- The simulation speed can be increased to accelerate training.

The dashboard displays the current generation, remaining birds, score, fitness values, mutation rate, and training progress.


Demo Mode

Watch a single bird play autonomously using the best available neural network.

The game first uses the champion from the current evolution session, then a saved or imported champion. If no champion is available, the demo uses a random network, so its performance does not represent successful training.

Saving Champions

The best network can be saved in the browser, downloaded as a JSON file, and imported later. This makes it possible to preserve a champion, share it, or compare different training sessions.

Published 5 days ago
StatusPrototype
PlatformsHTML5
Authortlt
GenrePlatformer
AI DisclosureAI Assisted, Graphics

Leave a comment

Log in with itch.io to leave a comment.