2017/09/28 maze solver …yzhan442/teaching/cse355/lectures/...o pushdown automata q definition of...
TRANSCRIPT
Human-awareRobo.cs
1
Automata in the Real World • 2017/09/28
• Maze solver
https://stephenwattam.com/projects/maize/
Ø Announcement: q Project announced: due Friday Oct 20, 11:59PM
q Poll 2 to be announced
q Slides for this lecture are here:
http://www.public.asu.edu/~yzhan442/teaching/CSE355/Lectures/PROJECT.pdf
Slides using materials from Steve Wattam & John Vidler at stephenwattam.com
Human-awareRobo.cs
2
Last time
FA (DFA & NFA) express Regular Expressions (RE)
• Context free langauges
o Context free grammars
o Pushdown automata
q Definition of PDA
q Computation PDA
q Design of PDA
q PDA and CFG
q DPDA vs NPDA
Ø Goals:
o Learned how to design PDA
o Equivalence of PDA and CFG
o Learned about DPDA
CFL
Human-awareRobo.cs
3
Outline for today • Project details
Ø Goals:
o Learn to use FA and PDA in
real-world applications
Human-awareRobo.cs
4
Project: Maze Solving • Maze
o Find a path from start to goal
• Why is it hard?
Human-awareRobo.cs
5
Project: Maze Solving • Maze
o Find a path from start to goal
• Why is it hard?
o Limited memory and processing power
Human-awareRobo.cs
6
Maze solving • Mice are maze solvers
• Compete in many competitions, solving
real-life mazes
• Limited memory and processing power
how does it compare to a FA or PDA?
Human-awareRobo.cs
7
• Stateless (reactive) agent: e.g., FA
Maze solving
Human-awareRobo.cs
8
Maze solving • Stateful (deliberative) agent: e.g., PDA
Human-awareRobo.cs
9
Project • FA implementation
o The FA controller keeps running until the bot has reached the end of the maze: it has no finishing state.
o The controller is only reset when it reaches a node that does not have any outgoing transitions.
o Transitions between states are specified using boolean expressions. If they evaluate to true, the transition can
o be made.
o The robot will only move when it is in a state named {F(orward), B(ackword), L(eft), R(ight)}. If no transitions
can be made, the robot will stay in that state.
o At any step, the controller transitions until reaching an action state (i.e., a state with name in {F, B, L, R}), and
the corresponding movement will be executed.
o You can have multiple states with the same name; you can have non-action state.
Turns the robot right when there are walls or obstacles ahead and free on the right; otherwise it moves the robot forward
Human-awareRobo.cs
10
Project • PDA implementation
o The FA controller keeps running until the bot has reached the end of the maze: it has no finishing state.
o The controller is only reset when it reaches a node that does not have any outgoing transitions.
o The PDA controls the bot by leaving symbols on the stack.
o You don’t have to read to the end of the tape.
o The robot will only move when action symbols {F, B, L, R} are left on the stack. If there are multiple action
symbols left, they are executed in reversed order.
o If no transitions can be made, the robot will stay in that state.
o At any step, the controller transitions until at least an action symbol is left on the stack, and the corresponding
o movement(s) will be executed.
o You can write other symbols onto the stack as well.
Goes forward until it runs against a wall or obstacle and then turn left.
Human-awareRobo.cs
11
Environment • Baffle
Human-awareRobo.cs
12
• Circle
Environment
Human-awareRobo.cs
13
• Depth first search
Environment
Human-awareRobo.cs
14
Environment • Empty
Human-awareRobo.cs
15
• Line
Environment
Human-awareRobo.cs
16
• Regular scatter
Environment
Human-awareRobo.cs
17
Software tool: Maize (on Blackboard)
Human-awareRobo.cs
18
Outline for today
• Reading assignment for the next class:
o Sipser Sec. 2.3 – Quiz link will be sent out;
due date is before the beginning of the
next class
o Sec. 2.4 is optional reading (given what we
have covered about DPDA)
• Project details
Ø Goals:
o Learned to use FA and PDA in
real-world applications