Intelligent and Expert System (IE)
Intelligent and Expert System (IE)
Examples:
Self-Driving Car: Uses sensors (cameras, radar, lidar) to perceive its
surroundings, and actuators (steering, braking) to navigate and drive safely.
Smart Assistant (e.g., Siri, Alexa): Perceives user commands through voice
recognition and acts by providing information, controlling smart devices, or
performing tasks.
Recommendation System (e.g., Netflix, Amazon): Analyzes user preferences
and behaviors to recommend movies, products, or other content.
o Breadth-first search
o Uniform cost search
o Depth-first search
o Iterative deepening depth-first search
o Bidirectional Search
BREADTH-FIRST SEARCH:
EXAMPLE
Depth-first Search
o Depth-first search is a recursive algorithm for traversing a tree or graph data structure.
o It is called the depth-first search because it starts from the root node and follows each
path to its greatest depth node before moving to the next path.
o DFS uses a stack data structure for its implementation.
o The process of the DFS algorithm is similar to the BFS algorithm.
EXAMPLE-
In the below search tree, we have shown the flow of depth-first search, and it will follow
the order as:
It will start searching from root node S, and traverse A, then B, then D and E, after
traversing E, it will backtrack the tree as E has no other successor and still goal node is
not found. After backtracking it will traverse node C and then G, and here it will
terminate as it found goal node.
Depth-Limited Search Algorithm:
A depth-limited search algorithm is similar to depth-first search with a predetermined
limit. Depth-limited search can solve the drawback of the infinite path in the Depth-
first search. In this algorithm, the node at the depth limit will treat as it has no successor
nodes further.
o Standard failure value: It indicates that problem does not have any solution.
o Cutoff failure value: It defines no solution for the problem within a given depth limit.
Example:
Uniform-cost Search Algorithm:
Uniform-cost search is a searching algorithm used for traversing a weighted tree or
graph. This algorithm comes into play when a different cost is available for each edge.
The primary goal of the uniform-cost search is to find a path to the goal node which
has the lowest cumulative cost. Uniform-cost search expands nodes according to their
path costs form the root node. It can be used to solve any graph/tree where the
optimal cost is in demand. A uniform-cost search algorithm is implemented by the
priority queue. It gives maximum priority to the lowest cumulative cost. Uniform cost
search is equivalent to BFS algorithm if the path cost of all edges is the same.
Example:
This algorithm performs depth-first search up to a certain "depth limit", and it keeps
increasing the depth limit after each iteration until the goal node is found.
This Search algorithm combines the benefits of Breadth-first search's fast search and
depth-first search's memory efficiency.
The iterative search algorithm is useful uninformed search when search space is large,
and depth of goal node is unknown.
Example:
Following tree structure is showing the iterative deepening depth-first search. IDDFS
algorithm performs various iterations until it does not find the goal node. The iteration
performed by the algorithm is given as:
1st iteration – A
2nd iteration – A B C
3rd iteration- A B D E C F G
4th iteration – A B D H I E C F K G
Bidirectional search can use search techniques such as BFS, DFS, DLS, etc.
Example:
In the below search tree, bidirectional search algorithm is applied. This algorithm
divides one graph/tree into two sub-graphs. It starts traversing from node 1 in the
forward direction and starts from goal node 16 in the backward direction.
ANS- A* Algorithm-
• A* Algorithm is one of the best and popular techniques used for
path finding and graph traversals.
• A lot of games and web-based maps use this algorithm for finding
the shortest path efficiently.
• It is essentially a best first search algorithm.
Here,
Algorithm-