Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IncubateEggs task is incubating in breakable "2" (km) when is configured only for "10" (km) #4835

Closed
alexmuntean opened this issue Aug 28, 2016 · 5 comments

Comments

@alexmuntean
Copy link

Expected Behavior

Breakable should incubate only 10 km eggs.
config:

{
        "type": "IncubateEggs",
        "config": {
          "enabled": true,
          "longer_eggs_first": true,
          "min_interval": 60,
         "infinite": [2,5,10],
         "breakable": [10]
        }
      },

Actual Behavior

It incubates any eggs. I had only 2 km eggs

Your FULL config.json (remove your username, password, gmapkey and any other private info)

http://pastebin.com/AYnhUu9p

Other Information

OS: OSX latest

Branch: master

Git Commit: ed09593

Python Version: Python 2.7.9

Any other relevant files/configs (eg: path files)

@alexyaoyang
Copy link
Contributor

Update to latest dev, this is fixed recently.

@julienlavergne
Copy link
Contributor

julienlavergne commented Aug 28, 2016

It is not, I am running on head right now and it is still incubating 5km eggs in breakable:

Eggs incubating: [4.49/5.0 km, 3.70/5.0 km, 3.34/5.0 km] (Eggs left: 6, Incubating: 3)

        {
            "type": "IncubateEggs",
            "config": {
                "infinite_longer_eggs_first": false,
                "breakable_longer_eggs_first": true,
                "min_interval": 120,
                "infinite": [
                    2,
                    5,
                    10
                ],
                "breakable": [
                    10
                ]
            }
        },

@julienlavergne
Copy link
Contributor

After reading the code,it is quite clear where this bug (and other bugs) are:

  • `temp_ready_incubators``only contains the id of the incubator, and not the "uses_remaining" attributes. This cause breakable incubator to be treated as infinite ones and thus hatching eggs initially configured for the infinite only.
  • If only one egg 10 km in the bag, and you have infinite and one free breakable incubator free, we are going to hatch it with a breakable incubator instead of the infinite one. It is not an optimized decision.

@alexyaoyang
Copy link
Contributor

Ping @rawgni

@mjmadsen
Copy link
Contributor

Merged to dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants