Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
Snake with head
no vote
A snake js implementation of AI, the basic idea: use to feed a snake impersonation, if after eating food (shortest path breadth-first search) snake in a safe state, let the real snakes to eat if not safe, then go with the Snake's tail (longest path breadth-first search), no step needs to be carried out once the above judgment. Note: If you can find the snake path of the head to the tail of a serpent, the snake secure. The above algorithm may still cause the snake to enter an infinite loop, there is no safe path can eat food, this happens at a time when most food supplies had now didn't find a solution, if interested or have a better solution, please contact me.
frojan
2016-08-23
0
1
No more~