Hey there, thanks for playing, happy that you enjoyed it!
bewelge
Creator of
Recent community posts
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 :)
Hey there :)
First of all, thanks for playing. It's nice to know that people still enjoy this game.
I'm not sure if I'll ever start working on the game though. I made this while still at school and the code is one big mess. Pretty sure I would just break things if I started to implement new features ;) But if I do, I'll be sure to consider your suggestions, so thanks again!
I wrote a tool a while back to convert the .xml texture-atlas tilesheets that come with the Asset-downloads to .JSON format. I used this because I didn't know an easy way to use the .xml files in js/html5 projects. If there is an easy way, you can ignore this :-)
https://bewelge.github.io/TextureAtlastXMLtoJSON/
It should work for multiple files at once. If it doesn't work, there are a couple of others if you google. I remember using this PHP script once and it worked just fine:
https://github.com/snollygolly/TextureAtlasConverter
Enjoy the Jam everyone ;)
Hey everyone,
I was just playing around with Neural Networks for the first time when I read about this Jam and immediately had the idea to make a snake game that teaches itself. I used a javascript library ( https://github.com/zefman/Brainwave/blob/master/bu... ) for the Network but the rest was done in the last 4 days.
The current version is already playable at https://bewelge.github.io/HowToTrainYourSnake/ .
I think it turned out alright. The game field is 3x3 and for each tile an input is given to the neural network (either food/ snake-body/ snake-head/ empty Field). The network has 1 hidden Layer with 10 Neurons and gives 3 Outputs (Turn Left, Turn Right or Go Straight).
In the beginning there are 4 Snake-Games. When all of the snakes have died, the two best performing snakes will continue into the new generation. The two other new snakes will be a crossing/offspring of the best performing snakes. Finally theres a chance for mutation, meaning something in the snakes brain (the neural network) will be randomly changed.
Due to this randomness some games may be significantly shorter than others but on the 3x3 grid my snakes always eventually learn to play a "perfect game" (fill the entire board).
Still planning to add:
- More options so you can configure the neural network yourself after you've unlocked everything.
- Possibility to play on larger Maps than 3x3.
- Some chiptunes for when the snakes eat :)
Let me know what you think. Especially if the upgrade-progress is too slow.
Also, I'm unsure if publishing my game here is final. That's why I put it on github first because I'm not quite done yet. Anyone know if you can edit your game after publishing/submitting it here?