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.
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.
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.
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
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?
Hello I had the same problem as you. Answer: first uninstall neat (pip uninstall neat) next install neat-python (pip install neat-python) there problem solved.
Sorry I didn't see the part about you already having neat-python. My guess is probably the fact that neat and neat-python are both imported as neat. Try checking if neat is installed by uninstalling it.
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!
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.
Is the window too big or the sprites? For the sprites: I guess you should either remove "pygame.transform.scale2x" from your code or just change the resolution of sprites. For the window: from ctypes import windll windll.user32.SetProcessDPIAware() # Removes DPI-Scaling
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'
@@sashamuller9743 When run my code I am getting the following error. Any help is really appreciated. TypeError: 'FeedForwardNetwork' object is not subscriptable My code is this: for _, g in genomes: net = neat.nn.FeedForwardNetwork.create(g, config) nets.append(net)
Hi tim, im getting this error: Traceback (most recent call last): File "C:/Users/admin/PycharmProjects/Flappy-Bird/flappy-bird.py", line 5, in import neat ModuleNotFoundError: No module named 'neat' What do i do? Also, just wanna say love your teaching style!
While i appreciate you building this project Tim, might i say the code is just really bad, extremely confusing and its just one huge file. You can honestly make your videos a lot more structured if you just use multiple files. It would also help us learners to be able to progress faster.
my heart stop beating when the message "check out next video!"
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.
yeah I was thinking about this too. Thanks for the suggestions
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.
I get an error says "module 'neat' has no attribute 'defaultGenome'"
edit: i did it with lower case d instead of capital D
that's was just that ? because i have the same pb with DefaultReproduction
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.
What would need to be changed for you to have multiple output instead of one?
2 years later, but if you are still having this problem. All you have to do is change the number of outputs in the config file
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
Growing restless for next video everytime
Thank you for regular uploads!
I was sure I understand some python and AI topics before I bumped on these tutorials...
Awesome video bud
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?
me too! i dont know what to do D=
did you manage to solve?
Hello I had the same problem as you. Answer: first uninstall neat (pip uninstall neat) next install neat-python (pip install neat-python) there problem solved.
Sorry I didn't see the part about you already having neat-python. My guess is probably the fact that neat and neat-python are both imported as neat. Try checking if neat is installed by uninstalling it.
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!
Go to the last video. Change the population to 1 (in the txt file). I hope that works for you.
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
Is you call a main() function or not?
I don't understand the "config-feedfoward.txt" part at 1:36
its just a file name
Can you tell in which university you are in ??
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.
I think you'd have to kill your agent yourself after some time. Say, every 20 seconds, you calculate their fitness and breed the next generation.
Great Videooo!
how can it possible same code runs on your machine but not on mine
The pipe and the bird player is too big in ny laptop screen, how to make them smaller:(
Is the window too big or the sprites?
For the sprites: I guess you should either remove "pygame.transform.scale2x" from your code or just change the resolution of sprites.
For the window:
from ctypes import windll
windll.user32.SetProcessDPIAware() # Removes DPI-Scaling
@@limtis yes i tried it but i still cant see the lower pipe because my laptop screen is too small can you help me
@@limtis i cant see the ground too
@@yudatriananda3558 pygame.transform.scale()
resize to new resolution
scale(Surface, (width, height), DestSurface = None) -> Surface
@@limtis i dont get it what line should i edit😅
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'
change Defaultgenome with defaultgenome
I’m having the same issue and changing the genome did not work.
my code just doesn't run. Help please?
what's your issue
@@sashamuller9743 When run my code I am getting the following error. Any help is really appreciated.
TypeError: 'FeedForwardNetwork' object is not subscriptable
My code is this:
for _, g in genomes:
net = neat.nn.FeedForwardNetwork.create(g, config)
nets.append(net)
what do you do if it says RuntimeError: 'NEAT' section not found in NEAT configuration file.
press strg+s while on the config file. That were 2 hours of my life
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..
Hi tim,
im getting this error:
Traceback (most recent call last):
File "C:/Users/admin/PycharmProjects/Flappy-Bird/flappy-bird.py", line 5, in
import neat
ModuleNotFoundError: No module named 'neat'
What do i do?
Also, just wanna say love your teaching style!
you have to install the neat package for python
I'm probably too late but still..
14:11 lmaooooo
Can anyone explain to me why birds.pop(bird) while we loop through birds works fine? Thank you.
he only render birds in the list, so if the bird isnt in the list, once the screen is redrawn it will be gone
Does anyone know what font he is using?
Also does someone know what the syntax theme is
thanks.
Oh ge... 😂🤓
8:15
I always get the same error, AttributeError: module 'neat' has no attribute 'Config', anyone who can help me?
did you install the correct module? "neat-python", not only "neat
@@LotusP2 love you so muchhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
@@LotusP2 thank youuu
You Whicg terminal
?
which terminal do you use
You don’t know what a terminal is do you?
Can I do a AI which plays Flappy Bird in C#?
You could do probably, but it will be messy.
Help me in that
While i appreciate you building this project Tim, might i say the code is just really bad, extremely confusing and its just one huge file. You can honestly make your videos a lot more structured if you just use multiple files. It would also help us learners to be able to progress faster.