-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
erilyth
committed
Dec 9, 2016
1 parent
a2dd3a9
commit 02c2b3b
Showing
5 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,31 @@ | ||
# Flappy Bird Genetic Algorithm | ||
# Flappy Bird Genetic Algorithm | ||
Train a neural network using genetic evolution to play flappy bird! | ||
|
||
## Final Results | ||
 | ||
|
||
## Algorithm Details | ||
* Starts out with a pool of 50 models | ||
* Each iteration based on fitness scores of the models, perform crossover | ||
* Crossover would swap the first layers (input -> hidden) for both the selected parents | ||
* Random mutation ensures that the models are changed at every iteration | ||
|
||
## Progress Screenshots | ||
#### Stage 1 | ||
Initially all the models would do the "same" wrong thing. So they would all die out quickly. | ||
 | ||
|
||
#### Stage 2 | ||
After some time however, they would start to show more variation, but still perform the wrong moves. This gives us a spread of flappy birds throughout the screen (lengthwise). | ||
 | ||
|
||
#### Stage 3 | ||
After a bit of training (~1hr) the spread decreases and is more concentrated at the height where there is a hole in the pipes. They start performing a lot better since they now understand when to flap and when not to. | ||
 | ||
|
||
#### Stage 4 | ||
Considering the model with the maximum fitness, we can consider it as a trained model and it would perform much better than the average human. | ||
 | ||
|
||
### Disclaimer | ||
* Based on Flappy Bird clone in pygame, https://github.com/sourabhv/FlapPyBird |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.