Spawnpoints MAD - madBeavis/PimpMyAtv GitHub Wiki
Foreward
Finding spawnpoints and their associated spawn times information is a critical part of having a useful setup utilizing PrioQ monster scanning method and getting accurate end times for alerts. This is written as a quick guide to help newer folks get up things up in running efficiently. The guide assumes you know the basics of geofences, areas, devices and walkers.
For this you want mon_mitm mode, trust me it will find iv data just fine. Don't do this with iv_mitm, it won't do shit. I know it is named iv_mitm, so don't think it is the only mode that does iv. Sometimes it hurts more to argue than accept what how things are named.
MAD does max 2 iv checks per position. Don't bother asking for more. If you iv list contains all mons, there could be some leftovers that didn't get iv checked. They are kicked to a list and MAD will send an iv_mitm worker to get them, with priority based on position of the mon in your iv list. I have a short iv list consisting of meta relevant mons, if you want them all, so be it.
Is there points left out here? Sure, the purpose of this is to not be a compendium of pokemon spawn information. It is to get someone on the newer side of things up and running easily and properly. The nuances related to and discussion of things can come later. Don't over think and make things unnecessarily complicated when you are just learning.
The expectation here is that this guide will be read through before trying to do things. Specific settings for each stage are conveniently at the end.
General Information
For normal day to day, i.e. outside of events, spawnpoints are fixed. Monsters will spawn at the place and at the same time all day and night. If you find a monster at the corner down the street spawning at 15 minutes after the hour and lasting for 30 minutes, it will repeat that process each hour.
Spawnpoints are fairly static, but since we are in the state of covid enhanced spawns and the increase/changes at end of August 2020, who knows. New pokestops will add spawnpoints, but it may take a while. Some seem to be added on a random basis. Community day may add new spawnpoints. Certain events, like the feature hour, will add spawnpoints. There was also the great spawn change that happened in late 2019. Handling event spawns is up to your discretion, whether you delete event ones through sql, restore standard spawnpoints or retain/backup for later use. Either way, it is recommended to make regular backups of normal spawnpoints.
Spawnpoints on the Madmin map are colored as follows:
- Green - active spawnspoint with a monster there and known end time
- Blue - inactive spawnspoint without a monster there and known end time
- Red - spawnspoint without known end time, maybe a monster is there, maybe there isn't
Spawnpoints times are as follows:
- 30 minute point - a monster will be active for 30 minutes of the hour and inactive, i.e. no monster, for the other 30 minutes of the hour. If a monster spawns at 00:15, it will be there from 00:15-00:45. There will be no monster from when it despawns at 00:45-00:15.
- 60 minute point - a monster will always be at the point. When the 60 minutes are up, one will despawn and another will show.
- They repeat
- Only one monster can exist at a spawnpoint at any given time.
MADmin map does not auto refresh spawnpoints, so if you want to see updates, you have to manually refresh the page.
Geofence
Do your initialization on an area bigger than you want to end up with scanning. If you go exact, you will miss areas around some of the edges. It is just the way it is, as MAD seems to create a initialization route that bounds all the scan area circles, not provide the most coverage of the area inside fence. Make your fence, calculate the init route and look at the map to see if you need to expand the fence to catch the final intended monster scanning area fully initialized properly.
Initialization Theory
Given that spawns last 30 and 60 minutes, a very solid initialization of an area would to have a worker at a spot at the top of the hour, 20 minutes of the hour and 40 minutes of the hour. Since this is not possible, workable solutions need to be explored.
A separate instance might be too extreme, but efficient initializing can be done on you main instance if done with care. What can mess up your initialization? Anything that reloads settings, whether it be another init finishing, re-calculating a route, pressing the "Apply Settings" button or restarting MAD.
You begin with a geofence assigned to an area. For smaller ones, say 1/4 square mile, I use one worker. For larger ones, I use two workers to ensure good coverage. If your init area seems oddly blank at the end, particularly if you know spawns should be there from real life visits, another worker may help because you have something going on that interrupts it before the single worker reaches the end of the route.
The idea is to have it make several passes over spot in hopes that it gets a good sampling of times in regards to the minutes of the hour. Basically, you don't want to have any gaps in your visits to a initialization coordinate greater than 30 minutes. I am lazy, so I usually set 20 rounds and let it run over night. When I wake up, it is done or completed well enough, I move onto the next step.
A half arsed initialization of one pass is just a waste of time and effort. You came this far to set things up and start the work, might as well do it right or at least make a respectable attempt.
There is no definitive answer to how many rounds you need. It will likely take more than you want or like. Different areas require different amounts, such as an area with clustered spawns may get by with less than an area with distributed spawns. The former could work better as when you start the process to determine end times, the missed spawn points will be found as they are near ones MAD is already examining. Well distributed spawns can't rely on nearby spawns that are known prior, so more rounds are necessary.
ExaltedAngel came up with an initialization method that is worth mentioning, I will outline so that you can have another option for initialization. One can get by with less devices in exchange for more monitoring and risk of something going awry. You will have to ensure that things are setup right, things go as intended and it is monitored responsibly. Setup 3 walkers for 3 devices for initialization of the area in question - have one start at top of the hour, the next at 20 minutes after the hour and the final one at 40 minutes after the hour. Assuming all goes well, they start and stay staggered close enough to their planned travels through the area in such a manner that you get 3 passes of area with gaps in visits reasonably close to the 20 minutes they started with. You will have to watch and babysit the workers to ensure that nothing interferes with the init on MAD's end or a device doesn't go wonky (like a reboot), resulting in a gap of more than 30 minutes between any of the passes for the workers over a routepoint.
Determining end times
In lap mode, you will need end times to know how much is left when a worker happens upon spawn so that alerts can be presented with accurate data. In order for PrioQ to work as designed, MAD needs to find and subsequently know when the spawnpoint becomes active. In order to do this, it needs to know how long the spawnpoint is active and when it ends. The end time data is only available in the last 90 seconds of the spawn, often referred to as TTH (time till hidden).
After you have initialized an area and having "coords_spawns_known" set to false, MAD will make a route to determine end times for spawnpoints without TTH. For further clarification, the name refers to MAD knowing the TTH for the spawn, not the physical location. As the account(s) move through the route, they get the proto data and hopefully get the end times as they travel through the route.
This is where having multiple accounts to throw at things help. Think of it like a roulette wheel. You pick a number, have one ball, spin the table and hope the ball lands on it. Throw more accounts on it, you get more chances to get a ball on your number.
As the account(s) move through the area, they will eventually get the end times. Monitor with the MADmin map by refreshing it in order to reload the latest data in hopes red spawnspots turn to blue or green. When all of the spawnpoints in a circle are blue or green, recalculate the route (it is your call on how many you let it get complete) to generate a shorter route. This will cut down on the points in the route, since you already have known data and don't need to waste time having a worker stop there to collect data from spawnpoints with known TTH. There is a small trade off of time when MAD reallocates the workers to their new task, but that is better than letting them keep going over areas where the data is known. Rinse and repeat until you get them all. In spawn dense areas or ones with overlapping ranges for the worker location or it has been at it for a few hours, don't be afraid to do a recalc and see if MAD can determine a shorter route with less points.
You may find that there are spots where you can't get end times. An event spawnpoint may have snuck in, you won't find it in normal spawn times. From the MADmin map, you can click on the spot and a dialog will popup. Look at the value of 'Last mon seen', if it is not recent you may have a problem with the spot being dead for whatever reason, so delete it. If the value is recent, let your route on the area go down to just one spot (hopefully) and it will be found as last worker will just sit there. If you determine the spot is dead, from the dialog the top number is the ID for that spot. With SQL, go in and delete that spot from the table trs_spawn by the method of your choice.
Intializing and finding end points on multiple areas with multiple workers
You can do multiple areas at once, one just has to be aware of the caveats. I have initialized more than a handful at once. Some could disagree it is a good idea, but it works if done being aware of the situation.
I made the decision to dump and redo all the spawnspoints in town during early Februrary 2020 and start fresh data collection. Lets just say I did 5 areas at a time for the sake of easy math. I used up to 16 workers, but will use 15 as an example as the math is easier.
Do note that quickest area to finish init will re-calc the route to one that attempts to find end times, causing the longer ones to restart initialization. Is it a big deal? I am lazy, so I set init rounds to 20 and just let them run over night. This way the smallest area with the shortest route gets 20 rounds and the rest get more. I will call that acceptable being part of over night team's work.
For initialization, I put all the areas into one walker and put the walker on 15 devices. Each walker area had a max walker value of 3 (15/5=3), so MAD will start at the first entry of the walker, fill it up with 3 workers and move on down the list doing the same. I let them run over night, some had finished init, some had not. So my walker ends up looking like this:
- Area 1, 3 worker limit, coords 00:00-23:59
- Area 2, 3 worker limit, coords 00:00-23:59
- Area 3, 3 worker limit, coords 00:00-23:59
- Area 4, 3 worker limit, coords 00:00-23:59
- Area 5, 3 worker limit, coords 00:00-23:59
Assuming there had been sufficient passes made for initialization, I killed MAD and put it into configmode. I took init off all the 5 areas and removed the max walker limit. I truncated trs_status table to clear the device status and started up MAD again so they start fresh work in the proper area to begin finding TTH. So my walker looks like this:
- Area 1, no worker limit, coords 00:00-23:59
- Area 2, no worker limit, coords 00:00-23:59
- Area 3, no worker limit, coords 00:00-23:59
- Area 4, no worker limit, coords 00:00-23:59
- Area 5, no worker limit, coords 00:00-23:59
From here, the principles are outlined as above for narrowing down end times. Once the first area full enough of workers or completed, the workers just spill over and start working on the next in line. Just keep re-calcing routes when end times are found until you are done. If you notice that devices have long times since getting data, they probably don't have work to do in this worker as there is no spots to be assigned - move them back to their normal duty/areas.
Once workers have gotten to their areas, examine their route length. Click on the route to see the count and pink dots to see how many workers are on the route. If they have long route lengths, this could negatively impact their efficiency finding tth. Think of the situation where one has a route length of 12 and the other 4. The one with for will have a better chance of being there for tth when it has a shorter route, the idea would to be to hope that the round trip time is less than 90 seconds, making it hard to miss tth at any spot. If it has a long router route, say 3 minutes, in theory it could conceivably not be there for any tth. The way to manage this is to have smaller areas, sure it takes more work on your end but a few minutes of setup is better than hours of watching workers not find tth.
When it is almost bedtime or going to be away from tth baby sitting duty, consider spreading out your workers. It is inefficient for them to bounce between a couple points looking for tth that they will find the tth in a few hours, i.e. you end up wasting worker time. Consider spreading them out on remaining areas so that they have a better chance to find tth on more points while you sleep - say route has 40 points, give it 6 workers. Return them the normal no worker limits when you can devote more attention to them.
Directing workers
Sometimes spawnpoints will show up, they may have missed them on initialization or spawnpoints are added to the game around pokestops. Instead of wiping the spawn data and redoing initialization, simply have a spare worker find the end times. I will do this process whenever I can pull a worker off its normal route, such as going to bed or when raids have finished.
On the madmin map, there is a little icon at the bottom right, click on it. With the crosshairs, click on the spawnpoint that is red or center it on multiple red one. A dialog will show, select a worker and set the time to 3600 seconds (1 hour). This will move a worker there and sit it on the spot for an hour, which will find the end time for the spawnpoints.
Let things set for the hour. Don't apply settings, as this seems to reset the worker and put it back to its original task. If the spawnpoint in question turns blue or green, move it to the next red one. If it is still red after the worker has sat there, you can try again or just delete it assuming it is dead.
This technique can also be used to speed up finding spawnpoints over multiple areas. Say area A has 5 positions in the route trying to find end times. If you have workers that have spilled over to other area B & C, you can take them and place on the positions, allowing you to find the spawn end times in just one hour versus who knows how long if left to their own devices.
How does one know that workers have been assigned properly? Mad does not update location of the worker when they have assigned. They are left at the spot along their original route and will not move unless unless MAD makes a change or you move it. You can also feel free to scrcpy into the device if you know what the location looks like.
August 2020 spawn increase
Towards the end of August 2020, pogo increased the spawnpoints. As I like others were actively running when this happened, I deleted all points with unknown tth and backed up my db.
For tasks like this I keep a clone of all my mon areas to make tasks easier. Say I have a regular mon area called "Downtown". I make a clone one called "zDowntown" with spawn_coords_known set to false. I did this for all areas and put them into one worker called "_Todo". In the normal course of duty, if I say a few spawn points without tth known, I just recalc the route for the area and put a worker or two on that walker to find tth. Or I just put my raid worker and have it sit for an hour.
For a quick initialization test, I shutdown MAD and deleted all my prior data from trs_spawn. I started MAD in config mode with -cm flag. I set the areas to init with 20 rounds. I had 33 areas and 39 workers available. For the 6 largest areas, I set the limit to 2 workers with the rest set to 1. I cleared the trs_status table.
Then I fired up a full re-init of my areas. I let it run for a few hours and started to look at tth compared to my backups - I checked 10 random ones around town and saw that tth was within a few seconds, good enough for me. I figured a few spanwpoints may have died, but I will deal with them later.
I stopped MAD and re-imported my prior spawn data. I fired up an init on top of my existing data and let it run 4hrs to pickup most of the spots - admittedly I got impatient and 4 hours made sense at 2am. I figured I would find more spawn spots as workers did their normal things and they did.
MAD was stopped again and put into config mode. All limits on workers were removed for the walker. Init mode for the areas was removed. Started up MAD in find tth mode with spawn_coords_known set to false. So I ended up with 39 workers on 33 areas looking for tth. Refer to the above on how to assign, monitor and/or direct workers.
Workers were allowed to run their normal routes for a week. I then cleaned up the dead spawnpoints per geofence using MAD statistics. Some had less than a percent, with some around 8%.
After several days, I began finding tth for the spots that reappeared. It looks like there was 1000 spots on routes for spawnspots that needed tth. Took me 24hrs using 35 workers.
December 2020 spawn move / increase
Data is still coming in. I saw no new spawnpoints in parks. Some in commercial areas. Most in residential. It also appears that some of these could have been move of spots and deletion of some.
I addressed it by letting workers run their regular routes and just let new spots show up as red dots on madmin map. During evening and night, I went about the business of finding tth for spots by pulling workers off most areas (my users are not usually out at night).
After the spawn increase/change that happened, there was a change in how mad assigns workers to areas when spawn_coords_known is set to false. After the change, mad will fill up the first area with workers on all available coordinates. Say you have two areas, 8 workers and 7 coords with missing tth on both. MAD will assign 7 workers to the first area and 1 will spill over to the second area. Prior to the internal changes, MAD would spread them out - you would likely end up with half on each area.
I can make a case for each way MAD current and used to handle assigning workers with spawn_coords_known. The new method really makes sense if you can sit there and re-calc routes every hour, causing workers to spill down the area list to work on other tth. You are pretty much guaranteed to find the tth of all spots a worker sits on if it is there for an hour unmolested. But it fails the going to bed test - you will only find as many coords as you have workers. Set some worker limits, let the workers do multiple coords overnight and you should get more tth found.
Scan modes
There are two modes for doing mon_mitm scanning. Both involve having the area setting of "coords_spawns_known" set to true and "init" to false. The following is a rudimentary explanation for beginners.
The first mode is what I would call laps or rounds. MAD generates a route to scan all the spawn points in an area and just follows the path. This is set by having "delay_after_prio_event" set to empty and "starve_route" set to false. Assuming you have indeed found all the spawnpoints, I don't really see a point to this mode at any time. You will only get spawns as it passes, which yields less than optimal amounts of time to reach the spawn before they expire - consider how pissed you would be to have an unown spawn with 3 minutes left, odds are with sufficient coverage in PrioQ, you may have gotten an alert with a safe amount of time to travel there. This mode will work if you don't have end times for all the spawns, it doesn't care, it will just make laps around the route. Do note that alerts for spawns that don't have known TTH will be by default of about 2-3 minutes, it may be 59 mintes or 30 seconds, you just don't know for sure.
The second is called PrioQ. This MAD analyzes the spawn times in the area and makes a route to hit them just after the spawn starts. You engage the PrioQ mode by setting "delay_after_prio_event" to say 30 seconds and "starve_route" to true. In order for it to work properly, you should know a vast majority or all of the end times for spawns in the area. The main benefit of this mode that it will yield much longer times for the spawns being active. One downside that PrioQ has is that in the process of bouncing around you may need to have another worker in the area to ameliorate the errors that the MAD console will show when it can't reach a spawn within the given setup parameters. The settings beyond the aforementioned ones are described below - as with many things regarding MAD settings if you don't know, accept the defaults. First place is to watch the logs, if you get lots of yellow skipped warnings, you can change your values, adjust your fence or throw another worker at the existing area.
- delay_after_prio_event -- how long after the event, whether it is a raid hatch or monster spawn, that MAD sends a worker to collect the data. This is in seconds.
- priority_queue_clustering_timedelta -- what time window will MAD use to cluster events. Say a monster spawns at 00:01 and one right next to it at 00:04, you would have to have a cluster of ~180 seconds so that MAD will make just one trip to the spot to get both monster spawns at once instead of making two jumps to get the two spawns.
Which one is for you? I can't answer that. Run it both ways, see what data you like the best from benchmarks.
Setting up your mon scanning
There is no definitive answer on how many spawnpoints a worker will be able to cover. A suburban area will have less density per area for than a good park or downtown area, so a worker will be able to cover more area. Assume you have two areas both 1/2 mi^2, a square one vs a rectangle one, the square will be covered better due to less transit times.
There are a few ways to see if you are covering an area sufficiently. I usually aim for 35-40 points in a route on the status page. If you are not getting alerts with good times, say 25+ minutes (for 30 minute spawnpoints), you might look at changes. When MAD skips a scan in PrioQ, it will kick up an alert in yellow in the session log.
Solutions? Throw more workers at the area, which is what I have done for one of my parks and downtown (this also adds redundancy if one goes down). You can also change your fences. My town's streets are setup on grids and I usually keep my fences aligned to major streets and I am lazy. If a few spawns are missed in areas known for lesser quality of monsters, I don't care enough. Focus on what the areas that are quality.
MAD settings
As always, accept defaults until you have reached the points where you know the ramifications for your changes. MAD settings for the area are for each stage of this process are as follows:
- Initialization
- coords_spawns_known to false
- init to true
- init_mode_rounds to at least 10 - I use 20 and just let things run overnight. When I wake up there is no doubt the area is initialized properly and workers have begun to narrow down TTH. Is it the most efficient way? Probably not, but I don't have the time to sit and watch things run.
- Finding TTH
- coords_spawns_known to false
- init to false
- Production scanning
- coords_spawns_known to true
- lap mode - good enough
- PrioQ
- starve_route to true
- delay_after_prio_event to 30 (seconds)
FAQ
The following are random scanning things that come up for newer users but don't fit cleanly in other areas.
- Routecalc takes too long
- Install ortools
- Consider a smaller area
- I am ready for production scanning, have all green and blue spawn points, but my route has zero length
- You left coords_spawns_known as false from when you were finding tth values. So set coords_spawns_known to true, apply settings and recalc route. Refresh map to show the new route.
- My workers aren't going where they should be even when I have applied settings
- Do you setting changes and apply
- Shutdown MAD
- Empty table trs_status
- Restart MAD
- Monster times left values are about 3 minutes when they are found
- You obviously didn't read this and you don't know the tth for the spawnspot(s)