Slither.io-bot: Bot gets stuck circling food

Created on 27 Apr 2016  路  22Comments  路  Source: ErmiyaEskandary/Slither.io-bot

Bot gets stuck trying to eat a single piece.

Potential solutions:

  • Ignore food closer than n units to the left or right (Do we have currentBotAngle detection?) since these food will most likely be within our turning radius.
  • Solve issue #13
  • If we solve #23 then the bot would be very unlikely to get stuck on one.
bug

Most helpful comment

Wow. Look how far we came...

We were finally able to fix one of the bot's very first bugs...
Pat on the back to those who contributed.

All 22 comments

Do we have currentBotAngle detection?

We don't. The bot is currently not working with angles, and that is something we should implement...

Needs #22

maybe it checks if a food is close to it and if it hasn't been eaten for a certain amount of times it chooses a new food? @FliiFe

@Classicanon That is more of a workaround than a real fix. Could temporarily works, but @ErmiyaEskandary and I are working on angles.

@FliiFe yea but at least it would work until you and @ErmiyaEskandary get angles working i really should learn JavaScript so i can at least help with things

@Classicanon Help on logic is still really helpful. For example, I'm almost sure no one in the team thought of that.

So, assuming we have angles working. Should we avoid food on the sides, or use only the food in front of the bot ? Please see this for visual representation of my question.

I would say go only after food in front as that would help with clustering food and with eating food in a straight line without zigzagging constantly from food to food e.g when a snake dies

Who agrees ?

I do. :)

@FliiFe I think it needs to be a combination of angle and distance.
For example:

  • Close on the side: Bad
  • Close in front: Good
  • Far on side: Okay
  • Far in front: Okay

@dracco1993 Note taken.

Please read #22. Angles will not be implemented anymore. We need another way to fix this.
Ideas ?

@Classicanon maybe it checks if a food is close to it and if it hasn't been eaten for a certain amount of times it chooses a new food?

or sideways after (for example) 3 circles?

@Seple These are workarounds. I am working on this.

@FliiFe Thank you! Your band is magnificent!

@Seple band ?

@FliiFe I like your visualization, but I had a thought while looking at it.

visualization of straight and rounded angles

Really the snake is not bounded by straight angles, but continuously curved angles -- whatever is the tightest possible turn the snake can make at its present size.

Thank you! Your band is magnificent!

*band = group dewelopers

@ChadSki That's a great idea !
I will first implement the angle version, as it is almost finished.

Would that work ? Snake can take food behind, on the sides, etc, without getting stuck circling food
Danger zones

Wow. Look how far we came...

We were finally able to fix one of the bot's very first bugs...
Pat on the back to those who contributed.

^

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fredyy90 picture Fredyy90  路  3Comments

ghost picture ghost  路  10Comments

phatass69 picture phatass69  路  5Comments

phrokton picture phrokton  路  9Comments

FliiFe picture FliiFe  路  10Comments