Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Artifiicial Intelligence 2

Rating
-
Sold
-
Pages
39
Uploaded on
27-07-2022
Written in
2021/2022

1.Search Algorithms, 2. Random search, 3. Search with closed and open list, 4. Depth first and Breadth first search, 5. Heuristic search, 6. Best first search, 7. A* algorithm

Institution
Course

Content preview

CONTENTS

1.Search Algorithms,

2. Random search,

3. Search with closed and open list,

4. Depth first and Breadth first search,

5. Heuristic search,

6. Best first search,

7. A* algorithm

1. Search Algorithms
A search method is defined by picking the order of node expansion. Strategies are evaluated
along the following dimensions:
completeness: does it always find a solution if one exists?
time complexity: number of nodes generated
space complexity: maximum number of nodes in memory
optimality: does it always find the shortest path solution?

Time and space complexity are measured in terms of
b: maximum branching factor of the search tree
d: depth of the shortest path solution
m: maximum depth of the state space (may be ∞)

1.1 Uninformed techniques
Systematically searches complete graph, unguided. Also known as brute force, naïve, or blind.
While searching you have no clue whether one non-goal state is better than any other. Your
search is blind. Uninformed search algorithms have no additional information on the goal node
other than the one provided in the problem definition. The plans to reach the goal state from the
start state differ only by the order and length of actions.
Examples: Depth First Search and Breadth First Search.
We do not use the path cost when executing uninformed search. The transition model
defines a state space, which can be represented as a directed graph (vertices are states, edges are
actions).
For example, consider the 8-puzzle game, which requires that tokens are shifted around until a
particular goal state is reached. Search space size makes the search tedious. This problem is
called Combinational Explosion.

,1.2 Informed techniques
Use problem specific information to guide search in promising directions. Informed Search
algorithms have information on the goal state which helps in more efficient searching. This
information is obtained by a function that estimates how close a state is to the goal state. These
strategies often depend on the use of heuristic information (heuristic search function). Heuristic
search function h(n), is estimated cost of the cheapest path from node n to goal node. Example:
Best first search, A* algorithm.

1.3 Search Algorithms categorization




1.4 Difference between uninformed and informed search

,Uninformed Search is a class of general purpose algorithms that operates in a brute force way. The
search space is explored without leveraging on any information on the problem. Also called
blind search, or naïve search
Since the methods are generic they are intrinsically inefficient. Uninformed search strategies that do
not take into account the location of the goal. Intuitively, these algorithms ignore where they are
going until they find a goal and report success.
E.g. Random Search
2. Random Search
This method selects randomly a new state from the current one. If the goal state is reached, the
search terminates. Otherwise the methods randomly select an other operator to move to the next
state. Goal achievement is not insured in finite time.

Algorithm : Random Search
Step 1: n=initial node.
Step 2: Finish if n is the goal.
Step 3: Expand n to get a set S of child-nodes.

, Step 4: Select a node n’ from S at random.
Step 5: n=n’, return to 2.

A key issue in search is limiting the portion of the state space that must be explored to find a
solution.
The portion of the search space explored can be affected by the order in which states (and thus
solutions) are examined.
The search strategy determines this order by determining which node (partial solution) will be
expanded next.

Repeated states
Failure to detect repeated states can turn a linear problem into an exponential.




Avoiding Repeated States
Do not re-generate the state you just came from.
Do not create paths with cycles.
Do not generate any state that was generated before (using a hash table to store all generated
nodes) Markov Assumption
Add Closed list to search algorithm or cleverly construct search space Closed list contain the
states that are already visited.

3. Search with closed and open list
To avoid repeated state, Search is implemented using two lists called OPEN and CLOSED are
maintained.
The OPEN list contains those states that are to be expanded and CLOSED list keeps track of
states already expanded.
Here OPEN list is used as a queue. CLOSED list as a stack.

Advantage of open and closed list
The CLOSED list is a collection of all expanded nodes. This means that those are nodes that
were already "searched". This prevents the search from visiting nodes again and again.
CLOSED list generally improves the speed of algorithm. It prevents the algorithm from
expanding pre-visited nodes.
Maybe you reach node A that was expanded previously through another branch. This will let you
cut this branch and try another path.

General Search Algorithm

Written for

Institution
Course

Document information

Uploaded on
July 27, 2022
Number of pages
39
Written in
2021/2022
Type
Class notes
Professor(s)
Azhar
Contains
All classes

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sadiaafreen

Also available in package deal

Get to know the seller

Seller avatar
sadiaafreen muffakham jah college of engineering and technology
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions