Nothing Special   »   [go: up one dir, main page]

AI Lec01

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

ARTIFICIAL INTELLIGENCE

LECTURE 01 Shahela Saif


INSTRUCTOR
Shahela Saif

Faculty Cabins, Ground floor


Academic Block II

Shahela.saif@comsats.edu.pk
GRADING
Quiz / Assignment 25%
 There will be surprise quizzes. It can be taken at any time during Lecture.
Assignments will be announced with a specific
deadline. Instructions will be provided along with the
assignment statement.

Mid Term 25%


Final Exam 50%

Late Policy: Assignments will not be accepted later than the deadline.

3
PLAGIARISM POLICY
Any assignment found 30% or more copied from the internet will be marked 0
(ZERO).

Any assignment copied from the class mate will also be marked 0 (ZERO).
 Both for the source and the copied one.

No consideration will be made regarding plagiarized assignments.

4
COURSE DETAILS
Course Title: CSC 462 Artificial Intelligence
Pre Req: CSC 102 Discrete Structures
Credits: 3 + 1
Course Contents:
This course gives a broad overview of the fundamental theories and techniques of
Artificial Intelligence. Topics include: Overview of Artificial Intelligence; Agents &
Environments; Problem-Solving; Adversarial Search; Constraint Satisfaction Problems;
Knowledge Representation & Reasoning; Uncertainty; and Automated Planning.
RESOURCES
1. Artificial Intelligence: A Modern Approach 4th Edition, Russell, S., & Norvig, P.,
(2020), Prentice Hall

We will refer to other sources whenever the need be.


SYLLABUS
OBJECTIVES
COURSE LEARNING OUTCOMES
SOPHIA – HANSON ROBOTICS
https://youtu.be/S5t6K9iwcdw
GRACE
AI APPLICATIONS
Autonomous Planning & Scheduling:
 Autonomous rovers.
AI APPLICATIONS
Autonomous Planning & Scheduling:
Telescope scheduling
AI APPLICATIONS
Autonomous Planning & Scheduling:
Analysis of data:
AI APPLICATIONS
Medicine:
Image guided surgery
AI APPLICATIONS
Medicine:
Image analysis and enhancement
AI APPLICATIONS
Transportation:
 Autonomous vehicle control:
AI APPLICATIONS
Transportation:
 Pedestrian detection:
AI APPLICATIONS
Games:
AI APPLICATIONS
Games:
AI APPLICATIONS
Robotic toys:
AI APPLICATIONS
Other application areas:
Bioinformatics:
 Gene expression data analysis
 Prediction of protein structure
Text classification, document sorting:
 Web pages, e-mails
 Articles in the news
Video, image classification
Music composition, picture drawing
Natural Language Processing .
Perception.
WHAT IS ARTIFICIAL INTELLIGENCE
WHAT IS ARTIFICIAL INTELLIGENCE ?
making computers that think?
the automation of activities we associate with human thinking, like decision making,
learning ... ?
the art of creating machines that perform functions that require intelligence when
performed by people ?
the study of mental faculties through the use of computational models ?
WHAT IS ARTIFICIAL INTELLIGENCE ?
the study of computations that make it possible to perceive, reason and act ?
a field of study that seeks to explain and emulate intelligent behaviour in terms of
computational processes ?
a branch of computer science that is concerned with the automation of intelligent
behaviour ?
anything in Computing Science that we don't yet know how to do properly ? (!)
AREAS OF AI AND SOME DEPENDENCIES
Knowledge
Search Logic Representation

Machine
Planning
Learning

Expert
NLP Vision Robotics Systems
WHAT IS ARTIFICIAL INTELLIGENCE ?

THOUGHT Systems that thinkSystems that think


like humans rationally

Systems that act Systems that act


BEHAVIOUR like humans rationally

HUMAN RATIONAL
SYSTEMS THAT ACT LIKE HUMANS:
TURING TEST
“The art of creating machines that perform functions that require intelligence when
performed by people.” (Kurzweil)

“The study of how to make computers do things at which, at the moment, people are
better.” (Rich and Knight)
SYSTEMS THAT ACT LIKE HUMANS

?
You enter a room which has a computer terminal.
You have a fixed period of time to type what you
want into the terminal, and study the replies. At the
other end of the line is either a human being or a
computer system.
If it is a computer system, and at the end of the
period you cannot reliably determine whether it is
a system or a human, then the system is deemed to
be intelligent.
TURING TEST
SYSTEMS THAT ACT LIKE HUMANS

The Turing Test approach


 a human questioner cannot tell if
 there is a computer or a human answering his question, via teletype (remote communication)
 The computer must behave intelligently

Intelligent behavior
 to achieve human-level performance in all cognitive tasks
SYSTEMS THAT ACT LIKE HUMANS
These cognitive tasks include:
 Natural language processing
 for communication with human
 Knowledge representation
 to store information effectively & efficiently
 Automated reasoning
 to retrieve & answer questions using the stored information
 Machine learning
 to adapt to new circumstances
THE TOTAL TURING TEST
Includes two more issues:

 Computer vision
to perceive objects (seeing)
 Robotics
to move objects (acting)
WHAT IS ARTIFICIAL INTELLIGENCE ?

THOUGHT Systems that thinkSystems that think


like humans rationally

Systems that act Systems that act


BEHAVIOUR like humans rationally

