Msc. 3 Sem: Unit - 1
Msc. 3 Sem: Unit - 1
Msc. 3 Sem: Unit - 1
3rd Sem
Unit -1
Artificial Intelligence
• According to the father of Artificial Intelligence, John McCarthy, it is “The
science and engineering of making intelligent machines, especially intelligent
computer programs”.
• Artificial Intelligence is a way of making a computer, a computer-controlled
robot, or a software think intelligently, in the similar manner the intelligent
humans think.
• Natural Language Processing − It is possible to interact with the computer that understands natural
language spoken by humans.
• Expert Systems − There are some applications which integrate machine, software, and special
information to impart reasoning and advising. They provide explanation and advice to the users.
• Vision Systems − These systems understand, interpret, and comprehend visual input on the computer.
For example,
• A spying aero plane takes photographs, which are used to figure out spatial information or map of the
areas.
• Police use computer software that can recognize the face of criminal with the stored portrait made by
forensic artist.
• Speech Recognition − Some intelligent systems are capable of hearing and
comprehending the language in terms of sentences and their meanings
while a human talks to it. It can handle different accents, slang words,
noise in the background, change in human’s noise due to cold, etc.
• Problems are often modelled as a state space, a set of states that a problem can
be in. The set of states forms a graph where two states are connected if there is
an operation that can be performed to transform the first state into the second.
• State space search often differs from traditional computer science search
methods because the state space is implicit: the typical state space graph is
much too large to generate and store in memory. Instead, nodes are generated
as they are explored, and typically discarded thereafter.
• A solution to a combinatorial search instance may consist of the goal state
itself, or of a path from some initial state to the goal state.
Representation: a state space is formally represented as
a tuple
• S is the set of all possible states;
• A is the set of possible actions, not related to
a particular state but regarding all the state
space;
• Action(s) is the function that establish which
action is possible to perform in a certain state;
• Result (s,a) is the function that returns the
state reached performing action a in state s.
• Cost(s,a) is the cost of performing an action a
in state s.
A search problem consists of
• A State Space: Set of all possible states where you can
be.
• A Start State: The state from where the search begins.
• A Goal Test: A function that looks at the current state
returns whether or not it is the goal state.
• The Solution to a search problem is a sequence of
actions, called the plan that transforms the start state
to the goal state.
• This plan is achieved through search algorithms
Search Algorithms in Artificial Intelligence
• Problem-solving agents:
• In Artificial Intelligence, Search techniques are
universal problem-solving methods. Rational agents
or Problem-solving agents in AI mostly used these
search strategies or algorithms to solve a specific
problem and provide the best result.
• Problem-solving agents are the goal-based agents
and use atomic representation. In this topic, we will
learn various problem-solving search algorithms.
• 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.
• Path Cost: It is a function which assigns a numeric cost to each path.
• 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.
Properties of Search Algorithms
• The uninformed search does not contain any domain knowledge such as closeness,
the location of the goal. It operates in a brute-force way as it only includes
information about how to traverse the tree and how to identify leaf and goal nodes.
• Uninformed search applies a way in which search tree is searched without any
information about the search space like initial state operators and test for the goal,
so it is also called blind search. It examines each node of the tree until it achieves
the goal node.
• Breadth-first search
• Uniform cost search
• Depth-first search
• Iterative deepening depth-first search
• Bidirectional Search
Informed Search
• Greedy Search
• A* Search
Uninformed Search Algorithms
• Space Complexity:
• The same logic is for space complexity so, the worst-case space
complexity of Uniform-cost search is O(b1 + [C*/ε]).
• Optimal:
• Uniform-cost search is always optimal as it only selects a path with the
lowest path cost.
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.
• Depth-limited search can be terminated with two Conditions of failure:
• Standard failure value: It indicates that problem does not have any
solution.
• Cutoff failure value: It defines no solution for the problem within a
given depth limit.
• Advantages:
• Depth-limited search is Memory efficient.
• Disadvantages:
• Depth-limited search also has a disadvantage
of incompleteness.
• It may not be optimal if the problem has more
than one solution.
Example: S->B->J
• Completeness: DLS search algorithm is complete if the
solution is above the depth-limit. Otherwise it is
uncomplete.
• Time Complexity: Time complexity of DLS algorithm
is O(bℓ).
• Space Complexity: Space complexity of DLS algorithm
is O(b×ℓ).
• Optimal: Depth-limited search can be viewed as a
special case of DFS, and it is also not optimal even if
ℓ>d.
Iterative deepening Depth-first Search
• The iterative deepening algorithm is a combination of DFS and BFS
algorithms. This search algorithm finds out the best depth limit and does
it by gradually increasing the limit until a goal is found.