Please enable JavaScript.
Coggle requires JavaScript to display documents.
Goal-based agents – Pathfinding, Reflex and goal-based agents - making…
Goal-based agents – Pathfinding
Problem-solving - having GOALS
(FSM requires an initial state - everything follows from that. )
Well-defined problem
Set of possible actions
Transition model
Initial state
Goal test
Path cost function
State Space (State = node, Transition = edge)
Representation of Data
Weighted Edge
Nodes and Edges
Digraph
Where edges have different costs
Nodes specifying a directed edge = ordered pair
With directed edges
Graph = Network
Website index Circuit
Human proteins
Tile-based game (grid)
Steps of searches
Visit every node (in what order?)
Find best path to target
Get to the target
Best path to target using least effort
Types of searches
BFS - Breadth First Search
A* Search
DFS - Depth First Search
Reflex and goal-based agents - making decisions
Finite State Machine
(State depends on old state + input)
Transitions between states
Rules and conditions that lead to transition
State defines behaviour and produces action
Input events = triggers
Two types
Non-deterministic = unpredictable
Deterministic = predictable
Embed in classes
(Logic embedded in state class is called: State Design Pattern architecture)
Importance
Relatively simple to code
Easy to debug - each state separate object
Follows hard-coded rules so less processing power
Intuitive to model
Flexible
Can represent its own history