cellular automata for pathfinding
Post on 14-Apr-2017
318 Views
Preview:
TRANSCRIPT
Cellular Automata for Pathfinding
A Fault tolerant, Parallelizable incremental approach for real time environments
Steve Wilson
Cellular Automata for pathfinding:Over view:
What is a cellular automataHow it is related to other automata
What is path finding Other approaches to pathfindingWhy a new method ?The cellular approachPros and Cons of using cellular automata
Cellular Automata for pathfinding:What is a cellular automata:
Types of “automata”
Cellular Automata for pathfinding:What is a cellular automata:
Types of “automata” or “machines”
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machine
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machine
One or more states
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machine
One or more statesTransition rules
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machine
One or more statesTransition rules Input
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
One or more states
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
One or more statesTransition rules
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
One or more statesTransition rulesInput
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
One or more statesTransition rulesInputStack
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
Turing machine
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
Turing machineOne or more states
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
Turing machineOne or more statesTransition rules
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automata
Turing machineOne or more statesTransition rulesTape
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automataTuring machine
Cellular Automata
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automataTuring machine
Cellular AutomataTwo or more states
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automataTuring machine
Cellular AutomataTwo or more statesTransition rules
Cellular Automata for pathfinding:What is a cellular automata:
Types of automataFinite state machinePush down automataTuring machine
Cellular AutomataTwo or more statesTransition rulesNeighbor states
Cellular Automata for pathfinding:What is a cellular automata:
Basically
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machines
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
Graph
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphCells are connected by “edges”
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGrid
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGrid
Cells are arranged uniformly in a patternand connected spatially
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGridSubdivision
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGridSubdivision
Used extensively in modeling, cells are connected spatially in a non-uniform manner
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGridSubdivisionSynchronized
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGridSubdivisionSynchronized
Cells update at the same time based on the previous state
Cellular Automata for pathfinding:What is a cellular automata:
Basically a Cellular automata is a collection of connected finite state machinesSubtypes of cellular automata
GraphGridSubdivisionSynchronizedConvergent
Does the automata settle down for all starting states
Cellular Automata for pathfinding:What is a cellular automata:
The Most famous cellular is Conway’s Game of Life
epic game of life
Cellular Automata for pathfinding:What is path finding:
Path finding is the simply finding one or more optimal routes between two or more points while avoiding obstacles
Cellular Automata for pathfinding:What is path finding:
Path finding is the simply finding one or more optimal routes between two or more points while avoiding obstaclesUsed in:
Cellular Automata for pathfinding:What is path finding:
Path finding is the simply finding one or more optimal route between two or more points while avoiding obstaclesUsed in:
Design (circuit boards, chips, plumbing)
Cellular Automata for pathfinding:What is path finding:
Path finding is the simply finding one or more optimal route between two or more points while avoiding obstaclesUsed in:
Design (circuit boards, chips, plumbing) Analysis (critical path)
Cellular Automata for pathfinding:What is path finding:
Path finding is the simply finding one or more optimal route between two or more points while avoiding obstaclesUsed in:
Design (circuit boards, chips, plumbing) Analysis (critical path)Entertainment (goal seeking)
Cellular Automata for pathfinding:Other approaches to pathfinding:
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBasically at each branch you “remember” where you were, and which branch you took
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBasically at each branch you “remember” where you were, and which branch you tookWhen you reach a dead end you go back to the last branch and take a different path
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBasically at each branch you “remember” where you were, and which branch you tookWhen you reach a dead end you go back to the last branch and take a different pathIf the maze has loops or “cycles” depth first can end up going in circles
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBasically at each branch you “remember” where you were, and which branch you tookWhen you reach a dead end you go back to the last branch and take a different pathIf the maze has loops or “cycles” depth first can end up going in circlesThis can be prevented by remembering everywhere you’ve been
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBasically at each branch you “remember” where you were, and which branch you tookWhen you reach a dead end you go back to the last branch and take a different pathIf the maze has loops or “cycles” depth first can end up going in circlesPrevented by remembering everywhere you’ve beenEasy to implement recursively
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also depth known first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Again remembering each branch
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Again remembering each branchExcept at each new intersection, go back to the untried path closest to the starting point
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth first
Cellular Automata for pathfinding:Other approaches to pathfinding:
Backtracking also known as depth firstBreadth firstA* (A star)
At each intersection select the “best” untried path (based on a heuristic)
Cellular Automata for pathfinding:Other approaches to pathfinding:
A* (A star)
Cellular Automata for pathfinding:Other approaches to pathfinding:
A* (A star)
Cellular Automata for pathfinding:Other approaches to pathfinding:
A* (A star)
Cellular Automata for pathfinding:Other approaches to pathfinding:
A* (A star)
Cellular Automata for pathfinding:Shortcomings of existing methods:
Cellular Automata for pathfinding:Shortcomings of existing methods:
They require both a start and endpoint
Cellular Automata for pathfinding:Shortcomings of existing methods:
They require both a start and endpointPotentially slow if the maze is large or there are many entities finding paths at the same time
Cellular Automata for pathfinding:Shortcomings of existing methods:
They require both a start and endpointPotentially slow if the maze is large or there are many entities finding paths at the same timeEach entity has a separate path multiplying the amount of memory needed by the number of entities
Cellular Automata for pathfinding:Shortcomings of existing methods:
They require both a start and endpointPotentially slow if the maze is large or there are many entities finding paths at the same timeEach entity has a separate path multiplying the amount of memory needed by the number of entitiesNot incremental, partial solutions don’t lead to meaningful behavior
Cellular Automata for pathfinding:Shortcomings of existing methods:
They require both a start and endpointPotentially slow if the maze is large or there are many entities finding paths at the same timeEach entity has a separate path multiplying the amount of memory needed by the number of entitiesNot incremental, partial solutions partial solutions don’t lead to meaningful behaviorNot easily distributed
Cellular Automata for pathfinding:Shortcomings of existing methods:
They require both a start and endpointPotentially slow if the maze is large or there are many entities finding paths at the same timeEach entity has a separate path multiplying the amount of memory needed by the number of entitiesNot incremental, partial solutions partial solutions don’t lead to meaningful behaviorNot easily distributed each entity requires a large amount of information
Cellular Automata for pathfinding:Why a new method?:
Cellular Automata for pathfinding:Why a new method?:
Programmers love to reinvent the wheel
Cellular Automata for pathfinding:Why a new method?:
Programmers love to reinvent the wheelThe new algorithm might be better
Cellular Automata for pathfinding:Why a new method?:
Programmers love to reinvent the wheelThe new algorithm might be betterTo address shortcomings in existing methods
Cellular Automata for pathfinding:Why a new method?:
Programmers love to reinvent the wheelThe new algorithm might be betterTo address shortcomings in existing methodsTo learn something
Cellular Automata for pathfinding:Why a new method?:
Programmers love to reinvent the wheelThe new algorithm might be betterTo address shortcomings in existing methodsTo learn something (life long learning is important)
Cellular Automata for pathfinding:How does this method work?:
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall‘G’ the cell is a goal (there can be multiple goals)
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall‘G’ the cell is a goal1…10,000 the cell is passable
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall‘G’ the cell is a goal1…10,000 the cell is passable
The transitions are:
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall‘G’ the cell is a goal1…10,000 the cell is passable
The transitions are:‘W’ -> ‘W’ Walls don’t change
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall‘G’ the cell is a goal1…10,000 the cell is passable
The transitions are:‘W’ -> ‘W’‘G’ -> ‘G’ Goals don’t change
Cellular Automata for pathfinding:How does this method work?:
The states of the automata are as follows:‘W’ the cell is a wall‘G’ the cell is a goal1…10,000 the cell is passable
The transitions are:‘W’ -> ‘W’‘G’ -> ‘G’1…10,000 -> one more than its lowest value neighbor. Where ‘G’ has a value of zero
Cellular Automata for pathfinding:How does this method work?:
The passages are initialized to a random passage value (in the demo initialized to 1 for clarity)
Cellular Automata for pathfinding:How does this method work?:
The passages are initialized to a random passage value The walls are initialized to ‘W’
Cellular Automata for pathfinding:How does this method work?:
The passages are initialized to a random passage value The walls are initialized to ‘W’The goals are initialized to ‘G’
Cellular Automata for pathfinding:How does this method work?:
The passages are initialized to a random passage value The walls are initialized to ‘W’The goals are initialized to ‘G’The automata is stepped either synchronously or asynchronously
Cellular Automata for pathfinding:How does this method work?:
The passages are initialized to a random passage value The walls are initialized to ‘W’The goals are initialized to ‘G’The automata is stepped either synchronously or asynchronously Each entity can simply move to a neighboring cell with a lower value, going “downhill” to player
Cellular Automata for pathfinding:How does this method work?:
A simple example
W W W W W WW G 9 7 1 WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A simple example
W W W W W WW G 1 2 8 WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A simple example
W W W W W WW G 1 2 3 WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A more complicated example
W W W W W WW 1 9 7 1 WW 7 W 5 W WW 8 5 3 G WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A more complicated example
W W W W W WW 8 2 2 8 WW 2 W 4 W WW 6 4 1 G WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A more complicated example
W W W W W WW 3 3 3 3 WW 7 W 2 W WW 5 2 1 G WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A more complicated example
W W W W W WW 4 4 3 4 WW 4 W 2 W WW 8 2 1 G WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A more complicated example
W W W W W WW 5 4 3 4 WW 4 W 2 W WW 8 2 1 G WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
A more complicated example
W W W W W WW 5 4 3 4 WW 4 W 2 W WW 8 2 1 G WW W W W W W
Cellular Automata for pathfinding:How does this method work?:
Demo Here:
Cellular Automata for pathfinding:Pros and cons:
Cellular Automata for pathfinding:Pros :
The cellular automata can be shared by entities
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributed
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributed
Each cell only needs to know about its closest neighbors
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributed
Each cell only needs to know about its closest neighborsThe cells don’t need to update synchronously
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between frames
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between frames
Entities will naturally move out of dead ends even before the path information fully propagates
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between framesFault tolerant
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between framesFault tolerant
A passage can be blocked to reflect changes in the maze
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between framesFault tolerant
A passage can be blocked to reflect changes in the mazeGoals can be moved
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between framesFault tolerant
If a passage is blocked, or the goal movesGoals can be movedContinue to use the existing automata as it updates
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between framesFault tolerant
If a passage is blocked, or the goal movesGoals can be movedContinue to use the existing automata as it updates
Cellular Automata for pathfinding:Pros:
The cellular automata can be shared by entitiesEasily distributedIncremental the automata can be iterated between framesFault tolerant
If a passage is blocked, or the goal movesContinue to use the existing automata as it updates
Unreachable areas are easily detected
Cellular Automata for pathfinding:Cons:
Cellular Automata for pathfinding:Cons:
Requires enough memory to hold the search space
Cellular Automata for pathfinding:Cons:
Requires enough memory to hold the search spaceFor a single entity takes more processing than other methods
Cellular Automata for pathfinding:In closing:
This Cellular Automata provides an incremental, fault tolerant, performant pathfinding solution
Cellular Automata for pathfinding:References:
Ascani, E (2011, October 4). Epic Game of Life. Retrieved April 4, 2016, from https://www.youtube.com/watch?v=C2vgICfQawE Codd, E. F. (1968). Cellular automata [Http://dl.acm.org/citation.cfm?id=1098682]. New York: Academic Press. Retrieved April 4, 2016. DeAngelis, M. (2016, February 29). Cat Maze Disguised as Bookshelves. Retrieved April 4, 2016, from http://www.cluttermagazine.com/news/2016/02/cat-maze-disguised-bookshelves Gardner, M. (1983). Wheels, life, and other mathematical amusements (Chp 20-22). New York: W.H. Freeman. Levy, S. (1993). Artificial life: A report from the frontier where computers meet biology. New York: Vintage Books. Pajot, T. (n.d.). Printed Circuit Board. Retrieved April 4, 2016, from http://www.123rf.com/photo_10607345_printed-circuit-board.html
top related