Uninformed Search Strategies in Artificial Intelligence
Understand Uninformed Search in Artificial Intelligence and explore its major algorithms: Breadth-First Search, Uniform Cost Search, Depth-First Search, Depth-Limited Search, and Iterative Deepening Search.
Imagine you are inside a maze. You know where you started and where the exit is, but you have no map, no directions, and no information about which path is more likely to lead you out.
What would you do?
You might explore one path at a time, return when you reach a dead end, or examine all nearby paths before moving further.
A computer faces a similar problem when it needs to find a solution without knowing which direction is best.
In Artificial Intelligence, this approach is known as Uninformed Search.
In the previous article, we introduced search strategies and divided them into two major categories: informed and uninformed search.
Now, let’s understand how uninformed search works, why it is called blind search, and which algorithms use this approach.
What Is Uninformed Search?
Uninformed Search is a search strategy in which an algorithm explores possible states without using additional information about how close they are to the goal.
It knows the initial state, available actions, transition model, and goal test. However, it does not use a heuristic function to estimate which state is more promising.
In simple words, the algorithm knows where it is, what it can do, and what it needs to find, but it does not know which direction is likely to be the best.
For example, imagine a robot searching for an exit in a maze. It knows its starting position and can identify the available movements, but it has no information about the distance to the exit.
It must explore the maze according to its search strategy.
This is why Uninformed Search is also called Blind Search.
1. How Does Uninformed Search Work?
An uninformed search algorithm begins with the initial state and explores the possible states by applying available actions.
The general process looks like this:
- Start from the initial state.
- Check whether the current state is the goal.
- If it is not the goal, identify the possible next states.
- Select the next state according to the search strategy.
- Continue exploring until a goal is found or no more states can be explored.
The important difference between uninformed search algorithms is how they select the next state to explore.
Some algorithms explore the shallowest states first. Others explore one path deeply before returning to another. Some consider the cost of reaching a state.
The search strategy determines the order in which possibilities are examined.
2. Types of Uninformed Search Algorithms
There are several uninformed search algorithms. Each follows a different method of exploring the search space.
Let’s introduce the major ones.
A. Breadth-First Search (BFS)
Breadth-First Search explores the search tree level by level.
It first examines the initial state, then all its immediate successors, followed by the next level of states.
Imagine searching for a person in a network of friends. You first check your direct friends, then the friends of those friends, and continue outward.
BFS follows the same idea.
It uses a queue, which follows the First In, First Out (FIFO) principle. The state that enters the queue first is explored first.
BFS is complete when the branching factor is finite. It also finds the shallowest solution and is optimal when all actions have equal cost.
However, it can require a large amount of memory because it stores many states at the same level.
We will study its working and implementation in detail in the next article.
B. Uniform Cost Search (UCS)
Sometimes, finding the solution with the fewest steps is not enough.
Imagine travelling between two cities. One route may involve fewer roads but have a much higher total travel cost. Another route may involve more roads but be cheaper.
Uniform Cost Search considers the total path cost when deciding which state to explore next.
It always expands the state with the lowest accumulated path cost.
UCS uses a priority queue, where states with lower path costs receive higher priority.
Unlike BFS, which explores according to depth, UCS explores according to cost.
It is complete and optimal when every action has a cost greater than some positive minimum value.
We will examine its working and implementation separately.
C. Depth-First Search (DFS)
Depth-First Search follows a different approach.
Instead of exploring all nearby states first, it follows one path as deeply as possible before returning to explore another path.
Imagine entering a maze and choosing one corridor. You continue moving along that corridor until you reach the exit or a dead end. If you reach a dead end, you return to an earlier position and try another route.
DFS follows this idea.
It commonly uses a stack, which follows the Last In, First Out (LIFO) principle.
DFS can use less memory than BFS because it does not need to store every state at the current level.
However, it may follow a very long or infinite path without finding a solution, even when another path contains the goal. It is not generally optimal either.
D. Depth-Limited Search (DLS)
Depth-Limited Search is a variation of Depth-First Search.
The problem with ordinary DFS is that it can continue exploring deeper and deeper states, especially when the search space contains infinite paths.
Depth-Limited Search addresses this by setting a maximum depth.
For example, if the depth limit is 3, the algorithm will not explore states beyond level 3.
This prevents the search from continuing indefinitely along one path.
However, if the goal is located beyond the chosen depth limit, the algorithm will not find it.
Therefore, selecting an appropriate depth limit is important.
E. Iterative Deepening Search (IDS)
Iterative Deepening Search combines ideas from Breadth-First Search and Depth-First Search.
It repeatedly performs Depth-Limited Search, increasing the depth limit after each unsuccessful attempt.
For example:
- First search: depth limit 0.
- Second search: depth limit 1.
- Third search: depth limit 2.
- Fourth search: depth limit 3.
The process continues until the goal is found.
At first, this may seem inefficient because the algorithm explores some states repeatedly.
However, it has an important advantage: it combines the low memory requirements of DFS with the ability to find a shallowest solution like BFS when all step costs are equal.
IDS is complete for finite branching spaces and optimal when all actions have equal cost.
3. Comparing Uninformed Search Algorithms
Although all these algorithms belong to uninformed search, their behaviour and performance are different.
| Algorithm | Main approach | Data structure |
|---|---|---|
| BFS | Explores level by level | Queue |
| UCS | Explores lowest-cost path first | Priority queue |
| DFS | Explores deeply before backtracking | Stack |
| DLS | DFS with a depth limit | Stack / recursion |
| IDS | Repeated depth-limited searches | Stack / recursion |
The choice of algorithm depends on the problem.
For example, BFS can be useful when every step has equal cost and the shallowest solution is required. UCS is more suitable when actions have different costs. DFS may be useful when memory is limited and a solution can be found along a deep path.
There is no single uninformed search algorithm that is best for every situation.
4. How Do We Evaluate These Algorithms?
We cannot judge a search algorithm only by whether it finds a solution. We also need to understand how much time and memory it requires and whether it guarantees a good result.
Four important criteria are used.
1. Completeness
An algorithm is complete if it is guaranteed to find a solution whenever one exists, under the required conditions.
2. Optimality
An algorithm is optimal if it is guaranteed to find the best solution according to the specified path cost.
3. Time Complexity
Time complexity describes how the number of explored or generated states grows as the search problem becomes larger.
4. Space Complexity
Space complexity describes how much memory the algorithm requires while searching.
To understand the complexity of search algorithms, we commonly use a few symbols:
- (b): Branching factor — the maximum number of successors generated from a state.
- (d): Depth of the shallowest goal.
- (m): Maximum depth of the search space.
- (l): Depth limit used in Depth-Limited Search.
These symbols help us compare the performance of different algorithms without depending on one particular problem.
5. Advantages and Limitations of Uninformed Search
Uninformed search is useful because it does not require additional knowledge about the goal.
Some of its advantages include:
- It can be used when no useful heuristic information is available.
- Its algorithms follow clearly defined exploration rules.
- Some strategies, such as BFS and UCS, provide completeness and optimality guarantees under specific conditions.
- It provides a foundation for understanding more advanced search techniques.
However, it also has limitations.
- It may explore many unnecessary states.
- Large search spaces can require significant time and memory.
- It does not use estimates to guide exploration towards the goal.
- Some algorithms may fail to find a solution in infinite or very deep search spaces.
These limitations explain why informed search strategies are also important in Artificial Intelligence.
Conclusion
Uninformed Search provides a systematic way for an AI system to explore possible solutions without using heuristic information.
We have introduced five important algorithms: Breadth-First Search, Uniform Cost Search, Depth-First Search, Depth-Limited Search, and Iterative Deepening Search.
Each algorithm explores the search space differently. Some prioritise shallow states, others prioritise lower path costs, and some explore deeply before returning to alternative paths.
Understanding these differences is important because the performance of an AI system often depends on choosing the right search strategy for the problem.
In the next article, we will take a closer look at Breadth-First Search (BFS) and understand exactly how it explores a search tree, step by step.
Quick quiz
5 questionsOriginally published at farhanpaal.com — https://farhanpaal.com/articles/uninformed-search-strategies-in-artificial-intelligence/
Keep a copy
Read offline as a printout or PDF.
farhanpaal.com