SEARCH Flashcards
An entity that perceives its environment and acts upon that environment.
Agent
A configuration of an agent in its environment
State
The state from which the search algorithm starts
Initial State
Choices that can be made in a state.
Actions
A description of what state results from performing any applicable action in any state
Transition Model
The set of all states reachable from the initial state by any sequence of actions.
State Space
The condition that determines whether a given state is a goal state
Goal Test
A numerical cost associated with a given path
Path Cost
A sequence of actions that leads from the initial state to the goal state.
Solution
A solution that has the lowest path cost among all solutions.
Optimal Solution
Node - a data structure that contains the following:
- A state
- Its parent node
- Action
- Path cost
The mechanism that “manages” the nodes
Frontier
Exhausts each one direction before trying another direction
Depth-First Search Algorithm
In depth-first search, the frontier is managed as a ____
stack data structure
Pros and Cons of depth-first search
Pros:
1. At best, this algorithm is the fastest. If it “lucks out” and always chooses the right path to the solution (by chance), then depth-first search takes the least possible time to get to a solution.
Cons:
1. It is possible that the found solution is not optimal.
2. At worst, this algorithm will explore every possible path before finding the solution, thus taking the longest possible time before reaching the solution.
Opposite of depth-first search
breadth-first search
This algorithm follows multiple directions at the same time, taking one step in each possible direction before taking the second step in each direction
breadth-first search algorithm
In breadth-first search, the frontier is managed as a ____
queue data structure
Pros and Cons of breadth-first search
Pros:
1. This algorithm is guaranteed to find the optimal solution.
Cons:
1. This algorithm is almost guaranteed to take longer than the minimal time to run.
2. At worst, this algorithm takes the longest possible time to run.
A type of algorithm that considers additional knowledge to try to improve its performance
informed search algorithm
This algorithm do not utilize any knowledge about the problem that they did not acquire through their own exploration
uninformed search algorithm
Expands the node that is the closest to the goal, as determined by a heuristic function h(n).
Greedy best-first search
the function that estimates how close to the goal the next node is
heuristic function
ignores walls and counts how many steps up, down, or to the sides it would take to get from one location to the goal location
Manhattan distance