unit-01-4(notes)
unit-01-4(notes)
Introduction: Intelligent Agents: Agents and Environments, The concept of rationality, Nature of
Environments, Structure of Environments. (Refer the presentation files shared)
Problem Solving: Solving Problems by Searching: Problem solving agents, Uninformed Search
strategies, Avoiding repeated states, Informed Searches and Exploration, Informed search
strategies, Heuristic functions, Local search algorithms and optimization problems.
➢ Problem solving in AI
Define the problem- Analyze the problem- Detailed specification of inputs and acceptable system
solutions.
Analyse the problem thoroughly
Identification of possible solutions (Knowledge Representation)- Collect detailed information
about the problem and define all possible techniques
Choosing the optimal solution - Selection of best techniques
Search Space: Search space represents a set of possible solutions, which a system may have.
Goal test: It is a function which observe the current state and returns whether the goal state is achieved
or not.
Search tree: A tree representation of search problem is called Search tree. The root of the search tree is
the root node which is corresponding to the initial state.
Actions: It gives the description of all the available actions to the agent.
Transition model: A description of what each action do, can be represented as a transition model.
Solution: It is an action sequence which leads from the start node to the goal node.
Optimal Solution: If a solution has the lowest cost among all solutions.
• Completeness-A search algorithm is said to be complete when it gives a solution or returns any
solution for a given random input.
• Optimality-If a solution found is best (lowest path cost) among all the solutions identified, then
that solution is said to be an optimal one.
• Time complexity-The time taken by an algorithm to complete its task is called time complexity.
If the algorithm completes a task in a lesser amount of time, then it is an efficient one.
• Space complexity-It is the maximum storage or memory taken by the algorithm at any time while
searching.
Type of Searching Algorithms:
we know that in order to solve a problem (in order to search for a solution from the problem space), we
need to apply some sort of search strategy.
Based on the search problems, we can classify the search algorithms into uninformed (Blind search)
search and informed search (Heuristic search) algorithms.
➢ Uninformed search
➢ Informed search
Uninformed Search:
Uninformed search also known as Blind search, is a search technique that explores (starts searching) a
problem space without any specific knowledge or information about the problem other than the initial
state and the possible actions to take.
• The uninformed search algorithm does not have any domain knowledge such
as closeness, location of the goal state, etc. it behaves in a brute-force way.
• It only knows the information about how to traverse the given tree and how to
find the goal state.
• It examines each node of the tree until it achieves the goal node.
3. Depth-limited Search
5. Bidirectional Search
Algorithm:
step 03: If, first element in queue is goal node, then return success and stop.
else, remove and expand first element in queue and place children/successor unvisited nodes at
the end of the queue.
E.g.:
1.2. Depth First Search
It uses Last-in First-out (LIFO) strategy, i.e. it uses a stack data structure for implementation.
The stack is used for keeping track of all visited nodes.
DFS are used for detecting cycles in graph, path finding etc.
Algorithm:
E.g.: