LeoWuVinci / agar.io-bot

Agar.io Bot Framework for Bot Developers
GNU General Public License v2.0
191 stars 76 forks source link

Stuck between two blobs #9

Closed phadeb closed 9 years ago

phadeb commented 9 years ago

Problem : Acceleration isn't taken into account (only distance) which may cause the bot to get stuck inbetween 2 blobs.

Solution : Implement acceleration and make decisions not with distance but with projected time to reach blobs.

LeoWuVinci commented 9 years ago

It does take into account of acceleration. px and py is the predicted coordinates after velocity and acceleration has been added.

phadeb commented 9 years ago

But what makes it stuck between 2 blobs sometimes, going back and forth ?

Also why doesn't use acceleration momentum to calculate the best blobs in it's way instead of say a blob that is a shorter distance but at a 90° angle of the first blob, which creates a deceleration and makes getting that closest blob actually longer ?

LeoWuVinci commented 9 years ago

So I decided to take out acceleration and add latency cushion because there really isn't much acceleration happening. As for getting stuck between 2 blobs, it now escapes based on the enemies movement path which will naturally cause it to more likely move at a 90 degree angle.