0% found this document useful (0 votes)
41 views

Artificial Intelligence

Artificial intelligence (AI) is the field concerned with building intelligent computer systems that can perform tasks normally requiring human intelligence. The key aspects of intelligence include understanding, reasoning, problem solving, learning, and more. While early definitions of AI focused on making computers behave like humans, modern definitions emphasize rational behavior and acting intelligently to achieve goals. Passing the Turing test, in which a computer convinces a human it is also human, remains a benchmark. Fully achieving human-level AI will require capabilities like natural language, vision, learning, and common sense. AI has practical applications today and continues advancing towards more human-like intelligent behavior.
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)
41 views

Artificial Intelligence

Artificial intelligence (AI) is the field concerned with building intelligent computer systems that can perform tasks normally requiring human intelligence. The key aspects of intelligence include understanding, reasoning, problem solving, learning, and more. While early definitions of AI focused on making computers behave like humans, modern definitions emphasize rational behavior and acting intelligently to achieve goals. Passing the Turing test, in which a computer convinces a human it is also human, remains a benchmark. Fully achieving human-level AI will require capabilities like natural language, vision, learning, and common sense. AI has practical applications today and continues advancing towards more human-like intelligent behavior.
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/ 96

Artificial Intelligence

Unit - 1
Introduction
• AI
– concerned with getting computer doing the task
of human intelligence
– Attempts not just to understand but also build
intelligent entities.
– Systematizes and automates intellectual tasks and
is therefore potentially relevant to any sphere of
human intellectual activity
What Is Intelligence
• Elements
Understanding reasoning
problem solving learning
common sense generalization
inference analogy
recall intuition
emotion self-awareness
What is AI?
• Computational models of human behavior
- programs that behave like human
• Computational models of human thought process
-programs that operate the way humans do
• Computational systems that think intelligently
• Computational systems that behave rationally
-does the “right thing” given what it knows.
Definitions of AI
Acting Humanly

• Alan Turing's 1950 article Computing


Machinery and Intelligence discussed
conditions for considering a machine to be
intelligent
• “Can machines think?”  “Can machines
behave intelligently?”
– The Turing test (The Imitation Game): Operational
definition of intelligence.
The Turing Test

• Computer needs to possess: Natural language


processing, Knowledge representation, Automated
reasoning, and Machine learning
• Are there any problems/limitations to the Turing
Test?
Acting Humanly: The Full Turing Test

Problem:
1) Turing test is not reproducible,
constructive, and amenable to
mathematic analysis.
2) What about physical interaction
with interrogator and environment?

Trap door

8
What would a computer need to pass
the Turing test?

Natural language processing: to communicate with examiner.


• Knowledge representation: to store and retrieve information
provided before or during interrogation.
• Automated reasoning: to use the stored information to
answer questions and to draw new conclusions.
• Machine learning: to adapt to new circumstances and to
detect and extrapolate patterns.

9
What would a computer need to pass
the Turing test?

• Vision (for Total Turing test): to recognize


the examiner’s actions and various objects
presented by the examiner.
• Motor control (total test): to act upon
objects as requested.
• Other senses (total test): such as audition,
smell, touch, etc.

10
Historic milestone in artificial
intelligence set by Alan Turing
• The 65 year-old iconic Turing Test was passed for
the very first time by computer programme
during Turing Test 2014 held at the renowned
Royal Society in London
• Eugene Goostman, a computer program with the
persona of a teenage Ukrainian boy, passed a
Turing Test competition at the University of
Reading
• The program fooled at least a third of the 30 judges
in to thinking it was human.
Thinking Humanly: Cognitive Science

• 1960 “Cognitive Revolution”: information-processing psychology


replaced behaviorism
• Cognitive science brings together theories and experimental
evidence to model internal activities of the brain
– What level of abstraction?
– How to validate models?
• Predicting and testing behavior of human subjects (top-
down)
• Direct identification from neurological data (bottom-up)
• Building computer/machine simulated models and
reproduce results (simulation)
12
Thinking Rationally: Laws of Thought
• Aristotle (~ 450 B.C.) attempted to codify “right
thinking”
What are correct arguments/thought processes?
• E.g., “Socrates is a man, all men are mortal;
therefore Socrates is mortal”
• Several Greek schools developed various forms of
logic:
notation plus rules of derivation for thoughts.

