0% found this document useful (0 votes)
12 views49 pages

ITC Lect 02 (Computer Components AI) - REVISED

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views49 pages

ITC Lect 02 (Computer Components AI) - REVISED

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 49

Lecture 02: Components of Computer CS 101: Introduction to Computing

Components of Computer

Data Representation

and

AI
Dr. Zahid Halim

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Parts of a Computer
• There are two main parts of computers, hardware and software
– Hardware is all of the parts of the computer you can see ( ? ) and touch.
E.g.,
• Monitor, Keyboard, Processor, Memory, Circuits, Cables
etc
– Software refers to parts of the computer which do not have a material
form. E.g.,
• Data, Programs, Protocols etc

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer :
An External Look
• Casing [with components inside]
– Next slide
• Monitor
– Lets the user see how the computer is
responding to their command
• Keyboard
– For entering text commands
• Mouse
– Point-and-Click interface for
interacting with graphical
environment

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Internal Components (-1-)
• Inside the casing, we have a built-in power supply along with:
– Motherboard
• It is the central printed circuit board (PCB) where the
core components of your computer reside
– provides slots to host microprocessor, memory, driver controllers,
graphics card, modem, network card etc
– also provides electrical connections by which these hosted components
communicate

– Hard Disk Drive


• Permanent storage for data and programs. Also,
normally, your operating system is installed here.
– CD-ROM / DVD Player

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Internal Components (-2-)

Power Supply

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Motherboard:
Internal Components (-3-)
Connectors &
Ports
HDMI (High-Definition
Multimedia Interface) is a
compact audio/video interface
for transferring uncompressed
video data and
compressed/uncompressed
digital audio data from a HDMI-
compliant device to a
compatible computer monitor,
video projector etc.

RJ=Registered Jack

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Internal Components (-3-)
PCI Slot AGP Slot
[sound, network, [Graphics
modem] ]

IDE / ATA Connector


[hard disk, CD-ROM]

DRAM
Power Memory Slot for
Connector Slot Microprocesso
r
Motherboard: Sockets & Slots
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi
Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Internal Components (-4-)

Microprocessor

Graphics Card

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Internal Components (-5-)

RAM Network Card

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Internal Components (-6-)

Hard Disk Drive DVD RW

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer:
Peripherals
• A peripheral device is an equipment that might be
added to a computer system to enhance its
functionality
– Printer
– Digital camera
– Scanner
– Projector
– Joystick
– Graphics tablet

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Data Representation

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Data Representation
• Modern computers are digital devices
– A digital device works with discrete data, such as the digits
1 and 0
– An analog device works with continuous data

• Just as a standard light switch is a simpler technology


than a dimmer, so is digital when compared to analog
digital analog

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Number System

• We use decimal number system [base 10] when representing


numeric values in our daily life
– E.g., consider the number 123
• 123 = 100 + 20 + 3 = 1*102 + 2 * 101 + 3*100
• Most modern computer systems do not use the decimal
system to represent numeric values.
– Instead, they use a binary numbering system [base 2]
• Consisting of only two digits: 1 and 0
• Uses powers of 2 rather than 10

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Conversions

• Conversion from binary to decimal:


– (1011)2 = 1*23 + 0*22 + 1*21 + 1*20 = (11)10
• Conversion from decimal to binary:
2 125
2 62 – 1 2 16
2 31 – 0 2 8 – 0
2 15 – 1 (125)10 2 4 – 0
(16)10
2 7 – 1 = (1111101)2 2 2 – 0 = (10000)2
2 3 – 1 2 1 – 0
2 1 – 1

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Representing
Non-Numeric Data
• Some decimal values & their binary equivalents 
• In addition to numeric data, computers also
manipulate character data
• numbers, symbols, numerals that are not used
in arithmetic operations
– To represent them, codes have been developed
that specify binary equivalent for each character
• ASCII – 7 bits [Example table given ]
• Unicode – 16 bits Char Decimal Binary
A 65 100 0001
• Sounds and pictures must be transformed
B 66 100 0010
into a format the computer can understand
– A computer must digitize colors, notes, and 0 48 011 0000
instrument sounds into 1s and 0s 1 49 011 0001
$ 36 010 0100
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi
Lecture 02: Components of Computer CS 101: Introduction to Computing

Quantifying Bits and Bytes


