Artificial Intelligence Chapter-1: Goals in Problem Solving: Intelligent Behaviors
Artificial Intelligence Chapter-1: Goals in Problem Solving: Intelligent Behaviors
Artificial Intelligence
Chapter-1: Goals in Problem Solving
Intelligent behaviors
• Everyday tasks: recognize a friend, recognize who is calling, translate from one
language to another, interpret a photograph, talk, cook a dinner
• Formal tasks: prove a logic theorem, geometry, calculus, play chess, checkers, or
Go
• Expert tasks: engineering design, medical designers, financial analysis
Intelligence is:
• The ability to reason
• The ability to understand
• The ability to create. . .
Artificial Intelligence:
“The art of creating machines that perform functions that require intelligence
when performed by people” – Kurzwell,1990
“The science of making computers, do things that require intelligence like
humans”- Minskey
“AI is the study of how to make computers do things at which, at the moment,
people are better”- Elaine Rich
Thinking humanly
• It is the action or process of acquiring knowledge and understanding
thought, experience or the sense. Machine needs to understand how
humans think.
• It is mainly concerned with the investigation, development of human
behavior and the working of human mind in the computer.
• Example: General Problem Solver (GPS) developed by Newell & Simon
in 1961 attempted to synthesize the human solving process. Compares
the steps of the problem with the reasoning of human subjects solving
the same problem.
• Critics: Lacks scientific theories of internal activities of brain. Level of
abstraction of the approach is vague too.
Thinking rationally
• Aristotle made first attempt to harness “right thinking”. Famous
example: “Socrates is a man; all men are mortal; therefore
Socrates is mortal.”
• Formal logic (late nineteenth, early twentieth century’s)
provides a precise notation of statements of all kinds of things
and relations between them.
• Programs that can find the solution to a logical problem if one
exists have been around since 1965. Given enough memory and
time, they should be able to solve everything.
Created by: Er. Saurav Raj Pant , IOE 2072 4
Artificial Intelligence CTEVT
Applications of AI
• Game playing: AI plays crucial role in strategic games such as chess, poker,
tic-tac-toe, etc., where machine can think of large number of possible positions
based on heuristic knowledge.
• Scientific Analysis
• Weather forecasting
• E-commerce: AI is providing a competitive edge to the e-commerce industry,
and it is becoming more demanding in the e-commerce business. AI is helping
shoppers to discover associated products with recommended size, color, or even
brand
AI Today:
Diagnose Lymph-node diseases
Monitor space shuttle missions
Automatic vehicle control
Automatic design and configuration systems
First commercial speech understanding systems
Beat world’s best players in chess, checkers, and backgammon.
Intelligent agents: siri, alexa, google assistant, google duplex,
Sophia a humanoid robot etc.
ELIZA: A program that simulated a psychotherapist interacting
with a patient and successfully passed the Turing Test
Created by: Er. Saurav Raj Pant , IOE 2072 6
Artificial Intelligence CTEVT
Search Problem
It is characterized by an initial state and a goal-state description.
The guesses are called the operators where a single operator
transforms a state into another state which is expected to be closer
to a goal state. Here the objective may be to find a goal state or to
find a sequence of operators to a goal state. Additionally, the
problem may require finding just any solution or an optimum
solution.
Problem Solving:
According to computer science, a problem-solving is a part of artificial
intelligence which encompasses a number of techniques such as
algorithms, heuristics to solve a problem.
A problem is solved by using a sequence of action that reduces the
difference between initial situation and goal.
Execute
It executes the best optimal solution from the searching algorithms
to reach the goal state from the current state.
Problem Representation in AI
Before a solution can be found, the prime condition is that the problem must be
very precisely defined. By defining it properly, one converts the abstract problem
into real workable states that are really understood.
State Space Representation: A set of all possible states for a given problem is
known as the state space of the state space of the problem. Suppose you are
asked to make a cup of coffee. What will you do? You will verify whether the
necessary ingredients like instant coffee powder, milk powder, sugar, kettle,
stove etc. are available.
If so, you will follow the following steps:
1. Boil necessary water in the kettle.
2. Take some of the boiled water in a cup add necessary amount of instant
coffee powder to make decoction.
3. Add milk powder to the remaining boiling water to make milk.
4. Mix decoction and milk.
5. Add sufficient quantity of sugar to your taste and the coffee is ready.
Now think a bit what has exactly happened. You started with the
ingredients (initial state), followed a sequence of steps (called states) and
at last had a cup of coffee (goal state). You added only needed amount of
coffee powder, milk powder and sugar (operators). The following fig. shows
the sequence:
Planning:
The purpose of planning is to find the sequence of action that achieves
required goal when performed starting in a given state.
It includes 3 elements:
b. Sequence of actions
c. Goal
Soundness:
Completeness:
Optimality:
Basic Idea is to work on one goal until completely solved before moving on
to the next goal. The planning algorithm maintains a stack of goals so that only
one goal is focused at once. A plan generated by this method contains a sequence
of operators for attaining the first goal, followed by a complete sequence for the
second goal, etc.
• Advantages
• Disadvantages
Basic Idea is to use ‘goal set’ instead of ‘goal stack’. Most of the problems
require a plan in which multiple sub-problems are worked on
simultaneously. Such a plan is called a nonlinear plan because it is not
composed of a linear sequence of complete sub-plans.
Advantages
Disadvantages
– Larger search space, since all possible goal orderings may have to be considered
– Somewhat more complex algorithm; More bookkeeping.
Production system:-
A production system (or production rule system) is a computer program
typically used to provide some form of artificial intelligence, which consists
primarily of a set of rules about behavior. These rules, termed productions, are a
basic representation found useful in automated planning, expert systems and
Global Database: The global database is the central data structure used by
the production system in Artificial Intelligence.
A Control System: The control system then chooses which applicable rule
should be applied and ceases computation when a termination condition on
the database is satisfied. If multiple rules are to fire at the same time, the
control system resolves the conflicts.
Advantages:
Disadvantages:
The rules in the production system should not have any type of conflict
resolution as when a new rule is added to the database it should ensure that it does
not have any conflict with any existing rule.
Problem Statement:
We have two jugs of capacity 5l and 3l (liter), and a tap with an endless supply of
water. The objective is to obtain 4 liters exactly in the 5-liter jug with the minimum
steps possible.
Production System:
Expert System:
1. Forward Chaining:
Properties of Forward-Chaining:
2. Backward Chaining:
Note: modus ponens is the rule of logic which states that if a conditional
statement (‘if p then q ’) is accepted, and the antecedent ( p ) holds, then
the consequent ( q ) may be inferred(concluded).
Example:
The law says that it is a crime for an American to sell weapons to hostile
nations. The country Nono, an enemy of America, has some missiles, and all
of its missiles were sold to it by Colonel West, who is American.
Missile(x) ⇒ Weapon(x)
Enemy(x,America) ⇒ Hostile(x)
American(West)
Enemy(Nono,America)
Means-Ends Analysis:
It is a problem solving technique, that relies on a set of rules that can transform
one problem state into another. These rules are usually not represented with
complete sate descriptions on each side. Instead they are represented as a left
side that describes the conditions that must be met for the rule to be applicable
(these conditions are called the rule’s preconditions) and a right side that
describes those aspects of the problem state that will be changed by the
application of the rule.
Algorithm:
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.
Example:
1. if the current state is “I don’t have money” and our goal state is “I
have money” then either “ask from friend” or “visit nearby bank”,
operator is recommended.
2. If our current state is “I am hungry ” and our goal state is “I am not
hungry” then either “visit hotel” or “visit canteen”, operator is
recommended.
3. Problem as follows:
Solution:
Step1: Delete black dot step 2: move circle to right using step 3: move cirlcle to up
MYCIN was developed over five or six years in the early 1970s at Stanford
University in Lisp by Edward Shortliffe. MYCIN was never actually used in
practice but research indicated that it proposed an acceptable therapy in
about 69% of cases, which was better than the performance of infectious
disease experts who were judged using the same criteria. MYCIN operated
using a fairly simple inference engine, and a knowledge base of ~600 rules. It
would query the physician running the program via a long series of simple
yes/no or textual questions. At the end, it provided a list of possible culprit
bacteria ranked from high to low based on the probability of each diagnosis, its
confidence in each diagnosis' probability, the reasoning behind each diagnosis,
and its recommended course of drug treatment.
Created by: Er. Saurav Raj Pant , IOE 2072 25
Artificial Intelligence CTEVT
The idea was to use production rules of this kind in an attempt to approximate
the calculation of the conditional probabilities p( di | S1 ꓥ S2 ꓥ… ꓥ Sn), and
provide a scheme for accumulating evidence that approximated the reasoning
process of an expert.
MYCIN was never actually used in practice. This wasn't because of any
weakness in its performance. As mentioned, in tests it outperformed members
of the Stanford medical school faculty. Some observers raised ethical and legal
issues related to the use of computers in medicine — if a program gives the
wrong diagnosis or recommends the wrong therapy, who should be held
responsible? However, the greatest problem, and the reason that MYCIN was
not used in routine practice, was the state of technologies for system
integration, especially at the time it was developed. MYCIN was a stand-alone
system that required a user to enter all relevant information about a patient
by typing in response to questions that MYCIN would pose.
Assignment: