Download presentation
Presentation is loading. Please wait.
Published byAmbrose Fowler Modified over 9 years ago
1
Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆
2
Rules of the Game Two agents playing human and ghost respectively Two agents playing human and ghost respectively The ghost agent’s goal is to catch the human agent The ghost agent’s goal is to catch the human agent The human agent’s goal is to avoid being caught by the ghost in a round The human agent’s goal is to avoid being caught by the ghost in a round
3
The Environment The map will be an 39x39 bitmap input The map will be an 39x39 bitmap input Human is in the lower right corner at the beginning Human is in the lower right corner at the beginning Ghost is in the upper left corner at the beginning Ghost is in the upper left corner at the beginning
4
The Strategy: Human (Ver.1) Construct a heuristic to define the “degree of danger” of each node Construct a heuristic to define the “degree of danger” of each node When ghost appears, plan an escaping route base on the heuristic When ghost appears, plan an escaping route base on the heuristic After we reached the goal, if the ghost is not in sight, keep rotating and scan After we reached the goal, if the ghost is not in sight, keep rotating and scan
5
State Diagram (Ver.1) Ghost Insight Route PlanningRotating Scan Goal ReachedWalking
6
The Heuristic Function Heuristic(x, y) = DegreeOfDanger(x, y) = DegreeOfDanger(x, y) = Combine((DistanceToGhost(x, y), = Combine((DistanceToGhost(x, y), Compact (x, y))
7
Definition of Compactness Check the 7x7 array centered by (x, y) Sum up the number of those bits that are black (obstacle)
8
Map of Compactness
9
Combination of Distance & Compactness Naïve way Danger = Compact – k * Distance Our way 400 – Compact Compact Danger = ─────── + ───── 10 * Distance 4 What is this!?
10
Why Bother? Compact + Near Compact + Near Empty + Near Empty + Near Compact + Far Compact + Far Empty + Far Empty + Far * The ranges between these four statuses should equal to each other
11
Refinement 1: Rotating State Full speed of ghost & human are similar Turning becomes a deterministic point Human should avoid turning as much as it can The “Rotating Scan” state becomes a vulnerable point!
12
Refinement 2: Keep Walking The sight of pioneer 3DX robot is narrow It is likely that the ghost is chasing us but we dose not notice Staying at the same point do no good Keep walking!
13
Moving Method Avoid Collision Adjust Velocity No Rotate + Keep Walking = Drift
14
Drift: No Rotate Search 10 nodes away from our current position base on the direction on the map Check if there are any obsticles between the node and us Pick the farrest node as the “short goal” and go staight toward it
15
Drift: No Rotate
16
Why 10 Nodes?
17
Drift: Keep Walking Update the short goal by watch dog (we may never reach the short goal) Change the speed of both wheels to adjust the direction while forwarding
18
State Diagram (Ver.2) Goal Reached On Its Way To the Goal Build up the Ghost Map Ghost Insight Plan Route Build up the Compactness Map Build up the NextGoal Map
19
Refinement 3: Ghost Insight If the ghost is too close to us Rotate becomes time wasting Two kinds of “Ghost Insight”: Near & Far Changes the direction while moving!
20
Ghost Insight & Near Dash Route 1 Dash Route 2
21
State Diagram (Final Version) Goal Reached On Its Way To the Goal Build up the Ghost Map Ghost Insight Plan Route Build up the CompactMap Build up the NextGoalMap DashGhost: Far Ghost: Near
22
The End Thanks for your attention
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.