familunit 2
familunit 2
Problem Solving
By,
– Goal test: It is a function which observe the current state and returns
whether the goal state is achieved or not.
to return a solution if at least any solution exists for any random input.
best solution (lowest path cost) among all other solutions, then such a
• Breadth-first search
• Uniform cost search
• Depth-first search
• Depth limited search
• Iterative deepening depth-first search
• Bidirectional Search
Informed Search
• Informed search algorithms use domain knowledge. In an
informed search, problem information is available which can
guide the search. Informed search strategies can find a
solution more efficiently than an uninformed search strategy.
Informed search is also called a Heuristic search.
• A heuristic is a way which might not always be guaranteed for
best solutions but guaranteed to find a good solution in
reasonable time.
• Informed search can solve much complex problem which could
not be solved in another way.
• An example of informed search algorithms is a traveling
salesman problem.
– Greedy Search
– A* Search
1. Breadth-first Search
• Breadth-first search is the most common search
strategy for traversing a tree or graph. This algorithm
searches breadthwise in a tree or graph, so it is called
breadth-first search.
• BFS algorithm starts searching from the root node of
the tree and expands all successor node at the current
level before moving to nodes of next level.
• The breadth-first search algorithm is an example of a
general-graph search algorithm.
• Breadth-first search implemented using FIFO queue
data structure.
Advantages:
• Reduces Employment
• Lacks Creative Ability
• Absence of Emotional Range
• Ethical Dilemmas
• High Costs
Applications of Best First Search
• Pathfinding in Games
• Robotics
• Network Routing
• Artificial Intelligence
• Navigation Systems
State Space Search
To locate a solution, state space search entails methodically
going through every potential state for an issue. This approach
can be used to solve a variety of AI issues, including
pathfinding, solving puzzles, playing games, and more. The
fundamental concept is to visualize the issue as a graph with
nodes standing in for states and edges for transitions.
• It is also called greedy local search as it only looks to its good immediate
neighbor state and not beyond that.
• A node of hill climbing algorithm has two components which are state and
value.
• In this algorithm, we don't need to maintain and handle the search tree or
graph as it only keeps a single current state.
Features of Hill Climbing
• Generate and Test variant: Hill Climbing is the variant of Generate and
Test method. The Generate and Test method produce feedback which
helps to decide which direction to move in the search space.