PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

[Bug] FollowCluster can't decide where to go

Open mattias opened this issue 10 years ago • 21 comments

Expected Behavior

Keep moving towards the cluster and stay there.

Actual Behavior

It keeps going back and forth everywhere without ever reaching a destination. Snippet from the log: [21:02:57] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 198.367797336m. [21:03:01] Move to destiny. 3 lured pokestops will be in range of 50m. Arrive in 768.134850221m. [21:03:05] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 201.382109383m. [21:03:08] Move to destiny. 3 lured pokestops will be in range of 50m. Arrive in 767.946828573m. [21:03:13] Move to destiny. 3 lured pokestops will be in range of 50m. Arrive in 755.177316489m. [21:03:17] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 209.438889512m. [21:03:21] Move to destiny. 3 lured pokestops will be in range of 50m. Arrive in 755.439571063m. [21:03:25] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 208.935773283m. [21:03:29] Move to destiny. 3 lured pokestops will be in range of 50m. Arrive in 754.81225207m.

Steps to Reproduce

Run the FollowCluster task as specified in the example config. My configuration: https://gist.github.com/mattias/3028bd2d2bd222a52400f5fe2a881fc3

Edit: After a while it finally settled down on one spot. I assume this happens when there are a lot of clusters with a lot of lured pokestops around. I'd still say it is a bug and has to have better priorities and stay focused on one target. In the example above there were one cluster with 2 lured pokestops which was only 200m away and one cluster with 3 lured pokestops but 750m away. I've also had this happen when there has been two clusters with 2 lured pokestops each.

Other Information

OS: Linux Git Commit: 494bc055543c3cb674cca781ec545311d3c9bad1 Python Version: Python 2.7.12

mattias avatar Aug 01 '16 19:08 mattias

i notice similar behaviour:

n [27]: while True:
    bot.tick()
   ....:     
...

th3w4y avatar Aug 01 '16 20:08 th3w4y

cluster.log.gz


with open('cluster.log', 'wb') as f:
    while True:
        f.write(str(bot.get_forts())+'\n')
        bot.tick()
   ....:      
[22:29:08] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 314.069899446m.
[22:29:12] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 310.743356929m.
[22:29:16] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 306.132793672m.
[22:29:21] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 300.796509364m.
[22:29:25] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 297.626421697m.
[22:29:29] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 292.357596646m.
[22:29:32] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 288.717166104m.
[22:29:36] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 284.30795787m.
[22:29:40] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 278.285978239m.
[22:29:44] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 271.341043092m.
[22:29:48] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 268.385879066m.
[22:29:52] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 325.540277502m.
[22:29:55] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 320.349303371m.
[22:29:59] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 317.126531994m.
[22:30:03] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 314.502670857m.
[22:30:07] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 311.023388726m.
[22:30:11] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 307.678582028m.
[22:30:14] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 300.962639391m.
[22:30:18] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 296.022364272m.
[22:30:22] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 291.795434293m.
[22:30:25] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 285.569334647m.
[22:30:29] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 283.134509856m.
[22:30:33] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 278.919568382m.
[22:30:37] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 272.962356268m.
[22:30:41] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 266.828558659m.
[22:30:44] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 261.093263092m.
[22:30:48] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 256.433337698m.
[22:30:51] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 250.278701075m.
[22:30:55] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 247.101594394m.
[22:30:59] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 349.432295124m.
[22:31:02] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 346.599523587m.
[22:31:06] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 344.474256961m.
[22:31:10] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 341.608769993m.
[22:31:14] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 337.287090186m.
[22:31:17] Move to destiny. 2 lured pokestops will be in range of 50m. Arrive in 331.530325817m.

th3w4y avatar Aug 01 '16 20:08 th3w4y

I have the same issue

OVO647 avatar Aug 01 '16 20:08 OVO647

Hm 1st prority is number of lured pokestops and 2nd the aggregated expires_timestamp_ms. I don't see what can cause this behaviour other than spotty call data. I try to recreate (at central park) but I get consistent data. Can you provide me with location data? The initial log seems to be most promising. Also is this a regular occurance for you or does it happen only once in a while? [23:19:40] Starting PokemonGo Bot.... [23:19:40] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 181.171318768m. [23:19:47] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 179.009618787m. [23:19:51] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 176.537945204m. [23:19:56] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 175.04320824m. [23:20:00] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 171.441687395m. [23:20:11] Move to destiny. 4 lured pokestops will be in range of 50m. Arrive in 165.382143263m. [23:20:15] Move to destiny. 4 lured pokestops will be in range of 50m. Arrive in 161.895555516m. [23:20:20] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 154.19466428m. [23:20:35] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 147.818165813m. [23:20:50] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 143.7187129m. [23:20:54] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 137.834059071m. [23:21:04] Move to destiny. 4 lured pokestops will be in range of 50m. Arrive in 123.300090908m. [23:21:20] Move to destiny. 4 lured pokestops will be in range of 50m. Arrive in 735.360708725m. [23:21:23] Move to destiny. 4 lured pokestops will be in range of 50m. Arrive in 730.11789832m. [23:21:28] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 137.573734393m. [23:21:33] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 132.340911078m. [23:21:37] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 125.861385744m. [23:21:43] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 121.886717395m. [23:21:46] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 117.836347729m. [23:21:51] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 114.758782563m. [23:21:55] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 110.483815909m. [23:22:05] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 104.664915404m. [23:22:09] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 99.0747435168m. [23:22:19] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 95.2993061951m. [23:22:29] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 89.532243547m. [23:22:39] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 85.320895579m. [23:22:49] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 83.3013152757m. [23:22:53] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 81.8435731679m. [23:23:08] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 78.1438335232m. [23:23:18] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 71.7321666032m. [23:23:22] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 68.8919484566m. [23:23:32] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 63.9076740577m. [23:23:40] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 60.0948387968m. [23:23:45] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 55.2016520897m. [23:23:51] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 48.2519771884m. [23:23:55] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 44.1208990511m. [23:24:00] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 38.000169674m. [23:24:05] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 34.7875825898m. [23:24:08] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 31.9213136293m. [23:24:14] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 26.781465718m. [23:24:18] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 19.8209961626m. [23:24:23] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 15.0126992518m. [23:24:32] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 12.7700257393m. [23:24:48] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 10.2219786159m. [23:24:52] Move to destiny. 5 lured pokestops will be in range of 50m. Arrive in 5.5460532567m. [23:24:52] Arrived at destiny. 5 pokestops are in range of 50m.

