Python Flappy Bird AI Tutorial (with NEAT) - Implementing NEAT/Creating Fitness Function

preview_player
Показать описание
In this AI flappy bird tutorial we start coding and implementing the NEAT algorithm.

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡

Tags:
- Tech With Tim
- Python Tutorials
- NEAT Python
- Flappy Bird AI Tutorial
- Python Flappy Bird AI
- NEAT Python Tutorial

#python #NEATPython #GeneticAlgorithm
Рекомендации по теме
Комментарии
Автор

for x, bird in enumerate(birds):
birds.pop(x)
...

does not do what you want it to do. it will pop every other element. the way to do this is:

for bird in list(birds):
nets.pop(birds.index(bird))

ge.pop(birds.index(bird))
birds.remove(bird)


not hating, I actually learned a lot from your tutorials, including this. so I hope this helps if someone runs into this issue like I did.

yevgeniyvovk
Автор

my heart stop beating when the message "check out next video!"

Danielagostinho
Автор

you did the coding super detail but it is better if you show the result after finishing each period of code by running it. it is not necessary for you but it is for the viewers.

NoPh-mddp
Автор

I was sure I understand some python and AI topics before I bumped on these tutorials...

lexborodai
Автор

quick question! i closed my pc after saving the project, turned on the computer the next morning, ran the script and the base didnt show up. can anyone help? thanks!

edit: nvm i was being stupid

sorzak_kriv
Автор

I get an error says "module 'neat' has no attribute 'defaultGenome'"

edit: i did it with lower case d instead of capital D

hacklordmonster
Автор

Growing restless for next video everytime

vp
Автор

Can anyone explain this Error that i keep getting don't know how to fix..
I am running on Windows not a Mac i dont know if that's why i keep getting this issue.


NameError: name '__file__' is not defined then it doesnt load the config file at all.

Luis_Ramos_Grip
Автор

Hello and thank you for this amazing tutorial!
I have an error: module 'neat' has no attribute 'config'. I am using Spyder and neat-python v0.92.
Do you know what this error is, and how to fix it?

mikelee
Автор

I did this project for 2 days and when I start the program, the window does not turn on and the program closes, there are no errors in the project

pepik
Автор

I don't understand the "config-feedfoward.txt" part at 1:36

bryan
Автор

What would need to be changed for you to have multiple output instead of one?

adamikhsannugroho
Автор

When you said, running them one at a time would be inefficient, I realised that doing that would actually help with an ai project I am working on, would you mind explaining what modifications or line of code you would need to do that? Thanks!

penneshells
Автор

Can you tell in which university you are in ??

aryanbhatia
Автор

how can it possible same code runs on your machine but not on mine

neuron
Автор

This is awesome thank you so much, I just had a question about determining genomes that have failed. If you were playing a game where it wasn't easy for a character or agent to die, or that the agent doesn't die, how might you get rid of that genome? Could it be something like done = False, while not done: (whatever the fitness function is) and then if done == True: remove(genome), print(genome_id, fitness)? Of course you'd have something that specifies what the genome is, and have genomes put in a list such as the ge = []. My trouble with this is I don't know if it would altogether get rid of the genome, and therefore you don't have any genomes to evolve and propagate a complex nn. Any help would be appreciated from anyone, thanks again.

tinatipton
Автор

i made a game of snake but i wanted to train it 1 by 1 than a bunch of it so can you plz help..

saiprabhav
Автор

Hello everyone, can anybody please explain me why the main() function Tim calls, doesn't have any actual parameter and still works?
Cause i get this error wich I don't know how to fix:
main() missing 2 required positional arguments: 'genomes' and 'config'

dan_nad
Автор

The pipe and the bird player is too big in ny laptop screen, how to make them smaller:(

yudatriananda
Автор

what do you do if it says RuntimeError: 'NEAT' section not found in NEAT configuration file.

helloperson