0% found this document useful (0 votes)
62 views

Problem Solving & MEA

This document is an assignment submission for a course on Artificial Intelligence. It was submitted by M. Ateeq, a student with roll number 6 in the 6th semester of a BSCS program. The assignment addresses problem solving and means-end analysis in AI. It discusses common problem types in AI like games and puzzles. It also covers problem solving techniques used in AI like heuristics, searching algorithms, and means-ends analysis. Examples are provided to illustrate heuristic problem solving and the means-ends analysis process.

Uploaded by

ateeq mughal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Problem Solving & MEA

This document is an assignment submission for a course on Artificial Intelligence. It was submitted by M. Ateeq, a student with roll number 6 in the 6th semester of a BSCS program. The assignment addresses problem solving and means-end analysis in AI. It discusses common problem types in AI like games and puzzles. It also covers problem solving techniques used in AI like heuristics, searching algorithms, and means-ends analysis. Examples are provided to illustrate heuristic problem solving and the means-ends analysis process.

Uploaded by

ateeq mughal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Assignment

On
Problem Solving & MEA
Course Title: Artificial Intelligence

Submitted To:
Prof. Hina Khalid
Computer Science

Submitted By:
M.Ateeq
Roll No. 6
BSCS Semester: 6th

Dated: June 28, 2021

BEST COLLEGE KHARIAN


Problem Solving
Problem-solving is commonly known as the method to reach the desired
goal or finding a solution to a given situation. In computer science, problem-
solving refers to artificial intelligence techniques, including various techniques
such as forming efficient algorithms, heuristics, and performing root cause
analysis to find desirable solutions. In Artificial Intelligence, the users can solve
the problem by performing logical algorithms, utilizing polynomial and
differential equations, and executing them using modeling paradigms. There can
be various solutions to a single problem, which are achieved by different
heuristics. Also, some problems have unique solutions. It all rests on the nature
of the given problem.

Examples of Problems in Artificial Intelligence


Developers worldwide are using artificial intelligence to automate
systems for efficient utilization of time and resources. Some of the most
common problems encountered in day-to-day life are games and puzzles. These
can be solved efficiently by using artificial intelligence algorithms. Ranging
from mathematical puzzles including crypto-arithmetic and magic squares,
logical puzzles including Boolean formulas and N-Queens to popular games
like Sudoku and Chess, these problem-solving techniques are used to form a
solution for all these. Therefore, some of the most prevalent problems that
artificial intelligence has resolved are the following:
 Chess
 N-Queen problem
 Tower of Hanoi Problem
 Travelling Salesman Problem
What is a Reflex Agent?
There are five primary agents used in Artificial Intelligence based on
their capability of perceiving intelligence. These agents are the following:
1. Simple Reflex Agents
2. Model-Based Reflex Agents
3. Goal-Based Agents
4. Utility-Based Agents
5. Learning Agents
These agents prove helpful in the mapping of states and actions. While solving a
complex problem, these agents often fail to comprehend the next step
adequately; thus, problem-solving agents solve such scenarios. These agents use
techniques like B-tree and heuristic algorithms to solve problems using artificial
intelligence.

Problem Solving Techniques


Artificial Intelligence is beneficial for solving complex problems due to
its efficient methods of solving. Following are some of the standard problem-
solving techniques used in AI:

Heuristics
The heuristic method helps comprehend a problem and devises a solution
based purely on experiments and trial and error methods. However, these
heuristics do not often provide the best optimal solution to a specific problem.
Instead, these undoubtedly offer efficient solutions to attain immediate goals.
Therefore, the developers utilize these when classic methods do not provide an
efficient solution for the problem. Since heuristics only provide time-efficient
solutions and compromise accuracy, these are combined with optimization
algorithms to improve efficiency.
Example: Travelling Salesman Problem

The most common example of using heuristic is the Travelling Salesman


