#IMPLEMENTING NEAT INTO MY FLAPPY BIRD GAME
24 messages · Page 1 of 1 (latest)
@rugged totem thoughts?
Neat is super cool for these tasks! What parts of it do you need some help with?
And it's weirdly flattering you @ me when people mention neat <3
youd be even more impressed and concerned if you knew what's going on at the same time, but honestly helping ppl makes me feel better and this is my favorite topic
@worthy tusk feel free to ping me when you're ready though :)
hey @rugged totem sorry I missed this, I was doing some other stuff. Is it okay if I ping you later about it?
sure!
thanks
@rugged totem Hey brook so i have the code I created on my github repo and right now its set to take in input when I click the spacebar https://github.com/sharktankful/Flappy_Bird_AI/blob/master/main.py
right now I have the config path setup but besides that I don't really know how to create the fitness functions based on what I have so far
Fitness functions in games like these are typically very simple. Their fitness is the distance they traveled.
Yeah thats what I've been told as well. From what I understand their based on the score you have in the game (like the timer)
I'm just lost on how you would first write the function
well thats one of the things im lost on
I guess to put it plainly, where would I go after I make the function to run the neat algorithm (cause I wrote that out)
NEAT has several phases which makes what you said confusing to me. The steps are plainly put:
- Make a random neural network
- Make P clones of the network
- Test all clones and score them
- Decide the best clones
- Make P total clones from those best clones. Mutate each clone. Repeat Step 3 until goal is achieved.
The fitness algorithm is just to assign them a score so you can sort them by who did the best. You can pick the top 10% to clone or pick the best, both have pros and cons
What do you mean specifically when you say make a random neural network?
If you're doing a simple neat experiment, then assigning random weights to the connections. It can evolve from no starting connections at all though.
Tuning the mutation rates of the neurons and connections will be half of the work tbh
I know what weights are but i'm still confused as to how I would apply that to my code
You'd likely have to check with the libraries you're using specifically
thats what im confused on. I don't know how apply NEAT into my code