ArticleslgStudy

computer science

State-space search

State-space search is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand State-space search rather than just read about it. In short: State-space search is a process used in the field of computer science, including artificial intelligence (AI), in which successive configurations or states of an instance are considered, with the intention of finding a goal state with the desired property. Problems are often modelled as a state space, a set of states that a problem can be in.

Key takeaways

  • State-space search belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect State-space search to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of State-space search from memory before moving on to harder problems.

Reference excerpt

State-space search is a process used in the field of computer science, including artificial intelligence (AI), in which successive configurations or states of an instance are considered, with the intention of finding a goal state with the desired property. Problems are often modelled as a state space, a set of states that a problem can be in. The set of states forms a graph where two states are connected if there is an operation that can be performed to transform the first state into the second. State-space search often differs from traditional computer science search methods because the state space is implicit: the typical state-space graph is much too large to generate and store in memory. Instead, nodes are generated as they are explored, and typically discarded thereafter. A solution to a combinatorial search instance may consist of the goal state itself, or of a path from some initial state to the goal state.

Representation In state-space search, a state space is formally represented as a tuple S : ⟨ S , A , Action ⁡ ( s ) , Result ⁡ ( s , a ) , Cost ⁡ ( s , a ) ⟩ {\displaystyle S:\langle S,A,\operatorname {Action} (s),\operatorname {Result} (s,a),\operatorname {Cost} (s,a)\rangle } , in which:

S {\displaystyle S} is the set of all possible states;

A {\displaystyle A} is the set of possible actions, not related to a particular state but regarding all the state space;

Action ⁡ ( s ) {\displaystyle \operatorname {Action} (s)} is the function that establishes which action is possible to perform in a certain state;

Result ⁡ ( s , a ) {\displaystyle \operatorname {Result} (s,a)} is the function that returns the state reached performing action a {\displaystyle a} in state s {\displaystyle s} ;

Cost ⁡ ( s , a ) {\displaystyle \operatorname {Cost} (s,a)} is the cost of performing an action a {\displaystyle a} in state s {\displaystyle s} . In many state spaces, a {\displaystyle a} is a constant, but this is not always true.

Examples of state-space search algorithms

Uninformed search According to Poole and Mackworth, the following are uninformed state-space search methods, meaning that they do not have any prior information about the goal's location.

Traditional depth-first search Breadth-first search Iterative deepening Lowest-cost-first search / Uniform-cost search (UCS)

Informed search These methods take the goal's location in the form of a heuristic function. Poole and Mackworth cite the following examples as informed search algorithms:

Informed/Heuristic depth-first search Greedy best-first search A* search

See also State space State-space planning Branch and bound – Method for making state-space search more efficient by pruning subsets of it

References

Stuart J. Russell and Peter Norvig (1995). Artificial Intelligence: A Modern Approach. Prentice Hall.

Worked examples

Example 1 — a first encounter with State-space search

Start with the simplest possible case. Write down what State-space search claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to State-space search before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about State-space search ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of State-space search

In research
State-space search appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses State-space search in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
State-space search is common in secondary-school and first-year university syllabi. It links to neighbouring topics Artificial intelligence stubs, Search algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for State-space search outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study State-space search in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what State-space search means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain State-space search out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is State-space search in simple terms?

State-space search is a process used in the field of computer science, including artificial intelligence (AI), in which successive configurations or states of an instance are considered, with the intention of finding a goal state with the desired property. Problems are often modelled as a state spa…

Why does State-space search matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study State-space search?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on State-space search.

Tags

  • Artificial intelligence stubs
  • Search algorithms

Keep exploring