
Learn to build a Python game development program using artificial intelligence where a Flappy Bird agent navigates obstacles and completes the game through neural networks.
Discover how the neat AI algorithm evolves neural nets for Flappy Bird, building populations, evaluating fitness, and applying selection, mutation, and crossover.
Learn how genetic algorithms use selection, crossover, and mutation to iteratively explore a fitness landscape and optimize neural networks, including single point and multipoint crossover, and mutation concepts.
Explore how neural networks in Flappy Bird NEAT AI use input layers, weights, and bias with an activation function to map bird and obstacle distances to a jump decision.
Learn to configure a NEAT neural network for Flappy Bird by editing the feedforward config file, setting fitness criteria, maximums, and population size, and adjusting mutation and connection rates.
Install and configure the required modules in your terminal for the flappy bird neat ai project, including pygame, to enable a genetic algorithm implementation.
Set up a python project for flappy bird neat ai by creating an images folder, downloading background, sky, buildings, pipe assets, and using image flipping for top and bottom pipes.
Explore the Flappy Bird NEAT AI project by implementing the bird class with multiple body images, rotation velocity, gravity-based displacement, and jump mechanics to drive gameplay.
Explore how the class pipe handles the gap between top and bottom pipes in Flappy Bird NEAT AI, with random vertical positions, velocity-based movement, and collision checks.
Explore collision between the bird and obstacles with tight gaps in a Flappy Bird neat ai setup, using touches, overlaps, and a random generator to evaluate generations.
explore a neat-based flappy bird ai, detailing class base concepts, scrolling floors and pipes, rendering and rotating images, and evolving genomes with neural networks and fitness scoring.
Demonstrates a simple Flappy Bird NEAT AI project that runs the game, evolves a bird population with a neural network, fitness, and mutations across generations.
NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm (GA) for the generation of evolving artificial neural networks (a neuroevolution technique) developed by Ken Stanley in 2002 while at The University of Texas at Austin. It alters both the weighting parameters and structures of networks, attempting to find a balance between the fitness of evolved solutions and their diversity. It is based on applying three key techniques: tracking genes with history markers to allow crossover among topologies, applying speciation (the evolution of species) to preserve innovations, and developing topologies incrementally from simple initial structures ("complexifying").
Traditionally a neural network topology is chosen by a human experimenter, and effective connection weight values are learned through a training procedure. This yields a situation whereby a trial and error process may be necessary in order to determine an appropriate topology. NEAT is an example of a topology and weight evolving artificial neural network (TWEANN) which attempts to simultaneously learn weight values and an appropriate topology for a neural network.
In order to encode the network into a phenotype for the GA, NEAT uses a direct encoding scheme which means every connection and neuron is explicitly represented. This is in contrast to indirect encoding schemes which define rules that allow the network to be constructed without explicitly representing every connection and neuron allowing for more compact representation.
The NEAT approach begins with a perceptron-like feed-forward network of only input neurons and output neurons. As evolution progresses through discrete steps, the complexity of the network's topology may grow, either by inserting a new neuron into a connection path, or by creating a new connection between (formerly unconnected) neurons.
Competing conventions
The competing conventions problem arises when there is more than one way of representing information in a phenotype. For example, if a genome contains neurons A, B and C and is represented by [A B C], if this genome is crossed with an identical genome (in terms of functionality) but ordered [C B A] crossover will yield children that are missing information ([A B A] or [C B C]), in fact 1/3 of the information has been lost in this example. NEAT solves this problem by tracking the history of genes by the use of a global innovation number which increases as new genes are added. When adding a new gene the global innovation number is incremented and assigned to that gene. Thus the higher the number the more recently the gene was added. For a particular generation if an identical mutation occurs in more than one genome they are both given the same number, beyond that however the mutation number will remain unchanged indefinitely.
These innovation numbers allow NEAT to match up genes which can be crossed with each other