13
Acting Rationally: The Rational Agent
• Rational behavior: Doing the right thing!
• The right thing: That which is expected to maximize
the expected return
• Provides the most general view of AI because it
includes:
– Correct inference (“Laws of thought”)
– Uncertainty handling
– Resource limitation considerations (e.g., reflex vs.
deliberation)
– Cognitive skills (NLP, AR, knowledge representation, ML,
etc.)

14
Acting Rationally: The Rational Agent
• Advantages:
– More general
– Its goal of rationality is well defined

15
Typical AI Problems
• Intelligent entities (or agents) need to be able
to do both mundane and expert task:
• Mundane tasks:
– Planning route, activity
– Recognizing (through vision) people, objects.
– Navigating round obstacles on the street
• Expert tasks:
– Medical diagnosis
– Mathematical problem solving
What’s easy and hard
• Its easier to mechanize many of the high-level
tasks we usually associate with intelligence in
people
– Symbolic integration
– Proving theorem
– Playing chess
– Medical diagnosis
What’s easy and hard

• Its very hard to mechanize task that lots of


animals can do
– Walking around without running into things
– Catching prey and avoiding predators
– Interpreting complex sensory information
– Modeling the internal states of other animals from
their behaviour
Practical Impact of AI
• AI components are embedded in numerous
devices eg: copy machines.
• AI systems are in everyday use
– Detecting credit card fraud
– Configuring products
– Aiding complex planning tasks
– Advising physicians
• Intelligent tutoring system provide students
with personalized attention
Smart Car
• self-driving cars are moving closer and closer
to reality; Google’s self-driving car project and
Tesla’s “autopilot” feature are two examples
that have been in the news lately.
• The idea is that, eventually, the car will be
able to “look” at the road ahead of it and
make decisions based on what it sees, helping
it learn in the process
Smart Home Devices
• Many smart home devices now include the ability
to learn your behavior patterns and help you save
money by adjusting the settings on your thermostat
or other appliances in an effort to increase
convenience and save energy.
• the lights around your house (both inside and
outside) might adjust based on where you are and
what you’re doing; dimmer for watching TV,
brighter for cooking, and somewhere in the middle
for eating.
Security Surveillance
• A single person monitoring a number of video
cameras isn’t a very secure system; people get
bored easily, and keeping track of multiple
monitors can be difficult even in the best of
circumstances.
• seeing flashes of color that may indicate an
intruder or someone loitering around a
schoolyard
How to achieve AI?
• How is AI research done?
• AI research has both theoretical and experimental sides. The
experimental side has both basic and applied aspects.
• There are two main lines of research:
– One is biological, based on the idea that since humans are
intelligent, AI should study humans and imitate their
psychology or physiology.
– The other is phenomenal, based on studying and formalizing
common sense facts about the world and the problems that
the world presents to the achievement of goals.
– The two approaches interact to some extent, and both
should eventually succeed. It is a race, but both racers seem
to be walking. [John McCarthy]
23
Foundation of AI
AI is interdisciplinary
-Philosophy
• Can formal rules be used to draw valid conclusions?
• How does the mental mind arise from a physical brain?
• Where does knowledge come from?
• How does knowledge lead to action?
- Mathematics
• What are the formal rules to draw valid conclusion?
• What can be computed?
• How do we reason with uncertain information?
24
Foundation of AI…

- Economics
•How should we make decision so as to maximize payoff?
•How should we do this when others may not go along?
•How should we do this when the payoff may be far in future?

- Neuroscience
•How do brain process information?

- Psychology
•How do humans and animals think and act?
Foundation of AI…

- Computer Science
• How can we build efficient computers?

- Control theory and Cybernetics


• How can artifacts operate under their own control?

