Pokmon GOmetry Marc van Kreveld Professor in Computational

  • Slides: 66
Download presentation
Pokémon GO-metry Marc van Kreveld Professor in Computational Geometry and its Application Utrecht University

Pokémon GO-metry Marc van Kreveld Professor in Computational Geometry and its Application Utrecht University

Computational Geometry: the study and analysis of geometric algorithms and data structures

Computational Geometry: the study and analysis of geometric algorithms and data structures

Engineering and Science • Not just solving a problem, but understanding solution approaches •

Engineering and Science • Not just solving a problem, but understanding solution approaches • Not just testing how well a solution performs, but proving how well it will always perform (quality and efficiency)

Augmented reality game

Augmented reality game

Augmented reality game

Augmented reality game

200 m

200 m

Modeling the Pokémon GO search problem • The street network is a geometric graph

Modeling the Pokémon GO search problem • The street network is a geometric graph G • The trainer T is a point that can move continuously on G • The Pokémon P is a point anywhere in the plane • The sighting range is a circle centered on T with radius r ( r = 200 m in Pokémon GO) • The catch range is a circle centered on T with radius d ( d = 30 m in Pokémon GO)

Modeling the Pokémon GO search problem • The GPS of the trainer T is

Modeling the Pokémon GO search problem • The GPS of the trainer T is precise and continuous • T knows G, r, and d, and knows when P gets in the catch range The Pokémon GO search problem is to design a strategy for T to get P in the catch range when it gets in the sighting range

? ? Case 1: we came into range Case 2: it was a new

? ? Case 1: we came into range Case 2: it was a new spawn

Searching: competitive analysis • We want a good search strategy • It should minimize

Searching: competitive analysis • We want a good search strategy • It should minimize detour or distance • It ideally works for any geometric graph • A search strategy is c-competitive if its worst detour is a factor c, compared to if we knew … How much can it cost to not know?

Searching: competitive analysis • Best known: finding a door in a wall

Searching: competitive analysis • Best known: finding a door in a wall

Searching: competitive analysis • Best known: finding a door in a wall

Searching: competitive analysis • Best known: finding a door in a wall

Searching: competitive analysis • Best known: finding a door in a wall 8 2

Searching: competitive analysis • Best known: finding a door in a wall 8 2 1 4 We walk: 1 + (1+2) + (2+4) + (4+8) + …

Searching: competitive analysis • Best known: finding a door in a wall 8 2

Searching: competitive analysis • Best known: finding a door in a wall 8 2 1 4 Suppose the door is D = 2 k + 0. 0001 away We walk: 1 + (1+2) + … + (2 k + 2 k+1 ) + 2 k+1 + D < 9 D 9 -competitive

r–d (r – d) (1 + ) Ratio is r–d (1+ )-competitive

r–d (r – d) (1 + ) Ratio is r–d (1+ )-competitive

Theorem: Without the limitation to stay on the graph G, for any > 0,

Theorem: Without the limitation to stay on the graph G, for any > 0, a (1 + )-competitive search strategy exists

Competitive analysis results 1. There are graphs that are not competitively searchable 2. If

Competitive analysis results 1. There are graphs that are not competitively searchable 2. If the graph has convex faces and the outer face is the complement of a convex polygon, then it can be searched competitively 3. If the graph has constant geometric dilation, then it can be searched competitively

r–d d

r–d d

 • Walk around the face to the left, until the sighting disappears •

• Walk around the face to the left, until the sighting disappears • Now T knows exactly where P is, so take the shortest path to the radius-d circle around P

Analysis • The longest convex path inside a circle of radius r is 2

Analysis • The longest convex path inside a circle of radius r is 2 r • T walks at most – this much back – the shortest path from the first sighting location (2 r) + + D • The best possible is the shortest path from the first sighting location D r – d

Analysis • The worst (competitive) ratio is D + 4 r D (r –

Analysis • The worst (competitive) ratio is D + 4 r D (r – d) + 4 r r –d = O(1)

In general this does not always work because: • there may not be a

In general this does not always work because: • there may not be a second boundary point on the graph • if there is a second boundary point, it may be very far away

Bounded geometric dilation Worst detour factor

Bounded geometric dilation Worst detour factor

Bounded geometric dilation Worst detour factor

Bounded geometric dilation Worst detour factor

Bounded geometric dilation Worst detour factor

Bounded geometric dilation Worst detour factor

e

e

e

e

e

e

e only the parts inside the (upper) strip are relevant

e only the parts inside the (upper) strip are relevant

e only the parts closest to e are relevant witnessed by an empty circle

e only the parts closest to e are relevant witnessed by an empty circle with center on the edge

e

e

Strategy shortest paths and edge following e shortest path

Strategy shortest paths and edge following e shortest path

Analysis The function mapping points on e to the closest contact is x-monotone e

Analysis The function mapping points on e to the closest contact is x-monotone e The total length of contact segments is linear in |e| The total jump distance is linear in |e| (not true if we take upper and lower parts together)

|e | = r r+ r r r worst detour factor = r

|e | = r r+ r r r worst detour factor = r

Optimal search is at least r – d = (r) Described strategy searches at

Optimal search is at least r – d = (r) Described strategy searches at most O( r) the strategy is O( )-competitive Theorem: A geometric graph with constant geometric dilation is competitively Pokémon GO searchable

GPS trajectories and imprecision

GPS trajectories and imprecision

Kalman filter Pi-3 Pi-2 Pi-1 GPS-measured reported predicted Pi Pi Pi

Kalman filter Pi-3 Pi-2 Pi-1 GPS-measured reported predicted Pi Pi Pi

Kalman filter Pi-2 Pi-1 Pi

Kalman filter Pi-2 Pi-1 Pi

GPS data imprecision • Walk your buddy or hatch your eggs faster: – At

GPS data imprecision • Walk your buddy or hatch your eggs faster: – At night, place your phone 1 meter from the window – Keep Pokémon Go on – Keep the phone plugged in you gain 300 -1500 meters in a night • Niantic must distinguish between GPS noise and walking around in a small neighborhood use pattern recognition or machine learning on trajectory data

You have seen … • • Computational geometry Search strategies Competitive analysis GPS imprecision

You have seen … • • Computational geometry Search strategies Competitive analysis GPS imprecision and the Kalman filter