0% found this document useful (0 votes)
37 views

Random Search

The document discusses search space and different search algorithms like tree search, graph search, binary search, and random search. It provides examples of each and analyzes the advantages and disadvantages of random search, concluding it is best for simple problems with small search spaces or early exploration when domain knowledge is limited.

Uploaded by

xafep75635
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Random Search

The document discusses search space and different search algorithms like tree search, graph search, binary search, and random search. It provides examples of each and analyzes the advantages and disadvantages of random search, concluding it is best for simple problems with small search spaces or early exploration when domain knowledge is limited.

Uploaded by

xafep75635
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Recap:

What is a search space?

a) The set of all possible solutions to a problem.


b) The memory needed to store the search algorithm.
c) The steps taken by the algorithm to solve the problem.
d) The data structures used to represent the problem.
Recap:
Which algorithm typically uses a closed list to avoid revisiting states?

a) Tree search
b) Graph search
c) Binary search
d) Random search
Recap:
Which algorithm is more likely to encounter issues with cycles in the
search space?

a) Tree search
b) Graph search
c) Binary search
d) Random search
Recap:
Which algorithm is more likely to encounter memory storage issues?

a) Tree search
b) Graph search
c) Binary search
d) Random search
Algorithm:
Random Search

At each step, the next node is determined at random.


We cannot guarantee to reach the target node, or even if we can
reach the target, the path so obtained is very redundant.
Example:
Step Current Success Expanded Randomly
variable status list chosen
variable
Advantages of Random Search:
• Simple and easy to implement: Requires minimal code and works
across diverse problem domains.
• No need for domain knowledge or explicit problem
representation: Just define the objective function and search space.
• Efficient in small search spaces: Can quickly find good solutions due
to the chance of randomly stumbling upon the optimum.
• Robust to local minima: Less prone to getting stuck in local optima
compared to deterministic methods.
Disadvantages of Random Search:
• Inefficient in large search spaces: Randomly checking points
becomes inefficient as the space grows, and finding the optimum
takes longer.
• No guarantee of finding the global optimum: May get stuck in
suboptimal regions and miss the best solution entirely.
• No information about solution quality: Provides no insight into how
close the found solution is to the actual optimum.
• Cannot adapt to the problem structure: Doesn't utilize any problem-
specific knowledge or guidance, potentially wasting resources.
• May require many iterations: Converging to acceptable solutions
might require a large number of random evaluations, increasing
computational cost.
To conclude:
Random search is a good choice for:
• Simple problems with small search spaces.
• Early exploration during optimization, to get a quick estimate
of the solution space.
• Problems where domain knowledge is scarce or difficult to
integrate into an algorithm.
Practicals
Q1. WAPP to find the solution of 8 puzzle using random search.

Q2. WAPP to find the minimum of quadratic equation 2x2−5x+3


in the range [-10,10] using random search.

Q3. WAPP for password cracking using random search,


incorporating character combinations

You might also like