All Projects → tsreaper → ai-plays-flappybird

tsreaper / ai-plays-flappybird

Licence: MIT License
Using genetic algorithm and neural networks to teach AI to play flappy bird.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ai-plays-flappybird

NeuroEvolution-Flappy-Bird
A comparison between humans, neuroevolution and multilayer perceptrons playing Flapy Bird implemented in Python
Stars: ✭ 17 (-70.69%)
Mutual labels:  genetic-algorithm, flappy-bird
Machine Learning Flappy Bird
Machine Learning for Flappy Bird using Neural Network and Genetic Algorithm
Stars: ✭ 1,683 (+2801.72%)
Mutual labels:  genetic-algorithm, flappy-bird
ga
Simple genetic algorithms in Go
Stars: ✭ 101 (+74.14%)
Mutual labels:  genetic-algorithm
pikaia
Modern Fortran Edition of the Pikaia Genetic Algorithm
Stars: ✭ 29 (-50%)
Mutual labels:  genetic-algorithm
Stock-Market-Prediction-using-Neural-Networks-and-Genetic-Algorithm
Matlab Module for Stock Market Prediction using Simple NN
Stars: ✭ 59 (+1.72%)
Mutual labels:  genetic-algorithm
reactive-trader
In the coming weeks this plans to become a Gekko plugin that reacts to market changes, finding and running only the most profitable strategies.
Stars: ✭ 91 (+56.9%)
Mutual labels:  genetic-algorithm
Flappy-Bird-Genetic-Algorithms
Use genetic algorithms to train flappy bird
Stars: ✭ 83 (+43.1%)
Mutual labels:  genetic-algorithm
flappy-bird-pygame
A clone of Flappy Bird, using Pygame.
Stars: ✭ 99 (+70.69%)
Mutual labels:  flappy-bird
GA-Toolbox
Genetic Algorithms Toolbox
Stars: ✭ 41 (-29.31%)
Mutual labels:  genetic-algorithm
GA
An R package for optimization using genetic algorithms
Stars: ✭ 76 (+31.03%)
Mutual labels:  genetic-algorithm
GeneticAlgorithmUniversityClassScheduler
A class scheduler using adaptive-elitist genetic algorithm.
Stars: ✭ 98 (+68.97%)
Mutual labels:  genetic-algorithm
geneal
A genetic algorithm implementation in python
Stars: ✭ 47 (-18.97%)
Mutual labels:  genetic-algorithm
modest-py
FMI-compliant Model Estimation in Python
Stars: ✭ 40 (-31.03%)
Mutual labels:  genetic-algorithm
DeepHyperNEAT
A public python implementation of the DeepHyperNEAT system for evolving neural networks. Developed by Felix Sosa and Kenneth Stanley. See paper here: https://eplex.cs.ucf.edu/papers/sosa_ugrad_report18.pdf
Stars: ✭ 42 (-27.59%)
Mutual labels:  genetic-algorithm
TorchGA
Train PyTorch Models using the Genetic Algorithm with PyGAD
Stars: ✭ 47 (-18.97%)
Mutual labels:  genetic-algorithm
tsp-genetic-python
A genetic algorithm to solve the Travelling Salesman Problem, implemented in Python. Made by Jack Frigaard, modified by Mauricio Aizaga
Stars: ✭ 73 (+25.86%)
Mutual labels:  genetic-algorithm
trsh
Project about minimizing costs in garbage collection in Montevideo, Uruguay, using Evolutionary Algorithms
Stars: ✭ 17 (-70.69%)
Mutual labels:  genetic-algorithm
zoofs
zoofs is a python library for performing feature selection using a variety of nature-inspired wrapper algorithms. The algorithms range from swarm-intelligence to physics-based to Evolutionary. It's easy to use , flexible and powerful tool to reduce your feature size.
Stars: ✭ 142 (+144.83%)
Mutual labels:  genetic-algorithm
goga
Go evolutionary algorithm is a computer library for developing evolutionary and genetic algorithms to solve optimisation problems with (or not) many constraints and many objectives. Also, a goal is to handle mixed-type representations (reals and integers).
Stars: ✭ 39 (-32.76%)
Mutual labels:  genetic-algorithm
genetic-algorithms
This repository belongs to the youtube videos "What are Genetic Algorithms" (https://youtu.be/uQj5UNhCPuo) and "Genetic Algorithm from Scratch in Python" (https://youtu.be/nhT56blfRpE). If you haven't seen it, please consider watching part one of this series, to get a better understanding of this code.
Stars: ✭ 79 (+36.21%)
Mutual labels:  genetic-algorithm

AI-Plays-FlappyBird

Using genetic algorithm and neural networks to teach AI to play flappy bird. Inspired by this project and this paper. The dashboard in the html page is inspired by this website.

You can try this project in this page.

The TypeScript version is committed mainly by @javatlacati. Check it out.

Goals

  • Make a flappy bird game
  • Construct neural networks
  • Construct genetic algorithms
  • Teach the networks to play flappy bird
  • Make the animation more fancy :)
  • Make a little controller in the html page
  • Finish the "compete with AI" function Too complicated and will make my code messy (though it is already a mess now). I give up...

Results and Notes

2018/03/29

It seems that there are more cons than pros for the birds to foresee the next two pipes instead of one, so I add an option on the dashboard to let the user enable or disable this feature (disabled by default).

2018/03/28

I didn't expect this repo to have so many stars (at least from my perspective) when I first wrote this litte project. I reviewed this project today and made some changes.

  • A few more activation functions are added and can be selected from the dashboard (inspired by the TypeScript version committed by @javatlacati).

  • The height of the next-next-coming pipe is also fed to the neural network. This will make the evolution a little harder, but it provides a better result when the map is scrolling faster. Check the pros and cons of this feature in this discussion.

2016/06/20

Rewrite the whole project in a syntax which is easier(?) to read and add the "enable animation" function.

2016/06/19

This problem is indeed too easy for neural networks to solve. We just need to use this strategy: If the y-coordinate of the bird is larger than the next pipe, then fly. Otherwise just do nothing. This strategy can make the bird fly almost forever (I once reduce MOVE_SPEED to 2 and the bird is still flying after passing 10,000 pipes).

Anyhow, this is my first neural network program. Although the problem is very easy, it's still very interesting :) I'll try more games afterwards.

2016/06/18

I discovered that there were some bugs in my previous code. After solving them the birds seems to evolve well :) They can now fly through hundreds of pipes within 100 generations.

Actually, their neural network is not very complicated, even for the best individual. There are only about 1 or 2 nodes in the hidden layer of the network, so I think this problem might be too easy for a neural network to solve. I'll try some more interesting games later.

2016/06/17

I've created the basic parts of this project and it can be tested now. But my birds are not evolving well :( Generation after generation, they just can't fly through the pipe. Maybe the "NEAT" method doesn't work very well on this problem. I'll consider this problem later.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].