HUMAN RATIONAL
SYSTEMS THAT THINK LIKE HUMANS:
COGNITIVE MODELING
Humans as observed from ‘inside’
How do we know how humans think?
 Introspection vs. psychological experiments

Cognitive Science
“The exciting new effort to make computers think … machines with minds in the full
and literal sense” (Haugeland)
“[The automation of] activities that we associate with human thinking, activities such as
decision-making, problem solving, learning …” (Bellman)
WHAT IS ARTIFICIAL INTELLIGENCE ?

THOUGHT Systems that thinkSystems that think


like humans rationally

Systems that act Systems that act


BEHAVIOUR like humans rationally

HUMAN RATIONAL
SYSTEMS THAT THINK ‘RATIONALLY’
"LAWS OF THOUGHT"
Humans are not always ‘rational’
Rational - defined in terms of logic?
Logic can’t express everything (e.g. uncertainty)
Logical approach is often not feasible in terms of computation time (needs ‘guidance’)
“The study of mental facilities through the use of computational models” (Charniak
and McDermott)
“The study of the computations that make it possible to perceive, reason, and act”
(Winston)
WHAT IS ARTIFICIAL INTELLIGENCE ?

THOUGHT Systems that thinkSystems that think


like humans rationally

Systems that act Systems that act


BEHAVIOUR like humans rationally

HUMAN RATIONAL
SYSTEMS THAT ACT RATIONALLY:
“RATIONAL AGENT”
Rational behavior: doing the right thing
The right thing: that which is expected to maximize goal achievement, given the
available information
Giving answers to questions is ‘acting’.
SYSTEMS THAT ACT RATIONALLY
Logic  only part of a rational agent, not all of rationality
 Sometimes logic cannot reason a correct conclusion
 At that time, some specific (in domain) human knowledge or information is used

Thus, it covers more generally different situations of problems


 Compensate the incorrectly reasoned conclusion
SYSTEMS THAT ACT RATIONALLY
Study AI as rational agent –
2 advantages:
 It is more general than using logic only
 Because: LOGIC + Domain knowledge
 It allows extension of the approach with more scientific methodologies
From the above definitions, we can see that AI has two major roles:
 Study the intelligent part concerned with humans.
 Represent those actions using computers.
GOALS OF AI
To make computers more useful by letting them take over dangerous or tedious tasks
from human
Understand principles of human intelligence
AI VS MACHINE LEARNING VS DEEP LEARNING
USING AI
Problem:
Given a set of connected points, find if the points form a circle or a
square?
USING AI
Features
 1) Number of corners
 2) Number of equal Sides

Rule base:
If (number of corners == 4) and (equal sides == 4)
points form square
Else
points form circle
PROBLEM WITH CLASSICAL AI

Square or a circle?
USING ML
Features
 1) Number of corners
 2) Equal Sides

Training Phase:
1) Take 3 examples of circles and 3 examples of squares
2) For each example, compute features (number of corners
number of sides that are equal)
3) Also tell the computer that whether extracted features
are taken from a circle or a square
USING ML: FEATURE SPACE
During training, we give machine all
examples of different shapes that
look similar to a circle or square

Red ones similar to a circle, blue ones


similar to a square.
USING ML: FEATURE SPACE
Class Number of Number of
corners equal sides
Square 5 5

Square 4 4

Circle 2 2

Square 3 2

Circle 0 0

Circle 1 0
USING ML: FEATURE SPACE
Testing Phase:
Let’s determine whether a set of points
belonging to a rectangle is classified
as a square or a circle?

Nearest Neighbor Approach:


Compute features of the test object
Test point
and find that example in training the Closest point in
training belongs to a
features of which is most similar to this square
test case.
USING ML: FEATURE SPACE
Class Number of Number of
corners equal sides
Square 5 5

Square 4 4

Circle 2 2

Square 3 2

Circle 0 0

Circle 1 0

Class Number of Number of


corners equal sides
? 4 2
USING DL
No need of determining features
Just let an artificial neural network learn
what type of features are useful for a given
task.
In classical AI and ML, we don’t feed all
points to an algorithm directly. We first
compute features and then feed those
computed features only.
In DL, we don’t compute features, we feed
input directly to a network.
(x1, y1)

USING DL (x2, y2)


a2
a1 a11
circle
Assume that every example contain 10 a3
points arranged in circle or a square. a4 no
Training Phase:
1) Take 3 examples of circles and 3 examples of If > 0
squares
2) Also tell the computer that whether extracted yes
features are taken from a circle or a square
3) For each example, adjust 11 parameters such
that the output for each example is +ve for square
circle and –ve for square.

a10
(x10, y10)

a1*(x1+y1)+a2*(x2+y2)+….+a10*(x10+y10)+a11 > 0 (for all square examples in training)


a1*(x1+y1)+a2*(x2+y2)+….+a10*(x10+y10)+a11 <= 0 (for all circle examples in training)
(x1, y1)

USING DL (x2, y2)


a2
a1 a11
circle
The whole purpose of training is to calculate a3
set of 11 parameters (a1,a2,…,a11) a4 no
Test Phase:
Multiply and add those 11 parameters with input If > 0
test points to see if the output is +ve or –ve. If
+ve then given test case/example is a square,
otherwise a circle. yes

a1*(x1+y1)+a2*(x2+y2)+….+a10*(x10+y10)+a11 = ?
square

a10
(x10, y10)
SUMMARY
Scheme Training Set required Pre-Determined Features
required

AI No Yes

ML Yes Yes

DL Yes No

You might also like