0% found this document useful (0 votes)
14 views28 pages

AI Module 1 Lecture 9

The document outlines a module on AI focusing on problem reduction and constraint satisfaction, specifically discussing the Alpha-Beta Pruning and Means-Ends Analysis algorithms. It includes learning outcomes for students, examples of the algorithms, and a structured approach to problem-solving in AI. The document also presents practical applications of the A* Algorithm for finding cost-effective paths in problem scenarios.

Uploaded by

mi.melonfisher
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views28 pages

AI Module 1 Lecture 9

The document outlines a module on AI focusing on problem reduction and constraint satisfaction, specifically discussing the Alpha-Beta Pruning and Means-Ends Analysis algorithms. It includes learning outcomes for students, examples of the algorithms, and a structured approach to problem-solving in AI. The document also presents practical applications of the A* Algorithm for finding cost-effective paths in problem scenarios.

Uploaded by

mi.melonfisher
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

MODULE 1

Scope of AI & Problem Solving


Topic: Problem reduction & constraint satisfaction

B.Tech.(CSE)
Artificial Intelligence (CSE 401)
Learning outcomes

• Students will be able to know about Alpha-Beta Pruning algorithm.

• Students will be able to know about Means Ends Analysis algorithm.

• Students will be able to understand algorithms with various examples.

2
Amity School of Engineering and Technology

Alpha-Beta pruning
Amity School of Engineering and Technology

Alpha-Beta Procedure
5
Amity School of Engineering and Technology

Alpha-Beta pruning example


Amity School of Engineering and Technology

Alpha-Beta pruning example


Amity School of Engineering and Technology

Alpha-Beta pruning example


Amity School of Engineering and Technology

Alpha-Beta pruning example


Amity School of Engineering and Technology

Alpha-Beta pruning example


Amity School of Engineering and Technology

Alpha-Beta pruning algorithm


Amity School of Engineering and Technology

Example 1: Prune this gaming tree


Amity School of Engineering and Technology

Example 2: Considering the following game search tree space


Means-Ends Analysis

Means-Ends Analysis (MEA) is a problem solving technique used


commonly in Artificial Intelligence (AI) for limiting search in AI
programs
Problem-solving as search

• An important aspect of intelligent behavior as studied in AI is goal-based problem


solving, a framework in which the solution of a problem can be described by finding a
sequence of actions that lead to a desirable goal.

• A goal-seeking system is supposed to be connected to its outside environment by


sensory channels through which it receives information about the environment and
motor channels through which it acts on the environment.

• Ability to attain goals depends on building up associations, simple or complex,


between particular changes in states and particular actions that will bring these
changes about.

• Search is the process of discovery and assembly of sequences of actions that will
lead from a given state to a desired state.
How MEA works?

The means-ends analysis process can be applied recursively for a problem. It is a strategy
to control search in problem-solving. Following are the main Steps which describes the
working of MEA technique for solving a problem.

1.First, evaluate the difference between Initial State and final State.

2.Select the various operators which can be applied for each difference.

3.Apply the operator at each difference, which reduces the difference between the current
state and goal state.
Operator Subgoaling
• In the MEA process, we detect the differences between the current state and goal
state.
• Once these differences occur, then we can apply an operator to reduce the
differences.
• But sometimes it is possible that an operator cannot be applied to the current
state.
• So we create the subproblem of the current state, in which operator can be
applied, such type of backward chaining in which operators are selected, and then
sub goals are set up to establish the preconditions of the operator is
called Operator Subgoaling.
Algorithm for Means-Ends Analysis
Let's we take Current state as CURRENT and Goal State as GOAL, then following are the steps for the MEA
algorithm.

Step 1: Compare CURRENT to GOAL, if there are no differences between both then return Success and Exit.

Step 2: Else, select the most significant difference and reduce it by doing the following steps until the success or failure
occurs.
Select a new operator O which is applicable for the current difference, and if there is no such operator, then signal
failure.
Attempt to apply operator O to CURRENT. Make a description of two states.
i) O-Start, a state in which O’s preconditions are satisfied.
ii) O-Result, the state that would result if O were applied in O-start.
If
(First-Part <------ MEA (CURRENT, O-START)
And
(LAST-Part <----- MEA (O-Result, GOAL), are successful, then signal Success and return the result of
combining FIRST-PART, O, and LAST-PART
Example of Mean-Ends Analysis
In this problem, we need to get the goal state by finding differences between
the initial state and goal state and applying operators.
Question 1: Given an initial state of a 8-puzzle problem and final state to
be reached-

Find the most cost-effective path to reach the final state from initial state
using A* Algorithm. Consider g(n) = Depth of node and h(n) = Number of
misplaced tiles.
Solution:
• Consider g(n) = Depth of node
and h(n) = Number of misplaced
tiles.
• A* Algorithm maintains a tree of
paths originating at the initial state.
• It extends those paths one edge at
a time.
• It continues until final state is
reached.
Question 2: Consider the following graph-
The numbers written on edges represent the distance between the nodes. The numbers written on nodes
represent the heuristic value.
Find the most cost-effective path to reach from start state A to final state J using A* Algorithm.
Solution:
Solution:
Amity School of Engineering and Technology

Thank You

You might also like