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

Food clusters #49

Closed matthewr6 closed 9 years ago

matthewr6 commented 9 years ago

find major clusters

an-OK-squirrel commented 9 years ago

Time to compare :P

an-OK-squirrel commented 9 years ago

nope

Znapi commented 9 years ago

Oh, I forgot about that part. This branch should probably fulfill its own goal before it is merged though.

matthewr6 commented 9 years ago

It doesn't have a specific goal besides "be better", but it did implement a function to find larger clusters.

Znapi commented 9 years ago

I started something for making sure it picks up all of the food in each cluster, and goes to clusters individually, and it is almost done. I just have to fix a small modification I made to the major cluster making function.

matthewr6 commented 9 years ago

Awesome. merge it into food-clusters, and then we can merge everything into master.

Znapi commented 9 years ago

It turned out I just mispelled a variable name, and it's looking good so far. We should probably test it more thoroughly tomorrow before merging since everyone seems to be busy today, and I haven't tested it too much.

matthewr6 commented 9 years ago

Cool.

Busy hacking up my Win8.1 computer to have the functionality of a *NIX system but the business workflow of Windows, without having any other OS besides Windows. Heck yes.

Znapi commented 9 years ago

Sounds fun. My dad installed Cygwin on our Windows laptop, but I never could get used to it. I have a Mac anyways, so I just use that.

Should I push a commit or publish another branch now? All that's left is to see if it made improvements. One thing I noticed from running it a few times is that sometimes another blob will eat the cluster the bot is headed to, and so the bot just keeps going for no reason. That and it still runs into enemies. A lot.

matthewr6 commented 9 years ago

Push a commit if you're checked out to this branch anyways.

Running into enemies doesn't have to do with feeding, I don't think.

Still trying to think of a fix for it.

Znapi commented 9 years ago

You're right, it doesn't have to do with feeding. It is just an annoying problem I felt like mentioning. BTW, I changed the colors that food, clusters, and superclusters are drawn with, so it is easier to tell the difference when I was testing. You can change things back that you don't like if you want.

Znapi commented 9 years ago

I'm not sure it helped too much. Its highest score is 144. It doesn't really make a difference until the bot gets big enough that superclusters start appearing. Then if it runs into a crowd of food, it can get big quickly.

matthewr6 commented 9 years ago

Maybe add something saying if it's less than a certain size, it doesn't go for the mega clusters? What size is good for that, would you say?

Znapi commented 9 years ago

I don't think that is the problem, mainly because the super clusters don't start appearing until it is bigger anyways. It dies a lot when it is small because it is constantly running away from everyone else, and ends up running into them. When it gets bigger, there are less threats, but the enemies are more aggressive because the bot is an ideal size for them to eat.

When the bot was getting the streak to 144, it was in a giant mass of food and without too many enemies around. It did a good job of picking up as much food as it could.

matthewr6 commented 9 years ago

http://prntscr.com/7otvvo Let's say you're the green bot. You're more interested in running away from the left bot (which is faster and more interested in eating you) than from the right bot (going any direction, and it's massive but slow). The two vectors cancel out the angle, and you just run into the bigger bot.

Seems right from your perspective?

Znapi commented 9 years ago

It looks right. I don't see how we can solve these situations(and many others) with vectors.

Znapi commented 9 years ago

I'm going to go now. I might think about this later.

an-OK-squirrel commented 9 years ago

Right now let's remove megaclusters altogether. I feel that they don't work well enough anyways.

matthewr6 commented 9 years ago

I'm still thinking only after a certain size.

Vote?

We have removed them completely right now, but we should still keep the function.

an-OK-squirrel commented 9 years ago

Remove completely right now.

an-OK-squirrel commented 9 years ago

but still keep the function for later :P

matthewr6 commented 9 years ago

that's what we already did xD

an-OK-squirrel commented 9 years ago

Did I do that comment right?

matthewr6 commented 9 years ago

Yeah.

an-OK-squirrel commented 9 years ago

Will fix

matthewr6 commented 9 years ago

Going to go ahead and merge, delete, then make a new smart-cluster branch

an-OK-squirrel commented 9 years ago

Okay!