- Linguistics
• How does language relate to thoughts?
History of AI
Applications of AI
• Autonomous planning and scheduling
• Game playing
• Diagnosis
• Logistics Planning
• Robotics
• Language understanding and problem solving
Intelligent Agents
• Definition: An Intelligent Agent perceives it environment via sensors and acts
rationally upon that environment with its actuators.
• Hence, an agent gets percepts one at a time, and maps this percept sequence to
actions.
• Properties
–Autonomous
–Interacts with other agents
plus the environment
–Reactive to the environment
–Pro-active (goal- directed)
Example
Rationality
• An ideal rational agent should, for each possible percept sequence,
do whatever actions that will maximize its performance measure
based on
(1) the percept sequence, and
(2) its built-in and acquired knowledge.
• Hence it includes information gathering, not "rational ignorance."
• Rationality => Need a performance measure to say how well a task
has been achieved.
• Types of performance measures: payoffs, false alarm and false
dismissal rates, speed, resources required, effect on environment,
etc.
Autonomy
• A system is autonomous to the extent that its own behavior
is determined by its own experience and knowledge.
• Therefore, a system is not autonomous if it is guided by its
designer according to a priori decisions.
• To survive agents must have:
–Enough built- in knowledge to survive.
–Ability to learn.
What do you mean,
sensors/percepts and effectors/actions?

• Humans
– Sensors: Eyes (vision), ears (hearing), skin (touch), tongue
(gustation), nose (olfaction), neuromuscular system
(proprioception)
– Percepts:
• At the lowest level – electrical signals from these sensors
• After preprocessing – objects in the visual field (location,
textures, colors, …), auditory streams (pitch, loudness, direction),

– Actuators: limbs, digits, eyes, tongue, …
– Actions: lift a finger, turn left, walk, run, carry an object, …
• The Point: percepts and actions need to be carefully
defined, possibly at different levels of abstraction
Behavior and performance of IAs

• Perception (sequence) to Action Mapping: f : P*  A


– Ideal mapping: specifies which actions an agent ought to take at any
point in time
– Description: Look-Up-Table, Closed Form, etc.

• Performance measure: a subjective measure to characterize


how successful an agent is (e.g., speed, power usage, accuracy,
money, etc.)

CS 460, Lecture 2
A more specific example:
Automated taxi driving system
• Performance Measure: Maintain safety, reach destination,
maximize profits (fuel, tire wear), obey laws, provide
passenger comfort, …
• Environment: U.S. urban streets, freeways, traffic,
pedestrians, weather, customers, …
• Actuators: Steer, accelerate, brake, horn, speak/display, …
• Sensors: Video, sonar, speedometer, odometer, engine
sensors, keyboard input, microphone, GPS, …
• Different aspects of driving may require different types of
agent programs!
Examples of Agent Types and their Descriptions
Environment Types
• Characteristics
– Fully observable vs. partially observable
• Sensors give access to complete state of the environment.

– Deterministic vs. nondeterministic


• The next state can be determined based on the current state and
the action.

– Episodic vs. nonepisodic (Sequential)


• Episode: each perceive and action pairs
• The quality of action does not depend on the previous episode.

CS 460, Lecture 2
Environment Types
• Characteristics
– Single agent vs. multiagent

– Static vs. dynamic


• Dynamic if the environment changes during deliberation

– Discrete vs. continuous


• Chess vs. driving

CS 460, Lecture 2
Characteristics of environments

Observable Deterministic Episodic Static Discrete

Solitaire No Yes Yes Yes Yes

Backgammon Yes No No Yes Yes

Taxi driving No No No No No

Internet No No No No No
shopping
Medical No No No No No
diagnosis

→ Lots of real-world domains fall into the hardest case!


Environment types
Environment Accessible Deterministic Episodic Static Discrete

Operating
System
Virtual
Reality
Office
Environment
Mars

CS 460, Lecture 2
Environment types
Environment Accessible Deterministic Episodic Static Discrete

Operating Yes Yes No No Yes


System
Virtual
Reality
Office
Environment
Mars

CS 460, Lecture 2
Environment types
Environment Accessible Deterministic Episodic Static Discrete

Operating Yes Yes No No Yes


System
Virtual Yes Yes Yes/no No Yes/no
Reality
Office
Environment
Mars

CS 460, Lecture 2
Environment types
Environment Accessible Deterministic Episodic Static Discrete

Operating Yes Yes No No Yes


System
Virtual Yes Yes Yes/no No Yes/no
Reality
Office No No No No No
Environment
Mars

CS 460, Lecture 2
Environment types
Environment Accessible Deterministic Episodic Static Discrete