• A bit is one binary digit (b):
– can have value either 0 or 1
• A byte is 8 bits (B)
– 0010 0100
• Kilo- means a 1000; Mega- means million; Giga -means billion
– Kilobit (Kb) is 1,024 bits
– Kilobyte (KB) is 1,024 bytes
– Megabyte (MB) is 1,048,576 bytes
– Gigabyte (GB) is 1,073,741,824 bytes
• Bits take the form of electrical pulses that can travel over
circuits
– Almost the same way as electricity flows over a wire when you turn on
a light switch
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi
Lecture 02: Components of Computer CS 101: Introduction to Computing

What is Intelligence?

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

What is Artificial Intelligence?

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Hardware

1011 neurons
1014 synapses
cycle time: 10-3 sec

107 transistors
1010 bits of RAM
cycle time: 10-9 sec

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Computer vs. Brain

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

•Conclusion
– In near future we can have computers with as many processing
elements as our brain, but:
far fewer interconnections (wires or synapses)
much faster updates.

•Fundamentally different hardware may


•require fundamentally different algorithms!
– Very much an open question.
– Neural net research.

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

What Level of Abstraction?


• Hardware (build brains)
• “network” (neural networks?)
• Algorithm + representation
• Intermediate Behavior (cognitive modeling)
• Task Performance (Deep Blue, Turing Test)
• Task Competence (Idealized view)

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Classical AI
• The principles of intelligence are separate from any hardware / software /
wetware implementation

• Look for these principles by studying how to perform tasks that require
intelligence

• Can we rely on simple tasks? (e.g., 8-puzzle, tic tac toe)

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Success Story: Medical Expert Systems

• Mycin (1980)
– Expert level performance in diagnosis of blood infections
• Today: 1,000’s of systems
– Everything from diagnosing cancer to designing dentures
– Often outperform doctors in clinical trials
– Major hurdle today – non-expert part – doctor/machine interaction

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Success Story:
Chess

I could feel – I could


smell – a new kind of
intelligence across
the table
- Kasparov

•Examines 5 billion positions / second


•Intelligent behavior emerges from brute-
force search

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Autonomous Systems

• In the 1990’s there was a growing concern that work in classical


AI ignored crucial scientific questions:
– How do we integrate the components of intelligence (e.g.
learning & planning)?
– How does perception interact with reasoning?
– How does the demand for real-time performance in a
complex, changing environment affect the architecture of
intelligence?

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Provide a standard problem where a


wide range of technologies can be
integrated and examined
By 2050, develop a team of fully
autonomous humanoid robots
that can win against the human
world champion team in soccer.

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Software Robots (softbots)


• Softbots: ‘intelligent’ program that uses software tools on a
person’s behalf.

• Sensors = LS, Google, etc.


• Effectors = RM, ftp, Amazon.com

• Software: not physical but not simulated.


• Active: not a help system (softbot safety!)

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Key Hard Problem for AI

• Today’s successful AI systems


– operate in well-defined domains
– employ narrow, specialize knowledge

• Commonsense Knowledge
– needed to operate in messy, complex, open-ended
worlds
• Your kitchen vs. GM factory floor
– understand unconstrained Natural Language

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
Role of Knowledge in Natural Language
Understanding

• Speech Recognition
– “word spotting” feasible today
– continuous speech – rapid progress
– turns out that “low level” signal not as ambiguous as we once
thought
• Translation / Understanding
– very limited progress
The spirit is willing but the flesh is weak. (English)
The vodka is good but the meat is rotten. (Russian)

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Syntactic, Semantic, Analogical Knowledge


• Time flies like an arrow.

• Fruit flies like a banana.

• Fruit flies like a rock.

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

How to Get Commonsense?


• CYC Project (Doug Lenat, Cycorp)
– Encoding 1,000,000 commonsense facts about the world by hand
– Coverage still too spotty for use!

• Alternatives?
• Open Mind
• KnowItAll

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Historical Perspective

• (4th C BC+) Aristotle, George Boole, Gottlob


Frege, Alfred Tarski
– formalizing the laws of human thought
• (16th C+) Gerolamo Cardano, Pierre Femat,
James Bernoulli, Thomas Bayes
– formalizing probabilistic reasoning
• (1950+) Alan Turing, John von Neumann,
Claude Shannon
– thinking as computation
• (1956) John McCarthy, Marvin Minsky, Herbert
Simon, Allen Newell
– start of the field of AI

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Recurrent Themes
• Neural nets vs AI
– McCulloch & Pitts 1943
– Died out in 1960’s, revived in 1980’s
• Neural nets vastly simplified model of real neurons, but still
useful & practical – massive parallelism
• particular family of learning and representation techniques
• Logic vs Probability
– In 1950’s logic seemed more computationally &
expressively attractive (McCarthy, Newell)
• attempts to extend logic “just a little” to deal with the fact that the
world is uncertain!
– 1988 – Judea Pearl’s work on Bayes nets
• provided efficient computational framework
– Today – no longer rivals
• hot topic: combining probability & first-order logic

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Recurrent Themes, cont.


• Weak vs Strong Methods
– Weak – general search methods
• A* search, constraint propagation, ...
– Rise of “knowledge intensive” approach
• expert systems
• more knowledge, less computation
– Today: resurgence of weak methods
• desktop supercomputers
• in highly competitive domains (Chess) exceptions to the general rules are most
important!
– How to combine weak and strong methods seamlessly?

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

(Re-)Current Themes
• Combinatorial Explosion
• Micro-world successes don’t scale up.
• How to Organize and accumulate large amounts of knowledge?
• How to translate from informal, ill-structured statements to
formal reasoning (e.g., understand a story)?
• What are reasonable simplifying assumptions?

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

The Turing Test

• 1950 – Alan Turing


devised a test for
intelligence called the
Imitation Game
– Ask questions of two
entities, receive answers Questions
from both Answers Answers
– If you can’t tell which of
the entities is human and
which is a computer
program, then you are
fooled and we should
therefore consider the Which is the person?
computer to be intelligent Which
Ghulam Ishaq Khan Institute of Engineering Sciences and is the
Technology, computer?
Topi
Lecture 02: Components of Computer CS 101: Introduction to Computing

Why “Learn” ?
• Machine learning is programming computers to optimize a
performance criterion using example data or past experience.
• There is no need to “learn” to calculate payroll
• Learning is used when:
– Human expertise does not exist (navigating on Mars),
– Humans are unable to explain their expertise (speech recognition)
– Solution changes in time (routing on a computer network)
– Solution needs to be adapted to particular cases (user biometrics)

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing
What We Talk About When We Talk
About“Learning”
• Learning general models from a data of particular examples
• Data is cheap and abundant (data warehouses, data marts);
knowledge is expensive and scarce.
• Example in retail: Customer transactions to consumer behavior:
People who bought “Da Vinci Code” also bought “The Five People You
Meet in Heaven” (www.amazon.com)
• Build a model that is a good and useful approximation to the
data.

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Data Mining
• Retail: Market basket analysis, Customer relationship
management (CRM)
• Finance: Credit scoring, fraud detection
• Manufacturing: Optimization, troubleshooting
• Medicine: Medical diagnosis
• Telecommunications: Quality of service optimization
• Bioinformatics: Motifs, alignment
• Web mining: Search engines
• ...

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Classification

• Example: Credit
scoring
• Differentiating
between low-risk
and high-risk
customers from their
income and savings

Discriminant: IF income > θ1 AND savings > θ2


THEN low-risk ELSE high-risk

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Classification: Applications
• Aka Pattern recognition
• Face recognition: Pose, lighting, occlusion (glasses, beard),
make-up, hair style
• Character recognition: Different handwriting styles.
• Speech recognition: Temporal dependency.
– Use of a dictionary or the syntax of the language.
– Sensor fusion: Combine multiple modalities; eg, visual (lip image) and
acoustic for speech
• Medical diagnosis: From symptoms to illnesses
• ...

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Face Recognition

Training examples of a person

Test images

AT&T Laboratories, Cambridge UK


http://www.uk.research.att.com/facedatabase.html

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Regression

• Example: Price of a used


car
• x : car attributes y = wx+w0
y : price
y = g (x | θ)
g ( ) model,
θ parameters

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Regression Applications

• Navigating a car: Angle of the steering wheel (CMU


NavLab)
• Kinematics of a robot arm
(x,y) α1= g1(x,y)
α2= g2(x,y)
α2

α1

 Response surface design

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Supervised Learning: Uses


• Prediction of future cases: Use the rule to predict the output for
future inputs
• Knowledge extraction: The rule is easy to understand
• Compression: The rule is simpler than the data it explains
• Outlier detection: Exceptions that are not covered by the rule,
e.g., fraud

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Unsupervised Learning
• Learning “what normally happens”
• No output
• Clustering: Grouping similar instances
• Example applications
– Customer segmentation in CRM
– Image compression: Color quantization
– Bioinformatics: Learning motifs

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi


Lecture 02: Components of Computer CS 101: Introduction to Computing

Reinforcement Learning
• Learning a policy: A sequence of outputs
• No supervised output but delayed reward
• Credit assignment problem
• Game playing
• Robot in a maze
• Multiple agents, partial observability, ...

Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi

You might also like