Apostolique / Agar.io-bot

The aim of the project is to create a bot that can play Agar.io
MIT License
1.15k stars 1.92k forks source link

Goes for food inside a virus #580

Open kakol20 opened 8 years ago

kakol20 commented 8 years ago

When the bot is big enough, it sometimes goes for food inside a virus I've recently had an issue while using the bot, where it was trying to get a food in the centre of a virus and it split.

Maybe make a way for it to ignore food inside viruses.

Drflash55 commented 8 years ago

Yeah, that's something I suggested a while ago to be fixed. There should be a function that tells the bot that if it detects food or a cell inside of a virus, and it's not small enough to eat it without popping, it should ignore it entirely.

ermiyaeskandary commented 8 years ago

Being worked on.

ermiyaeskandary commented 8 years ago

This function checks if it is food or not -

this.isFood = function(blob, cell) {
        if (!cell.isVirus() && this.compareSize(cell, blob, 1.33) || (cell.size <= 13)) {
            return true;
        }
        return false;
    };
ermiyaeskandary commented 8 years ago

But it has no way of understanding if the food is in the virus - it only detects if it isn't a virus.

ermiyaeskandary commented 8 years ago

brilliant geniuses who take care of this project will simply copy/paste my code in the bot like they always do

You are requesting for us to implement it - nobody asked for your help.

ermiyaeskandary commented 8 years ago

@muratlahur if you stop acting like above, I will implement your code - I have no issue with you.

ermiyaeskandary commented 8 years ago

@Drflash55 @FliiFe Can you test ? I can't test due to where I'm at.

Drflash55 commented 8 years ago

@ErmiyaEskandary Would love to, but my school firewall doesn't allow me to play Agar.io

Have to do it at home.

ermiyaeskandary commented 8 years ago

@muratlahur I can't edit the bot just because you say it works. I need someone else to test it as well, just to make sure. @FliiFe Can you ?

ermiyaeskandary commented 8 years ago

@Drflash55 @Drflash55 @muratlahur I can test all of these in 40 minutes but if you can please do it earlier.

ermiyaeskandary commented 8 years ago

@FliiFe Can you test this code?

FliiFe commented 8 years ago

@ErmiyaEskandary Yes, I will

ermiyaeskandary commented 8 years ago

@FliiFe please post results here after testing.

muratlahur commented 8 years ago

KNOWN BUG... As this effectively deletes the food around viruses , if there are many viruses around and you are right in the middle of them , the bot kinda drifts as it has no food to eat until it reaches some food..

muratlahur commented 8 years ago

to avoid that ( and to get only the food under the virus deleted ) you should remove the * 5 ( this removes virus in a 5 x virus size diameter, if you delete that it will be just the virus size )

FliiFe commented 8 years ago

@ErmiyaEskandary Waiting for the bot to grow

ermiyaeskandary commented 8 years ago

@FliiFe can you test now ?

muratlahur commented 8 years ago

ermiya , FliiFe has the entire source now .. I suggest you get it as well and just test and play with that as everything is where it should be

muratlahur commented 8 years ago

ESPECIALLY THE MULTICELL CONTROL JUST LOOK AT THE BRILLIANCE :D :D :D

ermiyaeskandary commented 8 years ago

We don't want the whole source - we want what's new. Let's go step by step. FliiFe did the virus code work ? Let's start with this...

ermiyaeskandary commented 8 years ago

Otherwise that's just copying your code.

ermiyaeskandary commented 8 years ago

@FliiFe we think the same lol

muratlahur commented 8 years ago

ok , but my code is apos bot + what's new .. so it's the same thing at the end lol ..

if you merge all the new things , you'll end up with my code anyway hehe

muratlahur commented 8 years ago

anyhow..Look , I've given it all to you guys ....and I'm delighted that we understood each other on the ads and analytics..

so my job here is done really . .

I'll be @ my mail when you need me ..

Peeez out. . .

muratlahur commented 8 years ago

by the way , do study my code . there are many many many changes that I can't list..

From which food to chase , to how to handle threats to , re-unite and re-merge system to alone in the dark etc etc etc..

it will take you a while to completely understand what I did ..