项目作者: luis705

项目描述 :
Flappy bird clone and NEAT AI algorithm
高级语言: Python
项目地址: git://github.com/luis705/flappy-bird.git
创建时间: 2020-07-02T17:39:43Z
项目社区:https://github.com/luis705/flappy-bird

开源协议:MIT License

下载


Flappy Bird



A flappy bird clone made both for playing and for training a NEAT neural network




Made by Luis Otávio


Last Commit

License


Table of Contents


🚀 Getting Started

Prerequisites

Clone


  • Clone this repo using in the terminal:
  1. git clone git@github.com:luis705/flappy-bird.git

Install python


  • Windows

    Go to python.org, download the installer and run it.



  • Linux

    Type on terminal:



  1. sudo apt-get install python3

Install required packages

Open the terminal and run

  1. pip install pygame neat-python

Using

To play the game just open the terminal inside the game folder and run main.py with

  1. python3 main.py

To see the training of the neural network run the ai.py filey

  1. pythohn3 ai.py

📋 Features

  • [X] Flappy bird game
  • [X] Neural netowrk using NEAT

Built with


  • Core


    Python - a easy to learn, but powerfull programming language



  • Graphics


    Pygame -
    a set of Python modules designed for writing video games. Pygame adds functionality on top of the excellent SDL library.



  • Neural Network


    Neat-pythohn -
    a pure Python implementation of NEAT, with no dependencies other than the Python standard library.




🎮 Controls

Playing


  • Spacebar: jump

  • R: restart after death

Neural network


  • After 100 generations their data will be saved on scores.json


📝 License

License

This project is licensed under the MIT license - see the LICENSE file for details