Operating Yes Yes No No Yes


System
Virtual Yes Yes Yes/no No Yes/no
Reality
Office No No No No No
Environment
Mars No Semi No Semi No

The environment types largely determine the agent design.

CS 460, Lecture 2
Structure of Intelligent Agents
• Agent = architecture + program
• Agent program: the implementation of f : P*  A, the
agent’s perception-action mapping
function Skeleton-Agent(Percept) returns Action
memory  UpdateMemory(memory, Percept)
Action  ChooseBestAction(memory)
memory  UpdateMemory(memory, Action)
return Action

• Architecture: a device that can execute the agent program


(e.g., general-purpose computer, specialized device, beobot,
etc.)
CS 460, Lecture 2
Some Agent Types
• Table-driven agents
– use a percept sequence/ action table in memory to find the next
action. They are implemented by a (large) lookup table.
• Simple reflex agents
– are based on condition-action rules and implemented with an
appropriate production (rule-based) system. They are stateless
devices which do not have memory of past world states.
• Agents with memory
– have internal state which is used to keep track of past states of the
world.
• Agents with goals
– are agents which in addition to state information have a kind of goal
information which describes desirable situations. Agents of this kind
take future events into consideration.
• Utility-based agents
– base their decision on classic axiomatic utility-theory in order to act
rationally.
Simple Reflex Agent
• Table lookup of percept- action pairs defining all
possible condition- action rules necessary to interact in
an environment
• Problems
– Too big to generate and to store
– No knowledge of non- perceptual parts of the current state
– Not adaptive to changes in the environment; requires entire table to be
updated if changes occur

• Use condition-action rules to summarize portions of


the table
A Simple Reflex Agent: Schema

Agent Sensors

Environment
What the world
is like now

What action I
Condition-action rules should do now

Effectors
Reflex Agent with Internal State
• Encode "internal state" of the world to remember the
past as contained in earlier percepts
• Needed because sensors do not usually give the entire
state of the world at each input, so perception of the
environment is captured over time. "State" used to
encode different "world states" that generate the same
immediate percept.
• Requires ability to represent change in the world; one
possibility is to represent just the latest state, but then
can't reason about hypothetical courses of action
Agents that Keep Track of the World
Goal- Based Agent

• Choose actions so as to achieve a (given or computed) goal.


• A goal is a description of a desirable situation
• Keeping track of the current state is often not enough -- need
to add goals to decide which situations are good
• Deliberative instead of reactive
• May have to consider long sequences of possible actions
before deciding if goal is achieved -- involves consideration of
the future, “what will happen if I do...?”
Agents with Explicit Goals
Utility- Based Agent

• When there are multiple possible alternatives, how to decide


which one is best?
• A goal specifies a crude distinction between a happy and
unhappy state, but often need a more general performance
measure that describes "degree of happiness"
• Utility function U: States --> Reals indicating a measure of
success or happiness when at a given state
• Allows decisions comparing choice between conflicting goals,
and choice between likelihood of success and importance of
goal (if achievement is uncertain)
A Complete Utility- Based Agent

Sensors

State What the world


is like now

Environment
How the world evolves

What it will be like


What my actions do if I do action A

How happy I will


Utility be in such a state

What action I
should do now

Effectors
Summary
• An agent perceives and acts in an environment, has an architecture
and is implemented by an agent program.
• An ideal agent always chooses the action which maximizes its
expected performance, given percept sequence received so far.
• An autonomous agent uses its own experience rather than built- in
knowledge of the environment by the designer.
• An agent program maps from percept to action & updates its
internal state.
– Reflex agents respond immediately to percpets.
– Model based Reflex agents maintain internal state to track aspect of
the world
– Goal-based agents act in order to achieve their goal( s).
– Utility-based agents maximize their own utility function.
• Representing knowledge is important for successful agent design.
• Some environments are more difficult for agents than others. The
most challenging environments are inaccessible, non-deterministic,
non-episodic, dynamic, and continuous.
What is NLP?
• Natural Language
– Refer to the language spoken by people eg: English,
Japanese, Hindi as opposed to artificial language like C+
+, java etc.
• Natural Language Processing
– Application that deal with natural language in a way or
another
• Computational Linguistics (CL)
– Computational aspects of the human language faculty
– More theoretical
• Huge amount of data is available
• Applications for processing large amount of text
– Text classification
– Index and search large text
– Machine Translation
– Speech Technology
– Information extraction
– Automatic Summarization
– Question Answering
– Knowledge Acquisition
– Text generation / Dialog generation
Artificial Intelligence

