1 AI Intro

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

Chapter- 1

Introduction to AI

• Overview of AI
• AI vs. HI
• Views of AI
• History of AI
• Programming Paradigms
Intelligence
• Intelligence is the capability of
observing, learning, remembering &
reasoning.
• AI attempts to develop intelligent agents.

Characteristics of Intelligent system


• Use vast amount of knowledge
• Learn from experience and adopt to changing
environment
• Interact with human using language and speech
• Respond in real time
• Tolerate error and ambiguity in communication
Human Intelligence
• How does our brain work when we solve a problem? Do we
think it over and suddenly find an answer?
– What do we do when solving a complicated factorization
problem, a puzzle or a mystery?
How do people Reason?
• Create categories & relate one concept to another: Reasoning
by analogy(likeness):
– From the fact that: A is like B. M is in A. N is in B. Can we say “M
is like N”?
• Use specific rules: rule-based reasoning
– if ‘a’ then ’b’ and if ‘b’ then ‘c’  THEN a  b  c
• Use Past Experience, “CASES” (case-based reasoning)
– Similarities of current and previous case
– Store cases using key attributes
• Use “Expectations” (probabilistic reasoning)
 With the help of previous experience they use Heuristics -
“Rule of thumb” to guess the probability of occurrence of
events or guess solution for the problem at hand.
Deductive and inductive reasoning
• Deductive reasoning: exact reasoning
from general premises, which are known
or presumed to be known, to more
specific, certain conclusions.
–Gravity makes things fall. Hence, the apple
that hit my head was due to gravity.
–All athletes work out in the gymnasium. Getu is an athlete.
Therefore, Getu works out in the gymnasium.
• Inductive reasoning: reasoning from a set of specific
facts or individual cases to a more general, but
uncertain, conclusions.
–How much to Buy ?
• The base costs is X, extra cost is Y, plus tax is at Z. Hence, it
is better to deal at XYZ.
–What is the next number in the sequence 6, 13, 20, 27,…
• Since 13 – 6 = 7, 20 – 13 = 7, 27 – 20 = 7. Thus the next term
is 34, because 34 – 27 = 7. 4
Example
• A classic example of deductive reasoning, given by Aristotle:
– All men are mortal. (major premise)
– Socrates is a man. (minor premise)
– Socrates is mortal. (conclusion)

• The wheel is round. (Or, all wheels I have seen are round)
–using inductive reasoning we can infer the general proposition: All
wheels are round.
• The bird flies. (Or, all birds I have seen could fly)
–using inductive reasoning we can infer the general proposition: All
birds can fly.

5
Artificial Intelligence
• The concern of AI is to develop computer based
system that behave like human and emulate the
reasoning power of humans
• in order to do tasks that require human intelligence.

– Which task requires intelligence?


– Complex arithmetic operations
– For instance, Solving 220 * 350?
– Mundane tasks: all tasks routinely done by all of us in our
day-to-day activities:
– Example, Natural language understanding; face
recognition; planning; robotics, …
– Expert tasks: which require specialists knowledge
– Example, Medical diagnosis; computer maintenance;
financial planning
Views of AI
• AI is found on the premise that:
– workings of human mind can be explained in terms of
computation, and
– computers can do the right thing given correct
premises and reasoning rules.

Views of AI fall into four categories:

Thinking humanly Thinking rationally


Acting humanly Acting rationally
Thinking humanly: The Cognitive
Modeling
• Reasons like humans do
– Programs that behave like humans
• Requires understanding of the internal activities of
the brain
– see how humans behave in certain situations
and see if you could make computers behave in
that same way.
Example. write a program that plays chess.
– Instead of making the best possible chess-
playing program, you would make one that play
chess like people do.
Acting humanly: The Turing Test
Can machines act like human do? Can machines
behave intelligently?
• Turing Test: Operational test for intelligent
behavior
– do experiments on the ability to achieve human-level
performance,
– Acting like humans requires AI programs to interact
with people
• Suggested major components of AI: knowledge,
reasoning, language understanding, learning
Thinking Rationally: The Laws of Thought
• A system is rational if it thinks/does the right thing
through correct reasoning.

