22
Catch Me If You Catch Me If You Can Can Group 20 Group 20 B94902027 B94902027 鍾鍾鍾 鍾鍾鍾 B94902067 B94902067 鍾鍾鍾 鍾鍾鍾 B94902080 B94902080 鍾鍾鍾 鍾鍾鍾

Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Catch Me If You CanCatch Me If You CanGroup 20Group 20

B94902027B94902027 鍾政達鍾政達B94902067B94902067 陳建男陳建男B94902080B94902080 何雨帆何雨帆

Page 2: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Rules of the GameRules of the Game

Two agents playing human and ghost Two agents playing human and ghost respectivelyrespectively The ghost agent’s goal is to catch the The ghost agent’s goal is to catch the human agenthuman agent The human agent’s goal is to avoid being The human agent’s goal is to avoid being caught by the ghost in a roundcaught by the ghost in a round

Page 3: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

The EnvironmentThe Environment

The map will be an 39x39 bitmap inputThe map will be an 39x39 bitmap input Human is in the lowerHuman is in the lower right corner at the right corner at the beginningbeginning Ghost is in the upper left corner at the Ghost is in the upper left corner at the beginningbeginning

Page 4: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

The Strategy: Human (Ver.1)The Strategy: Human (Ver.1)

Construct a heuristic to define the Construct a heuristic to define the “degree of danger” of each node“degree of danger” of each node When ghost appears, plan an escaping When ghost appears, plan an escaping route base on the heuristicroute base on the heuristic After we reached the goal, if the ghost is After we reached the goal, if the ghost is not in sight, keep rotating and scannot in sight, keep rotating and scan

Page 5: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

State Diagram (Ver.1)State Diagram (Ver.1)

Ghost Insight

Route PlanningRotating Scan

Goal Reached Walking

Page 6: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

The Heuristic Function The Heuristic Function

Heuristic(x, y)Heuristic(x, y) = DegreeOfDanger(x, y)= DegreeOfDanger(x, y) = Combine((DistanceToGhost(x, y),= Combine((DistanceToGhost(x, y),

Compact (x, y))Compact (x, y))

Page 7: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Definition of CompactnessDefinition of Compactness

Check the 7x7 array Check the 7x7 array centered by (x, y)centered by (x, y)Sum up the number Sum up the number of those bits that are of those bits that are black (obstacle) black (obstacle)

Page 8: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Map of Compactness

Page 9: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Combination of Distance & Combination of Distance & CompactnessCompactness

Naïve wayNaïve wayDanger = Compact – k * DistanceDanger = Compact – k * DistanceOur wayOur way

400 – Compact 400 – Compact Compact Compact Danger = Danger = ─────── + ──────────── + ─────

10 * Distance 4 10 * Distance 4What is this!?

Page 10: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Why Bother?Why Bother? Compact + NearCompact + Near Empty + NearEmpty + Near Compact + FarCompact + Far Empty + FarEmpty + Far

** The ranges The ranges between these four between these four statuses should statuses should equal to each otherequal to each other

Page 11: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Refinement 1: Rotating StateRefinement 1: Rotating State

Full speed of ghost & human are similar Full speed of ghost & human are similar Turning becomes a deterministic pointTurning becomes a deterministic point Human should avoid turning as much as Human should avoid turning as much as

it canit can The “Rotating Scan” state becomes a The “Rotating Scan” state becomes a

vulnerable point!vulnerable point!

Page 12: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Refinement 2: Keep WalkingRefinement 2: Keep Walking

The sight of pioneer 3DX robot is narrow The sight of pioneer 3DX robot is narrow It is likely that the ghost is chasing us but It is likely that the ghost is chasing us but

we dose not noticewe dose not notice Staying at the same point do no goodStaying at the same point do no good Keep walking!Keep walking!

Page 13: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Moving Method

Avoid Collision Adjust Velocity No Rotate + Keep Walking = Drift

Page 14: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Drift: No Rotate

Search 10 nodes away from our current position base on the direction on the mapCheck if there are any obsticles between the node and usPick the farrest node as the “short goal” and go staight toward it

Page 15: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Drift: No Rotate

Page 16: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Why 10 Nodes?

Page 17: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

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

Page 18: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

State Diagram (Ver.2)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

Page 19: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Refinement 3: Ghost InsightRefinement 3: Ghost Insight

If the ghost is too close to usIf the ghost is too close to us Rotate becomes time wastingRotate becomes time wasting Two kinds of “Ghost Insight”: Near & FarTwo kinds of “Ghost Insight”: Near & Far Changes the direction while moving! Changes the direction while moving!

Page 20: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

Ghost Insight & NearGhost Insight & Near

Dash Route 1Dash Route 1 Dash Route 2Dash Route 2

Page 21: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

State Diagram (Final Version)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

Dash Ghost: Far

Ghost: Near

Page 22: Catch Me If You Can Group 20 B94902027 鍾政達 B94902067 陳建男 B94902080 何雨帆

The EndThe EndThanks for your attentionThanks for your attention