The (fitness) function is used to rate how successful a snake was. Obviously eating a lot of food will give a higher fitness score. But you can further adjust the function to for example lower the fitness score when a snake turns. This would cause a snake that took less turns to eat 10 food have a higher score than a snake that ate 10 food but took more turns to do so.
If you want to learn more about this you can search for 'fitness function' in combination with genetic algorithms. There are a lot of resources out there that explain it in more depth :)
Thanks! I'll dive in. I was able to complete the game fairly fast without having to modify those values, but I'd love to learn more about what they do and see if I can PB my run :D
← Return to game
Comments
Log in with itch.io to leave a comment.
Where can I learn more about the function stuff? I don't understand what any of it means lol
The (fitness) function is used to rate how successful a snake was. Obviously eating a lot of food will give a higher fitness score. But you can further adjust the function to for example lower the fitness score when a snake turns. This would cause a snake that took less turns to eat 10 food have a higher score than a snake that ate 10 food but took more turns to do so.
If you want to learn more about this you can search for 'fitness function' in combination with genetic algorithms. There are a lot of resources out there that explain it in more depth :)
Thanks! I'll dive in. I was able to complete the game fairly fast without having to modify those values, but I'd love to learn more about what they do and see if I can PB my run :D
it took me longer than i would have liked to realize that i could click the move button
same. i played thru the hole game before i realised
This should be higher up!
Very unique concept, I liked it!