Slither.io-bot
Slither.io-bot copied to clipboard
Avoid circling by other snakes
First , I want say the current script is fine and very good. But, i need some code detect when my snake be attacked ( surrounded by other snake ), some code let snake chasing its own tail. (not Defense Mode)
Sorry about my English. :)
We currently do not have circling avoidance in the master branch but there is in the A* OLD branch, if you want to look at anything...
Complex changes to the AI have been attempted... for now we are sticking with the simple circles-based approach.
However, feel free to attempt the feature! We're open to experimental/development branches with AI improvements.
Are you sure it's that complex? How about checking if a snake covers at least 180 degrees, and if so, aim at that snake's tail?
Another thing is that since around 90% of the deaths are caused by another snake circling you, it seems strange that this issue should have low priority.
EDIT: I guess the number is closer to around 50% of the deaths.
@kmatheussen Recently changed labels - changing them now...
EDIT : Have a go at it and we'll be happy to merge it if approved !
I have tried the old branche but it seems not to work. i only get a black screen. How can i add this to let snake go in round to not die when they try to circling me?
@ChristianGrieger ...
@ChristianGrieger Should be fixed now - install bot.meta.user.js and it be fine. CONFIRMED WORKING
I will try thank you :) what is the differense to old and new bot? Is it less good? Can we get in contact in skype i have a question for another simular game a bot would ne cool for?
Okay i tested it :) now i understand why its an old branche :/ So the new version is much better and i really hope this feature gets added soon to be enabled because snake dies really often if someone try to get qround it. But thanks for the update.
If someone circles you, you are still most likely to die, even with the defence mode. If a snake cricles you close enough, the only thing it has to do to make you die is to go in another direction. The snake bodies are not set in a fixed position, they move a little bit depending on the angle it is pulled.
But if you hold the circle a bit bigger and you run behind your own tail it can work or not ?
I'm not sure. I think it may be simpler to avoid getting circled than to try running in a circle though. Not that it should be too difficult try to run in a circle either, but you have to decide how big the circle you want to create should be, and while doing that you have to make sure you don't bump into something while creating the circle. Detecting when getting circled, and getting away from it, doesn't seem so hard to implement, but I haven't tried.
Okay so i have to wait for that get added :)
@ChristianGrieger Yep - hence why this issue is open and has the prio:important label ;)
But if you hold the circle a bit bigger and you run behind your own tail it can work or not ?
@ChristianGrieger No, the body of a snake does not stay exactly where you traveled (unless going in a straight line). Turning and curving pulls the body of the snake tighter. Even if you retrace your tail "perfectly", you will gradually draw a tighter circle.
Of course, if you draw things out and make the attacker circle you for a long time, they might slip up and die, or get distracted by other food.