Robotics Natural Language Processing Search

Information Machine Language


Retrieval Translation Analysis

Semantics Parsing
Natural Language Processing
Linguistics Levels of Analysis
• Speech
• Written language
– Phonology: sounds / letters / pronunciation
– Morphology: the structure of words
– Syntax: how these sequences are structured
– Semantics: meaning of the strings
– Pragmatics: how context affects the meaning
• Interaction between levels
Issues in Syntax
“the dog ate my homework” - Who did what?
1. Identify the part of speech (POS)
Dog = noun ; ate = verb ; homework = noun
English POS tagging: 95%

2. Identify collocations
mother in law, hot dog
Compositional versus non-compositional
collocates
Issues in Syntax
• Shallow parsing:
“the dog chased the bear”
“the dog” “chased the bear”
subject - predicate
Identify basic structures
NP-[the dog] VP-[chased the bear]
Issues in Syntax
• Full parsing: John loves Mary

Help figuring out (automatically) questions like: Who did what


and when?
More Issues in Syntax
• Anaphora Resolution:
“The dog entered my room. It scared me”

• Preposition Attachment
“I saw the man in the park with a telescope”
Issues in Semantics
• Understand language! How?
• “plant” = industrial plant
• “plant” = living organism
• Words are ambiguous
• Importance of semantics?
– Machine Translation: wrong translations
– Information Retrieval: wrong information
– Anaphora Resolution: wrong referents
Issues in Semantics
• How to learn the meaning of words?
• From dictionaries:
plant, works, industrial plant -- (buildings for carrying on
industrial labor; "they built a large plant to manufacture
automobiles")
plant, flora, plant life -- (a living organism lacking the power of
locomotion)
They are producing about 1,000 automobiles in the new plant
The sea flora consists in 1,000 different plant species
The plant was close to the farm of animals.
Issues in Semantics
• Learn from annotated examples:
– Assume 100 examples containing “plant”
previously tagged by a human
– Train a learning algorithm
– How to choose the learning algorithm?
– How to obtain the 100 tagged examples?
Issues in Learning Semantics
• Learning?
– Assume a large amount of annotated data for
training
– Assume a new text not annotated for testing
• Learn from previous experience to classify
new data
• Decision trees, memory based learning, neural
network
– Machine learning
Issues in Information Extraction
• There was a group of 8-9 people close to the
entrance on Highway 24
• Who? 8-9 people
• Where highway24

• Extract information
• Detect new patterns
Issues in Information Retrieval
• General Model
– A huge collection of texts
– A query
• Task: find the document relevant to the given
query
• How? Create an index, like the index in a book
• Examples: Google, Yahoo, Altavista
Issues in Information Retrieval
• Index meaning
• Search for plant (= living organism) should not
retrieve texts with plant (= industrial plant)
• But should retrieve documents including flora
or other related terms
Natural Language Understanding
• All natural languages are as complex as each other.
– No language is best suited towards modeling or easier
to process
– Social factors influence the vocabulary of languages
• Relatively easy to drive natural language parsers
– Grammar for constrained English easy to write
– Can use lexicon of words and their grammatical usage
– Grammar can both recognize and generate sentences
Natural Language Understanding
• Making computers react intelligently to
human speech
• purpose:
– The most natural interface to computers
• Database query
• Problem specification
• Insight into human speech acquisition & use
Natural Language Generation
• It is the process of producing meaningful phrases and
sentences in the form of natural language from some
internal representation.
• It involves −
– Text planning : It includes retrieving the relevant content
from knowledge base.
– Sentence planning : It includes choosing required words,
forming meaningful phrases, setting tone of the sentence.
– Text Realization : It is mapping sentence plan into
sentence structure.
Applications
• speech processing: get flight information or book a
hotel over the phone
• information extraction: discover names of people and
events they participate in, from a document
• machine translation: translate a document from one
human language into another
• question answering: find answers to natural
language questions in a text collection or database
• summarization: generate a short biography of Noam
Chomsky from one or more news articles
Computer Vision
What is Computer Vision
• To do with seeing

• using information mediated by light in order to interact


successfully with the environment

• As much to do with biological systems as with computers, but


there are many different approaches:
– How do people and animals see?
– How can we make useful robots that see?
– What are the general computational structures that underlie vision?
– How do we reconstruct the 3rd dimension from 2-D images?
– How can we build machines to solve specific tasks involving vision?
Vision
• Process of sensing pattern of light energy and
developing interpretation of those patterns
• Sensing
– Gathers light from environment, focuses and projects
it on light sensitive surface and convert light to
electrochemical pattern of impulses
• Perception
– Transforms and compares transmitted impulse
pattern to prestored pattern together with some
inference
Human Vision
Computer Vision
• Computer vision is a field that includes methods
for acquiring, processing, analysing, and
understanding images and, in general, high-
dimensional data from the real world in order to
produce numerical or symbolic information, e.g.,
in the forms of decisions.
• It a discipline that studies how to reconstruct,
interpret and understand a 3D scene from its 2D
image in terms of properties of structure present
in the scene
Computer Vision
• Making useful decisions about real physical objects and
scenes based on images (Shapiro & Stockman, 2001)
• Extracting descriptions of the world from pictures or
sequences of pictures (Forsyth & Ponce, 2003)
• Analysing images and producing descriptions that can
be used to interact with the environment (Horn, 1986)
• Designing representations and algorithms for relating
images to models of the world (Ballard & Brown, 1982)
What do computer vision
programs actually do?
• Image processing, e.g. edge detection:

• Image processing is not computer vision —


but it is an important part of it.
• Work bottom-up to find structure in images.
What do computer vision
programs actually do?
• Motion detection:

• Finding shape:
Computer Vision Operations
• Image formation, sensing and digitization
• Local processing and image segmentation
• Shape formation and interpretation
• Semantic analysis and description
Low level vision Processing
• Only local processing is performed on the
numbers to reduce noise and other unwanted
picture elements, and to accentuate object
boundaries.
– Transforming light energy to numbers
– Processing the quantized arrays
– Texture and color
– Stereo and optic flow
Intermediate level Processing
• Graphical Edge Finding
• Region segmentation through splitting and merging
• Describing and labeling objects
High level Processing
• Knowledge structures for inference program
• Describing objects & interrelating an image
• Scene description
The “bottom-up” approach
• Work bottom-up to find structure
– Start from a grey-level array (the image, in effect)
– colour is usually ignored: not important for finding structure
– Primal sketch: edges, groupings of edges
– 2-D sketch: surface depth and orientations
– 3-D model: object shapes and relationships
• In some sense, the 3-D model is taken as the goal of the
visual processing.
• It can be used for matching against a database of object
shapes to achieve object identification.
Computer Vision Goals
• The bottom-up approach
– ‘traditional’ but still useful for framework for understanding what vision
programs do
• Better goal:
– Produce systems that enable successful interaction with the
environment (rather than aiming at a particular representation)
• navigating an autonomous vehicle along a road and past obstacles
• recognising human gestures and movements for computer control etc
– Work top-down and hypothesis-driven: start with an assumption of
what the system (e.g. robot) sees, and test whether the image matches
the hypothesis
– Dynamic vision: change and motion (‘optical flow’) are often more
important than recognising shape or inferring the 3rd dimension
Comparision
Computer Vision Natural Language Processing
• Sensing image • Speech recognition
• Low level processing • Syntactic language
processing
• Intermediate level • Semantic langugage
processing processing
• High level processing • Buiding and interpreting
high level knowledge
structures
Computer Vision vs. Image Processing
• Image processing studies image-to-image
transformation. The input and output of
image processing are both images. Typical
image processing operations include
• image compression
• image restoration
• image enhancement
Computer Vision vs. Image Processing
• Computer vision is the construction of explicit,
meaningful descriptions of physical objects from
their images.
• The output of computer vision are a description
or an interpretation or some quantitative
measurements of the structures in the 3D scene.
• Image processing and pattern recognition are
among many techniques computer vision
employs to achieve its goals.

You might also like