3 - uninformed search Flashcards
problem-solving agent
an agent that can figure out the best ocurse of action for a specific situation
the problem of designing goal-based agents
Solution: fixed sequence of actions
Search: looking for the sequence of actions that reaches the goal
Agent: can ignore percepts during execution
Objectives of a problem solving agent
-formulate appropriate problems as search tasks
-know the fundamental search strategies and algorithms
-evaluate the suitability of a search strategy for a problem
Search problem components
♥ Initial state
♥ Goal state
♥ Path cost
♥ Successor Function: result of doing an action in a state
♥ Optimal solution: sequence of actions with the lowest path cost for reaching the goal
State Space
The set of all states reachable from initial state by any sequence of actions
Tree Search
Begin at the root node (starting state) and expandit by making a list of all possible successor states - keep going until you reach required state
///algorithm outline - upon ititialisation we choose a fringe and expand upon that according to our search strategy;; to avoid repeated states, we keep an explored set every time we expand it, meaning that every time you add a node to the fringe, check whether it already exists in the fringe with a higher path cost, and if yes, replace that node with the new one
Uninformed search strategies -
Breadth-first search (BFS)
Expand shallowest unexpanded node, fringeis a FIFO queue, i.e., new successors go at end (so we go by ‘layers’ - first the highest layers, then deeper)
Uninformed search strategies -
Depth-first search (DFS)
Expand deepest unexpanded node - like Breadth-first search but we first search the lowest layer, then check the highest ones
Uninformed search strategies -
Uniform-cost search (UCS)
Expand least-cost unexpanded node - fringe ordered by path cost (priority queue) * Equivalent to breadth-first if step costs all equal
Uninformed search strategies -
Iterative deepening search (IDS)
To keep DFS from wandering down an infinite path
1.Check the root 2.Do a DFS searching for a path of length 1 3.If there is no path of length 1, do a DFS searching for a path of length 2 4.If there is no path of length 2, do a DFS searching for a path of length 3…….
IDDFS calls DFS for different depths starting from an initial value. In every call, DFS is restricted from going beyond given depth. So basically we do DFS in a BFS fashion.
Search strategies
picking the order of node expansion based on criteria:
- Completeness
- Optimality
- Time complexity
- Space complexity