You are on page 1of 35

Introduction to AI

Professor Abdelwadood MESLEH

Based on slides of Russel (AIMA Chapters 1-2)


Father of AI

John McCarthy, The father of AI


September 4, 1927 – October 24, 2011

2
Artificial Intelligence (AI)

The theory and development of computer systems


able to perform tasks that normally require human
intelligence, such as visual perception, speech
recognition, decision-making, and translation
between languages

3
What is AI?

Thinking Humanly Thinking Rationally


“The exciting new effort to make “The study of mental faculties
computers thinks … machine with through the use of computational
minds, in the full and literal sense” models”
(Haugeland, 1985) (Charniak and McDermott, 1985)

Acting Humanly Acting Rationally


“The study of how to make “Computational Intelligence is the
computers do things at which, at study of the design of intelligent
the moment, people are better” agents”
(Rich and Knight, 1991) (Poole et al., 1998)
4
Acting humanly

 The Turing Test (Alan Turing, 1950)

 Instead of duplicating an exemplar, it is more useful and


important to study the principles of the intelligence
5
Thinking humanly

 The cognitive modelling


 Part of cognitive science

 Once we have a sufficiently precise theory of the mind, it


becomes possible to express the theory as a computer
program

6
Thinking rationally

 The “laws of thought” or logic

 Aristotle was one of the first to introduce logic or “right


thinking”

 Syllogisms provided patterns for argument structure


 Correct premises = correct solutions

 Example:

He is a boy; All boys are handsome;

Therefore, he is handsome

7
Acting rationally

 Rational behavior: doing the right thing

 The right thing: that which is expected to maximize goal


achievement given the available information
 Example:

Given money JD. 100, you have to buy a birthday gift

Which one will you choose? Which one is more rational?


– Bracelet (JD. 500) or Ring (JD. 70)

8
Rational Agent

 An agent
 Just something that acts

 A rational agent
 One that acts as to achieve the best (expected) outcome

 The rational-agent approach has two advantages:


 It is more general than the “laws of thought” approach

 it is more amenable to scientific development

9
AI Applications

 Speech Recognition
 Virtual Assistants
 Siri (Apple)
 Google Now
 Cortana (Microsoft)
 They helps us to arrange meetings,
check weather, do a phone call,
send a message, etc.

 Machine Translation
 Google Translate
 No more bringing dictionary when
travelling

10
AI Applications

 Recommendation Systems
 AI helps to provide items / photos / various things based on our
social activities.

 Robotics
 Several robots were deigned to perform various tasks

11
AI Applications

 Search Engines
 Google’s search engines algorithm is designed to show internet
pages of our interests in a blink of eyes

 Email Sender:
• asdadsa@asda.com
 Spam/Junk email detection • sdajhda@afasa.com
• asdjhaksdah@asffa.com
Title:
• Hi, I need your help!
• 1 million dollar for you now!
• [blank]
Content:
• Congrats, you won XXX
Awards. Please tell me your
name, address, birth date, and
telephone number to 12
xxx_awards@gmail.com
AI Applications

 Face Detection

13
AI Applications
 Face Recognition

 China’s facial recognition technology to identify the citizen

 Face Recognition (for Security Purposes /phone lock)

 Games

 Chess (1997): Kasparov vs. IBM Deep Blue

 Powerful search algorithms

 Jeopardy! (2011): Humans vs. IBM Watson

 Natural language processing and information extraction

 Go (2016): Lee Sedol vs. Google AlphaGo

 Deep learning + reinforcement learning + search algorithms!

 OpenAI Five 2016–2019


14
AI Applications

 Autonomous Driving
 NuTonomy: A robo-taxi service in Singapore

 Waymo: An autonomous car company under Alphabet, Inc.

15
Foundation of AI

Philosophy

Linguistics Mathematics

Control
Theory and
Cybernetics AI Economics

Computer
Neuroscience
Engineering

Psychology

16
Foundation of AI

 Philosophy
 Logic, methods of reasoning

 Foundations of learning, language, rationality

 Mathematics
 Logic: Formal representation and proof

 Algorithms, computation, (un)decidability, (in)tractability

 Probability

17
Foundation of AI

 Economics
 Formal theory of rational decisions

 Neuroscience
 Plastic physical substrate for mental activity

 Psychology
 Adaptation

 Phenomena of perception and motor control

 Experimental techniques (psychophysics, etc.)

18
Foundation of AI

 Computer Engineering
 How can we build an efficient computer to build AI program?

 Control Theory and Cybernetics


 Simple optimal agent designs

 Linguistics
 Knowledge representation

 Grammar

19
Brief History of AI

20
Agent
 An agent is anything that can be viewed as perceiving its
environment through sensors and acting upon that
environment through actuators.

21
Agent

A vacuum-cleaner world with just two locations


Percept: location and contents, i.e. [A, Dirty]
Actions: Left, Right, Suck, NoOp
22
Agent

Partial tabulation of the simple agent function

23
Concept of Rationality

Definition of a rational agent:

 For each possible percept sequence, a rational agent should


select an action that is expected to maximize its
performance measure, given the evidence provided by the
percept sequence and whatever built-in knowledge the
agent has.

24
Task Environments

To build a rational agent, we need to first define the PEAS:

 P (Performance)

 E (Environment)

 A (Actuators)

 S (Sensors)

25
What is PEAS for?

 Autonomous car
 Performance: safety, destination, legality, comfort

 Environment: streets, pedestrian, highway, weather

 Actuators: steering, accelerator, brake, horn

 Sensors: video, GPS, accelerometer, keyboard

26
Structure of Intelligent Agents
 Agent = Architecture + Program
 Architecture is the hardware

Sensors + Actuators

 Program is the software

Program

27
Agent Types

Four basic type of agents:

 Simple reflex agents

 Modal-based reflex agents

 Goal-based agents

 Utility-based agents

All of which can be generalized into learning agents that can


improve their performance and generate better actions.
28
Simple Reflex Agents

An action is done based on the current state only. Ignore


the sensors history.

29
Modal-based Reflex Agents
The sensors and actions history is used to model the
world / environment. An action is done based on the
world model.

30
Goals-based Agents
An action is done based on the combined information
from the world model and goal information.

31
Utility-based Agents
An action is done based on the agent happiness
(utility).
It is the agent’s performance measure.

32
Learning Agents

Programming agents by hand can be very tedious.


Some more expeditious method seem desirable" Alan
Turing, 1950.

33
Expert Systems
References

 Stuart Russell, Peter Norvig. 2010. Artificial Intelligence : A


Modern Approach. Pearson Education. New Jersey.
ISBN:9780132071482

35

You might also like