problem. There is a provided list of cities and their distances. The user has to
find the optimal route for the Salesman to return to the starting city after visiting
every city on the list. The greedy algorithms solve this NP-Hard problem by
finding the optimal solution. According to this heuristic, picking the best next
step in every current city provides the best solution.
Searching Algorithms
Searching is one of the primary methods of solving any problem in AI.
Rational agents or problem-solving agents use these searching algorithms to
find optimal solutions. These problem-solving agents are often goal-based and
utilize atomic representation. Moreover, these searching algorithms possess
completeness, optimality, time complexity, and space complexity properties
based on the quality of the solution provided by them.
Types of Searching Algorithms

There are following two main types of searching algorithms:


1. Informed Search
2. Uninformed Search
Informed Search
These algorithms use basic domain knowledge and comprehend available
information regarding a specified problem as a guideline for optimal solutions.
The solutions provided by informed search algorithms are more efficient than
uninformed search algorithms.
Types of informed Search Algorithms

There are following main two types of informed search algorithms:


1. Greedy Search
2. A * Search
Uninformed Search
These algorithms do not have the privilege of using basic domain knowledge,
such as the desired goal’s closeness. It contains information
regarding traversing a tree and identifying leaf and goal nodes. Uninformed
search also goes by the name of blind search because while traversing, there is
no specific information about the initial state and test for the goal. This search
goes through every node till reaching the desired destination.

Types of Uninformed Searching Algorithms


There are the following main five types of uninformed search algorithms:
1. Breadth-First Search
2. Depth First Search
3. Uniform Cost Search
4. Iterative Deepening Depth First Search
5. Bidirectional Search

Means-Ends Analysis in Artificial Intelligence


o We have studied the strategies which can reason either in forward or
backward, but a mixture of the two directions is appropriate for solving a
complex and large problem. Such a mixed strategy, make it possible that first
to solve the major part of a problem and then go back and solve the small
problems arise during combining the big parts of the problem. Such a
technique is called Means-Ends Analysis.
o Means-Ends Analysis is problem-solving techniques used in Artificial
intelligence for limiting search in AI programs.
o It is a mixture of Backward and forward search technique.
o The MEA technique was first introduced in 1961 by Allen Newell, and
Herbert A. Simon in their problem-solving computer program, which was
named as General Problem Solver (GPS).
o The MEA analysis process centered on the evaluation of the difference
between the current state and goal state.
How means-ends analysis 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.
o Step 1: Compare CURRENT to GOAL, if there are no differences
between both then return Success and Exit.
o Step 2: Else, select the most significant difference and reduce it by doing
the following steps until the success or failure occurs.
1. Select a new operator O which is applicable for the current
difference, and if there is no such operator, then signal failure.
2. 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.
3. 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.
The above-discussed algorithm is more suitable for a simple problem and not
adequate for solving complex problems.
Example of Mean-Ends Analysis:
Let's take an example where we know the initial state and goal state as
given below. In this problem, we need to get the goal state by finding
differences between the initial state and goal state and applying operators.

Solution:
To solve the above problem, we will first find the differences between initial
states and goal states, and for each difference, we will generate a new state and
will apply the operators. The operators we have for this problem are:
o Move
o Delete
o Expand
1. Evaluating the initial state: In the first step, we will evaluate the initial state
and will compare the initial and Goal state to find the differences between both
states.
2. Applying Delete operator: As we can check the first difference is that in
goal state there is no dot symbol which is present in the initial state, so, first we
will apply the Delete operator to remove this dot.

3. Applying Move Operator: After applying the Delete operator, the new state
occurs which we will again compare with goal state. After comparing these
states, there is another difference that is the square is outside the circle, so, we
will apply the Move Operator.

4. Applying Expand Operator: Now a new state is generated in the third step,


and we will compare this state with the goal state. After comparing the states
there is still one difference which is the size of the square, so, we will
apply Expand operator, and finally, it will generate the goal state.

You might also like