I started from the Nodejs starter kit, and proceeded to improve the battlesnake to:
- Avoid colliding with walls
- Avoid colliding with yourself
- Try to move towards food
- Avoid colliding with other snakes
What it does
Currently, the snake avoids collisions with walls, self and other snakes.
How we built it
I added functions to check for collisions and let the snake pick another direction if there is a potential collision.
Challenges we ran into
I spent quite some time figuring out that a return statement in a forEach loop would not exit the parent function.
Accomplishments that we're proud of
A battlesnake that kinda works! (not too smart but not too bad)
What's next for BattleSnake
To have the battlesnake move towards food and consider researching and implementing strategies. One strategy could be to approach snakes that have shorter lengths. Also, customization of the snake. And in the future, I'm hoping to figure out how to proceed with the AWS reinforcement learning tutorial. That looks interesting!