Upload
ambrose-fowler
View
220
Download
0
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
Catch Me If You CanCatch Me If You CanGroup 20Group 20
B94902027B94902027 鍾政達鍾政達B94902067B94902067 陳建男陳建男B94902080B94902080 何雨帆何雨帆
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
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
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
State Diagram (Ver.1)State Diagram (Ver.1)
Ghost Insight
Route PlanningRotating Scan
Goal Reached Walking
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))
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)
Map of Compactness
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!?
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
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!
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!
Moving Method
Avoid Collision Adjust Velocity No Rotate + Keep Walking = Drift
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
Drift: No Rotate
Why 10 Nodes?
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
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
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!
Ghost Insight & NearGhost Insight & Near
Dash Route 1Dash Route 1 Dash Route 2Dash Route 2
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
The EndThe EndThanks for your attentionThanks for your attention