MFizz avatar Aug 01 '16 21:08 MFizz

@MFizz since you added the functionality in https://github.com/PokemonGoF/PokemonGo-Bot/pull/1993 please take a look if you have some time

th3w4y avatar Aug 01 '16 21:08 th3w4y

@th3w4y Please take a look at my questions

MFizz avatar Aug 01 '16 21:08 MFizz

check the attached to my previos comment cluster.log.gz (i dumpted the bot.get_forts() there which should be better then the location data cause location data will have the points after the stepwalker changes position...)

MFizz commented about 7 hours ago @th3w4y Please take a look at my questions

th3w4y avatar Aug 02 '16 04:08 th3w4y

@MFizz the location I get this at most often: https://gist.github.com/mattias/d655cf569af0c9265e87663aa08ba0a1 I'll remove this gist once you've fetched it.

mattias avatar Aug 02 '16 07:08 mattias

@th3w4y

check the attached to my previos comment cluster.log.gz (i dumpted the bot.get_forts()

Sorry I put every fort list you posted into find_biggest_cluster and got consistent output, additionally I find 5 instead of 2 spots in your data. Maybe, you attached the wrong logs or you got weird output from stepwalker?

I tested like this:

test

Fort1: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort2: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort3: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort4: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort5: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort6: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort7: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort8: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort9: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort10: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort11: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort12: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort13: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort14: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort15: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort16: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort17: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort18: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort19: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort20: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort21: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort22: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort23: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort24: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort25: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort26: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort27: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort28: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort29: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort30: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort31: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort32: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort33: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort34: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}
Fort35: {'latitude': 47.16581160108965, 'num_points': 5, 'longitude': 8.5170003999999988}

MFizz avatar Aug 02 '16 10:08 MFizz

@mattias testing your position now

MFizz avatar Aug 02 '16 10:08 MFizz

@mattias could not catch anyithing unusual till now: logs.txt

MFizz avatar Aug 02 '16 12:08 MFizz

Perhaps it has something to do with cell edge cases explained here and here . But we have some kind of cell merge - don't know if that fixes that issue. Anyway that wouldn't explain the case @th3w4y logged though... Are you sure you added the right logs?

MFizz avatar Aug 02 '16 12:08 MFizz

@MFizz yes.. i am also puzzled cause i also run the same function on every collected point and got the same point as destination each time

and yes i am sure the logs are fine because i generated the cluster.log like this:

with open('cluster.log', 'wb') as f:
    while True:
        f.write(str(bot.get_forts())+'\n')
        bot.tick()
   ....:  

and then pasted the output and atached the log...

MFizz commented 5 hours ago • edited Sorry I put every fort list you posted into find_biggest_cluster and got consistent output, >additionally I find 5 instead of 2 spots in your data. Maybe, you attached the wrong logs or you got >weird output from stepwalker?

th3w4y avatar Aug 02 '16 15:08 th3w4y

This were the cells i was in at that time... and the 21 s2cells from the location.json i was somewhere in/around the circled area

Image of s2 coverage

th3w4y avatar Aug 02 '16 16:08 th3w4y

Maybe try to log the real forts you send to find_biggest_cluster. Maybe there are changes between the calls.

MFizz avatar Aug 02 '16 16:08 MFizz

@MFizz i was thinking that it could be the edge cell thing since we are kinda at the edge when we start (that is my interpretation of above picture...) hmmm

th3w4y avatar Aug 02 '16 16:08 th3w4y

Yes it could be and a fix would be to cache forts and only update. But it would be nice to be sure. And then it would need to be invalidated each time too.

MFizz avatar Aug 02 '16 16:08 MFizz

Mine sometimes walks to a fort and sits there and nothing else happens.

TCB13 avatar Aug 02 '16 19:08 TCB13

Well, it doesnt move when its in the middle of the biggest cluster - that would be intended. Other functions like catching pokemon are invoked by the other tasks and have nothing to do with follow cluster.

MFizz avatar Aug 02 '16 19:08 MFizz

The problem is that "the other tasks" are never evoked. It just stays there doing nothing. I'm using the config provided.

TCB13 avatar Aug 02 '16 19:08 TCB13