• Aristotle: provided the correct arguments/


thought structures that always gave correct
conclusions given correct premises.
– Abebe is a man; all men are mortal; therefore Abebe is
mortal
– These Laws of thought governed the operation of the
mind and initiated the field of Logic.
Acting rationally: The rational agent
• Doing the right thing so as to achieve one’s
goal, given one’s beliefs.
• AI is the study and construction of rational
agents (an agent that perceives and acts)
• Rational action requires the ability to represent
knowledge and reason with it so as to reach
good decision.
– Learning for better understanding of how the
world works
Applications of AI
Solving problems that required thinking by humans:
• Playing games (chess, checker, cards, ...)
– Great advances: the AI software Deep Blue beats human
expert Kasparov.
• Proving theorems (mathematical theorems, laws of
physics, …)
• Classification of text (Politics, Economic, Social,
Sports, etc,)
• Information filtering and summarization of text
• Writing story and poems; solving puzzles
• Giving advice in Medical diagnosis, Equipment
repair, Computer configuration, Financial planning,

How to make computers act like humans?
The following sub-fields are emerged
• Natural Language processing (enable computers
communicate in human language, English, Amharic, ..)
• Knowledge representation (schemes to store information,
both facts and inferences, before and during interrogation)
• Automated reasoning (use stored information to answer
questions and to draw new conclusions)
• Machine learning (adapt to new circumstances and
accumulate knowledge)
• Computer vision (recognize objects based on patterns in
the same way as the human visual system does)
• Robotics (produce mechanical device capable of controlled
motion with the ability to move, see, hear, and accordingly take
actions in the world, possibly responding to new perceptions)
AI vs. HI?
• Artificial Intelligence (or AI) is the field that explores
to develop a system that think in the same sense as
humans do.
 Remember computer based chess program (Deep Blue)
that beats human expert (Gary Kasparov). What do you
understand from this?
• Is AI equals human intelligence?
– Is that possible to create a computer system called mind?
• What is our concern in designing an Intelligent
agent?
– Is that to replace human beings or to support and give
leverage to them such that they can engage themselves in
expert works?
Strong AI vs. Weak AI
• Strong AI argues that it is possible that one day a
computer will be invented which can be called a mind in
its fullest sense.
– Strong AI aims to create an agent that can replicate humans
intelligence completely; i.e., it can think, reason, imagine,
etc., & do all the things that are currently associated with the
human brain.
• Weak AI, on the other hand, argue that computers can
only appear to think & are not actually conscious in the
same way as human brains are.
– The weak AI position holds that AI should try to develop
systems which have facets of intelligence, but the objective
is not to build a completely sentient/conscious entity.
– Weak AI researchers see their contribution as systems like
expert systems used for medical diagnosis, which use
"intelligent" models, but they do not help create a conscious
agent
History of AI
• Formally initiated in 1956 and the name AI was
coined by John McCarthy.
• The advent of general purpose computers
provided a vehicle for creating artificially intelligent
entities.
–Used for solving general-purpose problems

• Which one is preferred?


–General purpose problem solving systems
–Domain specific systems
History of AI
• Development of knowledge-based systems
(KBSs): the key to power
– Performance of general-purpose problem solving
methods is weak for many complex domains.
– Use knowledge more suited to make better reasoning
in narrow areas of expertise (like human experts do).
– Early knowledge intensive systems include:
• The Dendral program (1969): solved the problem of
inferring molecular structure (C6H13NO2).
• MYCIN (1976): used for medical diagnosis.
• etc.
KBS Architecture
Learning
Knowledge base systems (KBSs)
• Deal with treating knowledge and ideas on a
computer.
– Emphases to the importance of knowledge.
• Use inference to solve problems on a computer.
– Knowledge-based systems describes programs that
reason over extensive knowledge bases.
• Have the ability to learn ideas so that they can
obtain information from outside to use it
appropriately.
– The value of the system lies in its ability to make the
workings of the human mind understandable and
executable on a computer.
History of AI
• Shifts from procedural to declarative
programming paradigm.
– Rather than telling the computer how to compute a
solution, a program consists of a knowledge base of
facts and relationships.
– Rather than running a program to obtain a solution,
the user asks question so that the system searches
through the KB to determine the answer.

