Problem Solving & MEA
Problem Solving & MEA
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
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
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.