ScratchAgarioBots / agario-bot

An AI designed to take less risks and have the highest possible odds of survival.
MIT License
13 stars 2 forks source link

Viruse's #46

Open an-OK-squirrel opened 9 years ago

an-OK-squirrel commented 9 years ago

Now that agario-bot (needs a name :P) is getting bigger, it needs to be able to avoid viruses (very minor)

an-OK-squirrel commented 9 years ago

Or be able to handle all of its blobs at once.

Znapi commented 9 years ago

Should we just put buffers around them when they are bigger than the bot? The bot could handle virus buffers differently than enemy buffers, it could follow around it using tangents instead of away like with enemies.

matthewr6 commented 9 years ago

Yeah, virii (?) don't move.

an-OK-squirrel commented 9 years ago

Yes, that would be good.

Znapi commented 9 years ago

If I start this, what branch should I fork? Should I fork bufferless because that looks like the way we are going?

matthewr6 commented 9 years ago

Bufferless doesn't have everything yet. Could you check out food-clusters and see if everything works? If so, merge that into master and then from master.

Apostolique commented 9 years ago

Are you guys still able to use stuff like angle ranges? If so, the way I solve viruses (and obstacles) works quite nicely in the current beta: https://github.com/Apostolique/Agar.io-bot/blob/master/beta.user.js

an-OK-squirrel commented 9 years ago

I couldn't figure out how they worked. I'll check it out. (Thanks for checking out our)

Apostolique commented 9 years ago

Normally when my bot runs away from enemies, it finds the angles in which it cannot run towards, then goes the other way: http://i.imgur.com/dprLCZe.png

In the case of an obstacle like a virus, instead of going the other way, if you're ever going towards a virus, it shifts the direction angle instead so that you're not running directly towards it: http://i.imgur.com/VMgEbp2.png

an-OK-squirrel commented 9 years ago

Cool! I don't really know how we'd implement angles because of the way our bot treats enemies and stuff. I'll try to figure it out.

an-OK-squirrel commented 9 years ago

Also, while your here, can you check out #49?

an-OK-squirrel commented 9 years ago

*you're

Apostolique commented 9 years ago

Seems pretty good so far, moves really fluidly. That version above made it to size 400 on first try. (It then proceeded to run in a virus.)

an-OK-squirrel commented 9 years ago

The one on food-clusters?

Apostolique commented 9 years ago

Yep.

an-OK-squirrel commented 9 years ago

Hm... Okay! Maybe I'm being to harsh on it.

Apostolique commented 9 years ago

It does seem to run into enemies though.

an-OK-squirrel commented 9 years ago

That was the main problem for me. Also, it seemed to just go to random points on the grid sometimes, you have any clue why?

Apostolique commented 9 years ago

Just by looking at it play, I couldn't figure it out.

an-OK-squirrel commented 9 years ago

Huh.

an-OK-squirrel commented 9 years ago

Did you try the bot on master?

matthewr6 commented 9 years ago

I did try implementing angle ranges, but they were working kind of weirdly for me.

I also have it run into other players sometimes, probably because of the way vectors work (-> + <-- means a net movement of <-). @an-OK-squirrel , I don't think your solution of moving <= 10 spaces worked, no offense meant. The bot will still move, but it'll just move to the "less dangerous" bot and then get killed. I'll try to think of a way to fix it... Maybe see if it's stuck between two players at certain angles?

an-OK-squirrel commented 9 years ago

That solution was mine :P

matthewr6 commented 9 years ago

oops

an-OK-squirrel commented 9 years ago

No offense taken.