• Simulate human mind and learning behavior


(Neural Network, Belief Network, Support Vector
Machine, Hidden Markov Models, etc. )
Programming paradigms
• Each programming paradigms consists of two
aspects:
–Methods for organizing data/knowledge,
–Methods for controlling the flow of computation

• Traditional paradigms:
Programs = data structure + control

• AI programming paradigms:
Programs = knowledge structure + inference
Introducing to Prolog for Constructing KB
• It is a declarative language, which is Used in AI applications such as NLP,
automated reasoning systems, expert systems, …
• Prolog is based on facts, rules, queries, constants and variables.
– Facts and rules make up the knowledgebase.
– Constants and variables are used to construct facts, rules and queries.
– Queries drive the search processes
Syntax:
• Prolog files are with extension .pl. Each statement (fact , rules, queries, …)
ends with full stop“.” Variables starts with capital letters (e.g. X, Book,
Food, …) and constants (facts) are written in small letters (e.g. sam, chips,
…). The knowledgebase contains: Facts and Rules (to combine facts to
increase knowledge and reasoning ability of the system):
male(sam).
male(john). facts
female(tutu).
child(sam,john).
child(tutu,john).
son(X,Y):- male(X),child(X,Y). %X is a son of Y if X is male and X is a child of
Y
• Can you add rules for Daughter, Father, Mother, Grandfather, Uncle?
Logical connectives
Syntax Example:
PL/FOL Prolog PL/FOL Prolog
^ , Hot ^ wet → humid humid : - hot, wet.
( humid v cool) → pleasant : not(humid); cool.
pleasant
V ;
 likes(ted,chips) → likes(yared, chips) : - not
Likes(yared, chips) (likes (ted,chips)).
→ :-
female(X) ^ child(X,Y) daughter(X,Y):- female(X) ^
→ daughter(X,Y) child(X,Y) .
 not
male(X) ^ child(X,Y) son(X,Y):- male(X),
→ son(X,Y) child(X,Y).
Example
Consider the following facts and rules about food
composition Sam likes.
• Sam likes chips.
• Macaroni contains cheese.
• Lasagna contains cheese.
• Lasagna contains meat.
• There is Chinese noodles.
• Sam likes Chinese foods.
• Sam likes all foods that contain cheese and
meat.
Example
• To express Example in Prolog we must:
1.Identify the entities (or actual objects), mentioned in the
description
2.Identify the types of properties that things can have, as well
as the relations that can hold between these things
3.Figure out which properties/relations hold for which entities

• There is really no unique way of doing this; we must


decide the best way to structure our data (based on what
we want to do with it).

• We will choose the following:


– Objects/arguments: sam, cheese, Food, lasagna
– Relations/predicates: “... likes ...”, “... contains...”
25
Prolog program for the Example
Constructing our knowledge base then consists of writing
down which properties and relationships hold for which
objects in the form of facts and rules as follows:
likes (sam, Food) :-
contains (Food, cheese),
contains (Food, meat).
likes (sam, Food) :- chinese(Food).

likes (sam, chips).


contains (macaroni, cheese).
contains (lasagna, cheese).
contains (lasagna, meat).
chinese(noodles).
Example 1: Query
• To run prolog programs we need to give it a query to
prove
– A query has exactly the same format as a clause-body:
one or more predicates, separated by “,” or “;”, terminated
by a full-stop

Query:
1.Is Sam likes chips? ?- likes(sam, X).
?- likes(sam,chips). X = lasagna ;
2.What are some of the X = noodles ;
foods Sam likes? X = chips ;
?- likes(sam,X). No
• Prolog introductory notes:
http://boklm.eu/prolog/page_0.html 27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy