– The entire set of possible states is called the state space. • The initial state is the state the agent begins in. • A goal state is a state where the agent ...
Download State Space Search: Uninformed Methods in AI and more Study notes Artificial Intelligence in PDF only on Docsity!
State Space Search
Overview
Problem-solving as search
How to formulate an AI problem as search.
Uninformed search methods
Environmental factors needed
Static — The world does not change on its own, and our actions don't change it.
Discrete — A finite number of individual states exist rather than a continuous space of options.
Observable — States can be determined by observations.
Deterministic — Action have certain outcomes.
The environment is all the information about the world that remains constant while we are solving the problem.
A state is a set of properties that define the current conditions of the world our agent is in. - Think of this as a snapshot of the world at a given point in time. - The entire set of possible states is called the statespace.
The initial state is the state the agent begins in.
A goal state is a state where the agent may end the search.
An agent may take different actions that will lead the agent to new states.
Formulating problems as search
Define:
What do my states look like?
What is my initial state? What are my goal state(s)? What does the state space "look like?" Is is a graph or a tree?
What is my cost function?
How do I know how "good" a state or action is?
Usually desirous to minimize, rather than maximize.
Usually phrased as a function of the path from the initial state to a goal state.
Formulating problems as search
Solution:
A path between the initial state and a goal state.
Quality is measured by path cost.
Optimal solutions have the lowest cost of any possible path.
There are two simultaneous graph-ish structures used in search: - (1) Tree or graph of underlying state space. - (2) Tree maintaining the record of the current search in progress (the search tree ).
(1) does not depend on the current search being run.
(1) is sometimes not even stored in memory (too big!)
(2) always depends on the current search, and is always stored in memory.
Recap
What things do we need to define in order to formulate a problem as a search problem?
Trees vs graphs
If your search space is a tree, that implies there is only one path from the start state to any goal state. - Equivalently: only one sequence of actions for each possible goal state.
Search tree
Frontier: a data structure storing the collection of nodes that are available to be examined next in the algorithm. - Often represented as a stack, queue, or priority queue.
Explored set: stores the collection of states we have already examined (and therefore don’t need to look at again). - Often stored using a data structure that enables quick look-up for membership tests.
How do you evaluate a search
strategy?
Completeness — Does it always find a solution if one exists?
Optimality — Does it find the best solution?
Time complexity
Space complexity
Frontier = stack, queue, or priority queue. Explored set = hash table.