Introduction To AI

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

Introduction to AI

Subject : Artificial Intelligence

Course: Bachelor of Computer Science, &


Bachelor of Computer Engineering

Asst. Professor SSS Shameem


SOSE, MIU
Content

• Definition of AI

• Example Systems

• Approaches to AI

• Brief History

• Current Position

• AI Foundation

• AI Techniques

AI
Sofia – First Humanoid Robot to get Siri - Virtual/intelligent assistant
UAE citizenship

Google Driverless Car AI Kuka Ping Pong Robot


The Chess Terminator Deep Blue defeating Kasparov

Artificial Limbs AI AI for life


Deep Blue

• 1997; Deep Blue (Team IBM) defeats

chess world Grand Master, Gary Kasparov

• "Within ten years a digital computer will be the world's chess champion unless
the rules bar it from competition.” Allen Newell (1957)

• Combinatorial explosion:

o in middle part of game, about 36 moves possible.

o opponent can respond to your moves in 36 different ways.

o So to consider effect of your moves, need to consider 1296 possibilities

o Following move, 1,679,616 possibilities


AI
• One of the first AI programs

• Arthur Samuel, checkers playing program

• Credit assignment problem

o which of the many moves was responsible for winning?

• Samuel introduced static evaluation

• One version of program played against another;

o One used randomly modified static evaluation function, the other didn’t
change.

o If randomly modified version did better, then that version was adopted for next
round
Intelligence
What is the result of this operation

543 * 431 = 234033

How to rate Intelligencee for answering this?


• Time
• Accuracy
• Resource utilization

If someone manage to find the answer within 2 second, can we say the person is
intelligent???

In case of Computer??

• What if same question asked to computer; can the computer be called intelligent?
AI
Intelligence …

(1) What are the objects in the following picture,


(2) How many wind-mills?

if asked to computer?
AI
Intelligence …

• Human intelligence is different from computer/machine intelligence


(artificial).

• What may be described as intelligent for human may not be described as


intelligent for system and vice versa.

• There is no specific measurable definition for the word “Intelligent”.. Its


relative/condition-based.

o The ability to acquire and apply knowledge and skills.

o Ability to learn or understand or to deal with new or


uncontrolled situations by applying knowledge.

AI
Difference between Human and Machine Intelligence

• Humans perceive by patterns whereas the machines perceive by set of rules


and data.

• Humans store and recall information by patterns, machines do it by


searching algorithms.

o For example, the number 40404040 is easy to remember (by human),


store, and recall as its pattern is simple.

• Humans can figure out the complete object even if some part of it is missing
or distorted; whereas the machines cannot do it correctly (in general).

AI
Difference between Human and Machine Intelligence

Prime Minister of Malaysia

AI
Difference between Human and Machine Intelligence

AI
Artificial Intelligence

 Artificial: Not original (added to the system).


 Intelligence : “the ability to apply knowledge in order to perform better in an
environment.”

 Artificial intelligence as the study and construction of agent programs that perform
well in a given environment, for a given agent architecture.
 Agent as an entity that takes action in response to percept from an environment.
 Rationality is the property of a system which does “right thing” given what it knows.

AI
Artificial Intelligence

 Logical reasoning is the process of deriving new sentences from old, such that new
sentences are necessarily true if the old ones are true.

 Example:
 All MIU students are intelligent.
 Roshan is MIU student
====================
 Roshan is intelligent

AI
AI
• AI is actually concerned with design of intelligence in an artificial device.

• Term was coined by John McCarthy in 1955-56 in a famous conference (the


Dartmouth conference).

“The science and engineering of making intelligent machines,

especially intelligent computer programs”.

• Artificial Intelligence is a way of making a computer, computer-controlled robot, or


software to think intelligently, in the similar manner as (intelligent) humans think.

AI
AI . . .
What is intelligence?
Like Humans ..
• Behave as intelligently as a human

• Behave in the best possible manner

• Thinking

• Acting

Goals of AI
To Create Expert Systems − systems which exhibit intelligent behavior, learn, demonstrate,
explain, and advice its users.
To Implement Human Intelligence in Machines − Creating systems that understand,
think, learn, and behave like humans.

AI
AI Definitions
• AI is technology.
• Branch of computer science that studies and develops intelligent machines and software.
• The exciting new effort to make computers think … machines with minds, in the full
literal sense. (Haugeland, 1985)
• Study of mental faculties through the use of computational models. (Charniak &
McDermott, 1985)

• A field of study that seeks to explain and emulate intelligent behavior in terms of
computational processes. (Schalkoff, 1990)

• The study of how to make computers do things at which, at the moment, people are better.
(Rich & Knight, 1991)

• The art of creating machines that perform functions that require intelligence when
performed by people'' (Kurzweil, 1990)
AI
AI Definitions ...
• AI seeks to understand the working of the mind in mechanistic terms.

• Study of computations that make it possible to perceive, reason, & act (Winston, 1992)

• The automation of activities that we associate with human thinking, activities such as
decision-making, problem solving, learning ...'' (Bellman, 1978)

• The branch of computer science that is concerned with the automation of intelligent
behavior'' (Luger and Stubblefield, 1993)

• The goal of work in artificial intelligence is to build machines that perform tasks
normally requiring human intelligence. (Nilsson, Nils J. - 1971)

• Research scientists in AI try to get machines to exhibit behavior that we call intelligent
behavior when we observe it in human beings. (Slagle, James R. - 1971)

AI
Levels of needs
• Individual – machine as an amplifier of human capacity and intelligence

• Organizational

• Society

Individual level: Intelligent assistant able to

• Access & intelligent navigation in the world knowledge bases (scientific, music, sport,)

• Find relevant information and knowledge on demand.

• Understand documents/emails, make an abstract

• Manage my documents, files, emails using my logic

• Optimize tasks (travel, shopping, event..)

• Recognize visitors, automatic vacuum cleaner, advice…

• Tell me what I want at the right time.


Enterprise / Organizational level
• Same capacity as for individual + Effective management of innovation process

• Sharing learned knowledge relevant to a given point-of-view with relevant people

• Effective management of intellectual capital, “who knows what, who needs to know what,
and how to learn what is needed”

• Support for “business intelligence”: finding and checking relevant information

• Patent browsing for similarity determination

• Automated tools for pattern discovery and knowledge acquisition (individual & collective)

• Tool for building collective experience of the company

• Decision support for all professionals: diagnostic, configuration, problem solving, process
control

• Management of global security


Society

• Intelligent e-services (administration, tourism, RT education, call centers…)

• Intelligent connections between enterprises, university and investors

• Entertainment closer to the life (intelligent games, travel guides and tips, VR visit
of monuments with interaction (touch, smell…)

• Intelligent banking services

• Bank of knowledge and experience (health…)

• Services for older people

• Health services
Holistic Perspective
Multi-Lateral Agencies,
Society International Societal
5
Organizations

Countries, Consortia,
Nations/Regions 4 Regional Entities

Companies, Universities,
3 Government Agencies
Enterprise

Functions, Teams, Associations


2 Disciplines, SIG’s,
Groups Community of Practice

Employees, Suppliers,
Individual 1 Customers, Stakeholders,
Alliance, Partners
Why AI ?
• Better understanding of our brain capacity

• Better use of computer capacity

• More collective, multi-domain and multi-cultural intelligence

• Intuitive software

• H-M natural communication (New ways for communication)

• Extension of biological capabilities (mental and physical as well)

• Global Innovation Support Systems

• Better conservation and use of past knowledge and experience

• Contribution to the Sustainable Knowledge Society

• New dimension to fun and exploration


What Does AI Really Do?

• Knowledge Representation (how does a program represent its domain of discourse)

• Automated reasoning.

• Planning (get the robot to find the ball in the room).

• Machine Learning (adapt to new circumstances).

• Natural language processing (understanding).

• Machine vision,

• Speech recognition,

• Finding data on the web,

• Robotics, and much more.


AI
Programming With and Without AI

AI
Dimensions in AI Definitions

• Science of making a machine THINK and ACT like an intelligent person.

• Build intelligent artifacts by understanding human behavior.

• Should the system behave like a human or behave intelligently?

• Does it matter .. built it as long as it does the job well?

• Term intelligent is important to ensure that the actions and thinking that are being
imitated and incorporated in machine should be RATIONAL.

AI
AI …

Views of AI fall into four categories:

 Thinking humanly

 Thinking rationally

 Acting humanly

 Acting rationally

AI
Thinking Humanly: The Cognitive modelling approach

 Design a machine or a system that can think like humans. Hence,

 Machine can make decision .


 Machine can solve problem.
 Machine can learn

 If program’s input–output behaviour matches corresponding human behaviour, that


is evidence that some of the program’s mechanisms could also be operating in
humans.

AI
Thinking Rationally: The “laws of thought” approach

 Design a machine or a system that can think logically through applying some
laws (rules) which govern the operation of mind. Hence, it can solve problem
described in logical notation.

 Example:
 All students are good.
 Roshan is student
====================
 Roshan is good

 Two main obstacles to this approach.


1. Not easy to take informal knowledge & state in formal terms required by logical
notation, particularly when knowledge is less than 100% certain.
2. Big difference between solving a problem “in principle” & solving in practice.

AI
Acting humanly: The Turing Test approach

 Computer has to pass the Turing Test, proposed by Alan Turing (1950).
 provide a satisfactory operational definition of intelligence.
 Turing defined intelligent behavior as the ability to achieve human-level performance
in all cognitive tasks, sufficient to fool an interrogator.
 A computer passes the test if a human interrogator, after posing some written
questions, cannot tell whether the written responses come from a person or from a
computer.

Computer needs to possess following capabilities:


 Knowledge representation to store what it knows or hears;
 Natural language processing to enable it to communicate successfully in English;
 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.
AI
Acting rationally: The rational agent approach

 An agent is just something that acts.


 A rational agent is one that acts so as to achieve the best outcome or, when there is uncertainty,
the best expected outcome.
 Agent is expected to:
 Operate autonomously,
 perceive their environment,
 persist over a prolonged time period,
 adapt to RATIONAL AGENT change, and
 create and pursue goals.

The rational-agent approach has two advantages over the other approaches.
1. More general than “laws of thought” approach, because correct inference is just one of several
possible mechanisms for achieving rationality.
2. More amenable to scientific development than are approaches based on human behaviour or
human thought.
AI
AI definitions & categories
Thinking Humanly Thinking Rationally

“The study of mental faculties through the use of


“The exciting new effort to make computers think . .
computational models.” (Charniak and McDermott,
machines with minds, in the full and literal sense.”
1985)
(Haugeland, 1985)

“[The automation of] activities that we associate


“The study of the computations that make it possible
with human thinking, activities such as decision-
to perceive, reason, and act.” (Winston, 1992)
making, problem solving, learning . . .” (Bellman,
1978)

Acting Humanly Acting Rationally

“The art of creating machines that perform “Computational Intelligence is the study of the
functions that require intelligence when performed design of intelligent agents.” (Poole et al., 1998)
by people.” (Kurzweil, 1990)

“The study of how to make computers do things at


“AI . . . is concerned with intelligent behavior in
which, at the moment, people are better.” (Rich and
artifacts.” (Nilsson, 1998)
Knight, 1991)

AI
Intelligence
• The ability of a system to calculate, reason, perceive relationships and analogies, learn
from experience, store and retrieve information from memory, solve problems,
comprehend complex ideas, use natural language fluently, classify, generalize, and
adapt new situations.

• Intelligence Components:

• Reasoning

• Learning

• Problem Solving

• Perception

• Linguistic Intelligence
AI
Intelligence Components__ Reasoning
• Reasoning − It is the set of processes that enables us to provide basis for judgement,
making decisions, and prediction. (broadly two types)

AI
Intelligence Components__ Learning
• Learning − Activity of gaining knowledge or skill by studying, practising, being taught, or
experiencing something. Learning enhances the awareness of the subjects of the study.

• The ability of learning is possessed by humans, some animals, and AI-enabled systems.

• Auditory Learning − learn by listening & hearing. (students listening to recorded audio lectures)

• Episodic Learning − learn by remembering sequences of events (witnessed/experienced).


linear and orderly.

• Motor Learning − learn by precise movement of muscles. (picking objects, Writing, etc.)

• Observational Learning − learn by watching and imitating others. (child tries to learn by
mimicking)

• Perceptual Learning − learn to recognize stimuli (seen before). (identifying & classifying
objects/situations)

AI
Intelligence Components

• Relational Learning − learn to differentiate among various stimuli on the basis of


relational properties, rather than absolute properties.

• E.g., Adding ‘little less’ salt at the time of cooking potatoes that came up salty last
time, when cooked with adding say a tablespoon of salt.

• Spatial Learning − learn through visual stimuli such as images, colors, maps, etc.

• E.g., A person can create roadmap in mind before actually following the road.

• Stimulus-Response Learning − learn to perform a particular behavior when a certain


stimulus is present.

• E.g., a dog raises its ear on hearing doorbell

AI
Intelligence Components
Problem Solving − Process in which one perceives & tries to arrive at desired solution
from present situation by taking some path, that is blocked by known/unknown hurdles.

• Also includes decision making, which is the process of selecting the best suitable
alternative out of multiple alternatives to reach the desired goal are available.

Perception − Process of acquiring, interpreting, selecting, and organizing sensory


information.

• Perception presumes sensing. In humans, perception is aided by sensory organs. In the


domain of AI, perception mechanism puts data acquired by sensors together in a
meaningful manner.

Linguistic Intelligence − It is one’s ability to use, comprehend, speak, and write the verbal
and written language. It is important in interpersonal communication.
AI
Types of Intelligence

AI
Types of Intelligence . . .

AI
Foundation of Artificial Intelligence

• Computer engineering
• Mathematics
• Control theory
• Philosophy
• Economics
• Neuroscience
• Psychology
• Linguistics

AI
Foundation of Artificial Intelligence
1. Philosophy
Philosophers made AI conceivable by considering the ideas that the mind, in
some ways like a machine, operates on knowledge encoded in some internal
language, and that thought can be used to choose what actions to take.

 Can formal rules be used to draw valid conclusions?


 How does the mind arise from a physical brain?
 Where does knowledge come from?
 How does knowledge lead to action?

2. Mathematics
Mathematicians provided the tools to manipulate statements of logical
certainty as well as uncertain, probabilistic statements. They also set the
groundwork for understanding computation and reasoning about algorithms.

 What are the formal rules to draw valid conclusions?


 What can be computed?
 How do we reason with uncertain information?
AI
Foundation of Artificial Intelligence
3. Economics
Economists formalized the problem of making decisions that maximize the
expected outcome to the decision maker.

 How should we make decisions 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 the future?

4. Neuroscience
Neuroscientists discovered some facts about how brain works, and the ways in
which it is similar to and different from computers.

 How do brains process information?

5. Psychology
Psychologists adopted the idea that humans and animals can be considered
information processing machines.

 How do humans and animals behave (think and act)?


Foundation of Artificial Intelligence
6. Computer engineering

Computer engineers provided the ever-more-powerful machines that make AI


applications possible.

 How can we build an efficient computer?

7. Control theory
Control theory deals with designing devices that act optimally on the basis of
feedback from the environment. Initially, the mathematical tools of control
theory were quite different from AI, but the fields are coming closer together.

 How can artefacts operate under their own control?

8. Linguistics
 How does language relate to thought, and action?

AI
AI Techniques
• Case-Based Reasoning, &
• Rule-Based Reasoning

Case-Based Reasoning

 Case-based reasoning (CBR) solves a problem by recalling similar past problems


assumed to have similar solutions.
 Numerous past cases are needed to adapt their solutions or methods to the new
problem.
 problems are easier to solve by repeated attempts, accruing learning.
 CBR involves four steps:
• retrieve the most relevant past cases from the database;
• use the retrieved case to produce a solution of the new problem;
• revise the proposed solution by simulation or test execution; and
• retain the solution for future use after successful adaptation.
AI
AI Techniques

Case-Based Reasoning

AI
AI Techniques
Rule-Based Reasoning

 Rule-based systems (RBS) solve problems by rules derived from expert knowledge.
 The rules
 Have condition and action parts, If and Then.
 And are fed to an inference engine, which has :
 a working memory of information about the problem,
 a pattern matcher and,
 a rule applier.
 Pattern matcher refers to working memory to decide which rules are relevant, then the
rule applier chooses what rule to apply.
 New information created by the action (-THEN-) part of the rule applied is added to
working memory and the MATCH-SELECT-ACT cycle between working memory and
knowledge base repeats until no more relevant rules are found.
AI Techniques
Rule-Based Reasoning

 The facts and rules Uncertainty can be incorporated in RBS by approaches such as
subjective probability theory, Dempster-Shafer theory, possibility theory, certainty factors
and Prospector’s subjective Bayesian method, or qualitative approaches such as Cohen’s
theory of endorsements.

 They assign to the facts and rules uncertainty values (probabilities, belief functions,
membership values) given by human experts.

 There are two rule based systems: forward and backward chaining.

 Forward chaining is data-driven: from initial facts it draws conclusions using rules.
 Backward chaining is goal-driven: beginning with a hypothesis, it looks for rules
allowing it to be sustained.
 Forward chaining discovers what can be derived from the data, & backward chaining
seeks justification for decisions.

AI
AI Techniques
AI Techniques
Fuzzy logic

 A form of many-valued logic.

 In Boolean logic, the truth values of variables may only be 0 or 1.


 Fuzzy logic has been extended to handle the concept of partial truth, where the truth
value may range between completely true and completely false.

 A type of reasoning based on the recognition that logical statements (truth values of
variables) are not only true or false (white or black areas of probability) but can also
range from 'almost certain' to 'very unlikely' (gray areas of probability).

 Truth values of variables may be any real number between 0 and 1, considered to
be "fuzzy".

 Software based on application of fuzzy-logic allows computers to mimic human


reasoning more closely, so that decisions can be made with incomplete or uncertain
data.
AI
AI Techniques
Neural Network
• CPU is not capable of perceive and reasoning
(A neuron in a living biological system)
• Artificial neuron
o Each input is multiplied by a weighting factor.
o Output is 1 if sum of weighted inputs exceeds a threshold value; 0
otherwise.
• Network is programmed by adjusting weights using feedback from examples.
• Multi-processing architectures to model networks of concurrent neurons.
• Each processing unit in ANN is a simple device to simulate the neuron.
• Output of the unit may be 0 or 1, (or fractional numbers in-between),
dependent on whether its effective input exceeds a given threshold value.
AI Techniques

Neural Network

• Inspired by biological neural networks (central nervous systems of animals).

• These models are used to estimate or approximate functions that can depend on a large
number of inputs and are generally unknown.

• Artificial neural networks are generally presented as systems of interconnected


"neurons" which exchange messages between each other. The connections have numeric
weights that can be tuned based on experience, making neural nets adaptive to inputs
and capable of learning.

• A neural network uses rules it “learns” from patterns in data to construct a hidden layer of
logic.
• The hidden layer then processes inputs, classifying them based on the experience of the model.
• Neural network can be trained to distinguish between valid and fraudulent credit card
purchases.
AI Techniques
Neural Network__Example

 Suppose you wanted to predict what someone's profession is based on how much they
like Star Trek and how good they are at math.
 You gather several people into a room and you measure how much they like Star Trek
and give them a math test to see how good they are at math.
 You then ask what they do for a living.
 After that you create a plot placing each person on in based upon their Star Trek and
Math scores.

People are plotted based upon how


good they are at math and how much
they like Star Trek. The color is what
they do for a living
AI
AI Techniques
Neural Network__Example

 if few lines are drawn, creates borders between the groups of people.
 Judging A random/new person can be much easier.

• To classify people, single layer perceptron can be used.


• For each sample you push in, the neural network will produce an corresponding output.

 As a side note, single layer perceptron (algorithm for supervised learning) can be
analytically derived in one step.

 We will train the neural network by adjusting the weights in the middle until it starts
to produce the correct output.
AI
AI Techniques
Genetic Algorithm

• Simulate genetic processes to evolve algorithms


o Start with an initial population of “partial solutions.”
o Graft together parts of the best performers to form a new population.
o Periodically make slight modifications to some members of the current
population.
o Repeat until a satisfactory solution is obtained.

AI
AI Techniques
Genetic Algorithm

 A search heuristic that mimics the process of natural selection.

 Able to avoid becoming trapped in a "local optimum" solution, and is designed to


locate the "global optimum" solution.
 Genetic algorithm optimization is a significant improvement over traditional hill-
climb optimization technique.

 Genetic algorithm does not examine every single timing plan candidate, but is a
random guided search, capable of intelligently tracking global optimum solution.
 As with human race, weakest candidates are eliminated from the gene pool, and each
successive generation of individuals contains stronger and stronger characteristics.
 It’s survival of the fittest, and the unique processes of crossover and mutation
conspire to keep the species as strong as possible.
AI
AI Techniques

Robotics
• Began as a field within mechanical and electrical engineering
• Today encompasses a much wider range of activities
o Robot cup competition
o Evolutionary robotics

56
Some Applications of AI
Both are common in robotics, expert systems and natural language processing.

AI
Time Machine for AI Developments
 1943 McCulloch & Pitts: Boolean circuit model of brain

 1950 Turing's "Computing Machinery and Intelligence"

 1956 Dartmouth meeting: "Artificial Intelligence" adopted

 1952—69 Look, Ma, no hands!

 1950s Early AI programs, including Samuel's checkers program,

Newell & Simon's Logic Theorist, Gelernter's Geometry Engine

 1965 Robinson's complete algorithm for logical reasoning

 1966—73 AI discovers computational complexity; Neural network research almost disappears

 1969—79 Early development of knowledge-based systems

 1980-- AI becomes an industry

 1986-- Neural networks return to popularity

 1987-- AI becomes a science

 1995-- The emergence of intelligent agents


Achievements in AI

 Deep Blue defeated the reigning world chess champion Garry Kasparov in 1997

 Proved a mathematical conjecture (Robbins conjecture) unsolved for decades

 No hands across America (driving autonomously 98% of the time from Pittsburgh to
San Diego)

 During the 1991 Gulf War, US forces deployed an AI logistics planning and scheduling
program that involved up to 50,000 vehicles, cargo, and people

 NASA's on-board autonomous planning program controlled the scheduling of


operations for a spacecraft

 Proverb solves crossword puzzles better than most humans

AI
AI
Applications of AI

1. Pattern Recognition
2. Speech and Voice Recognition
3. Robotics
4. Data Mining
5. Finance
6. Medical
7. Industries
8. Telephone maintenance
9. Telecom
10. Transport
11. Entertainment

AI
Agents & Environment
• An agent is commonly a person who can do our job usually on some obligation.

• An agent is anything that can be viewed as perceiving its environment through sensors
and acting upon that environment through effectors.

• Agents act in their environment. Environment may contain other agents.

• A rational Agent is one which does the things rightly (rationally).

AI
Agent Terminology

• Performance Measure of Agent − criteria, which determines how successful an agent is.

• Behavior of Agent − action, that agent performs after any given sequence of percepts.

• Percept − agent’s perceptual inputs at a given instance.

• Percept Sequence − history of all that an agent has perceived till date.

• Agent Function − a map from the precept sequence to an action.

Rationality

• Status of being reasonable, sensible, and having good sense of judgment.

• Expected actions and results depending upon what the agent has perceived.

• Performing actions with aim of obtaining useful information


AI
Agents & Environment

Human agent has eyes, ears, other organs for sensors; & hands, legs, vocal tract for effectors.

Robotic agent have cameras, infrared range finders for sensors; & various motors for
actuators.

Software agent receives keystrokes, file contents, & network packets as sensory inputs &
acts on environment by displaying on screen, writing files, and sending network packets.

AI
Ideal Rational Agent
• Capable of doing expected actions to maximize its performance measure, on the basis of:

• Its percept sequence

• Its built-in knowledge base

• Rationality of an agent depends on the following four factors −

• The performance measures, which determine the degree of success.

• Agent’s Percept Sequence till now.

• The agent’s prior knowledge about the environment.

• The actions that the agent can carry out.

• A rational agent always performs right action, where right action means the action that
causes agent to be most successful in given percept sequence.

• problems that agent solves is characterized by Performance Measure, Environment,


Actuators, and Sensors (PEAS). AI
Specifying the task environment

Task environments, are essentially the “problems” to which rational agents have the
“solutions.”

The task environment includes (PEAS description):

• Performance,

• Environment,

• Actuators,

• Sensors.

 In designing an agent, first step must always be to specify task environment as fully as
possible.

AI
Intelligent Agents
• Performance Evaluation of an agent: How correctly or efficiently an agent serves to our
expectation. It could be relative depending on individuals expectations.

• Intelligent Agents: Agents which can transform percepts into actions rationally.

AI
Intelligent Agents

• Calculator is also an agent, but it provides no intelligence

• just hard-core calculation, corrected up to maximum possible value.

• Intelligent agent may not be show perfection like a hard core agent.

• E.g. diagnosing a patient on the basis of symptoms and predict disease.

• An agent is composed of two components

(Agent = architecture + program)

• Architecture on which agent resides is a hardware infrastructure like camera,


sensors, videos , computer or any machine. (machinery that an agent executes on)

• Agent Program usually is a software program to control the architecture to initiate


agent. (implementation of an agent function)
AI
Intelligent Agents
Example of automated taxi driver agent

• Percepts are components which agent requires as inputs like cameras, speedometer
to control speed.

Agent
Type Percepts Actions Goals Environnent

Safe, fast,
Steer, legal,
Cameras, Roads, other
accelerate, comfortable
Taxi driver speedometer, GPS, traffic, pedestrians,
brake, talk to trip,
sonar, microphone customers
passenger maximize
profits

AI
Intelligent Agents
Types of agent programs

Simple Reflex Agent: When actions of nearest object are clearly visible then what response
has to be taken, e.g.

• If car going ahead applies brake (as appears from brake lights of front car), then car
following it should also initiate brake (take counter action against an action  reaction
vs action)
Agents that keep track of the world
- To know about if some other car is over taking our car then what to do!

AI
Intelligent Agents

Model Based Reflex Agents

• Model − The knowledge about “how things happen in world”.

• Internal State − It is a representation of unobserved aspects of current state depending on


percept history.

• Updating the state requires information about −

• How the world evolves.

• How the agent’s actions affect the world.

AI
Intelligent Agents
Goal based agents

• Choose their actions in order to achieve goals.

• More flexible than reflex agent, since the knowledge supporting a decision is explicitly
modelled, thereby allowing for modifications.

• Goal − It is the description of desirable situations.

• Goal should be known to agent by means of sequence of actions to follow during operation.

E.g. destination should be known to a taxi driver accordingly paths can be derived.

AI
Intelligent Agents

Utility based agents

• Choose actions based on a preference (utility) for each state.


• Goals are inadequate when −
• There are conflicting goals, out of which only few can be achieved.
• Goals have some uncertainty of being achieved and you need to weigh likelihood of
success against the importance of a goal.
• Goal should be achieved with some performance measure set by user.
• Cost, degree of comfort, safety could be associated with achieving goals.

AI
Environment Properties
Accessible

• Whether the sensors of the agent can access complete environment or partially.

Deterministic

• Whether the next state can be determined by the current state specifically.

Episodic

• Whether environment’s states are available in episodes (parts) or all at one time

Static

• Whether environment is changing while the agent is working or remains unchanged.

Discrete

• Whether the percepts and actions are distinct, & limited like moves in a chess game,
or continuous like a running ship/train/non-digital clock (seconds arm)/ceiling fan.
AI
Environment Properties

AI
Problem-Solving Steps Performed by Agent
1. Goal formulation
First step in problem solving.

Goals help organize behaviour by limiting objectives that agent is trying to


achieve and hence the actions it needs to consider based on current
situation and agent’s performance measure.

2. Problem formulation: process of deciding what actions and states to consider,


given a goal.

3. Searches for a sequence of actions that would solve the problem, and then,

4. Executes the actions one at a time.

5. When this is complete, it formulates another goal and starts over.


Problem formulation
A problem can be Well-Formulated (Well-defined) by five components:

1) Initial state: agent starts in.

2) Description of the possible actions available to the agent.


Given a particular ACTIONS state s, ACTIONS(s) returns the set of actions
that can be executed in s.
Each of these actions is applicable in s.
Problem formulation . . .
3) A description of what each action does;

Formal name for this is the transition model, specified by a function RESULT(s, a)
that returns the state that results from doing action a in state s.

Use the term successor to refer to any state reachable from a given state by a
single action.

• Together, the initial state, actions, and transition model implicitly define the state
space of the problem—the set of all states reachable from initial state by any
sequence of actions.

• State space forms a directed network or graph in which the nodes are states and
links between nodes are actions.

• A path in state space is a sequence of states connected by a sequence of actions.


Problem formulation
4) The goal test, which determines whether a given state is a goal state.
Sometimes there is an explicit set of possible goal states, and the test simply checks
whether the given state is one of them.
5) A path cost function that assigns a numeric cost to each path.
Problem–solving agent chooses a cost function that reflects its own performance
measure.
For the agent trying to get to Bucharest, time is of the essence, so the cost of a path
might be its length in kilometres.
Assuming the cost of a path can be described as the sum of the costs of the individual
actions along the path.
The step cost of taking action a in state s to reach state s is denoted by c(s, a, s).
Problem formulation

• The preceding elements define a problem, and can be gathered into a single
data structure that is given as input to a problem-solving algorithm.

• A solution to a problem is an action sequence that leads from the initial


state to a goal state.

• Solution quality is measured by the path cost function, and an optimal


solution has the lowest path cost among all solutions.
AI Approaches…
Views of AI fall into two categories:

Weak AI: Typically focused on a narrow task.

• The intelligence of weak AI is limited.


Strong AI: Hypothetical AI, at least as smart as human.

• Recursive; it could improve itself.


• In successive intervals of increased intelligence, such an entity could
theoretically achieve super-intelligence in a relatively short period of time.
• Machine with consciousness and mind.
• Strong AI does not yet exist.

AI
Expert systems
• Software package to assist humans in situations where expert knowledge is
required; e.g. medical diagnosis

• Depth of knowledge about constrained domain.

• Commercially exploitable, real applications

• Basic idea – experts have knowledge, and this knowledge can be given to
computer program.
1. Requires knowledge base – interview and observe experts, and convert
words and actions into knowledge base
2. Reasoning mechanisms to apply knowledge to problems: inference engine
3. Mechanisms for explaining their decisions
Expert systems

• Expert systems usually use production rules (IF-THEN)

• Developed at Stanford University, California in mid to late 1970s.

• IF THEN rules + facts + interpreter

oForward chaining (start with facts and use rules to draw new
conclusions)
oBackward chaining (start with hypothesis, or goal, to prove and look
for rules to prove that hypothesis).
Expert systems

Forward chaining – simple example


• Rule 1: IF hot AND smoky THEN ADD fire
• Rule 2: IF alarm-beeps THEN ADD smoky
• Rule 3: IF fire THEN ADD switch-on sprinklers

FACT1: alarm beeps


FACT2: hot
(i) check to see rules whose conditions hold (r2). Add new fact to
working memory (FACT3: smoky)
(ii) check again (r1). Add new fact (FACT4: fire)
(iii) check again (r3) Sprinklers on!
Expert systems
Advantages
ES can still be useful tool,
• Human experts can lose expertise especially when used together
with a human expert.
• Ease of transfer of artificial expertise As long as we don’t expect
too much of them.
• No effect of emotion
• Low cost alternative (once developed)

Disadvantages
• Lack of creativity, not adaptive, lacks sensory experience, narrow focus, no
common sense knowledge; E.g won’t notice if medical history says patient
weighs 14 pounds and is 130 years old.
• More like idiot savants (retarded person who can perform well in one
domain), or automated reference manuals.
AI Issues

• When should a computer’s decision be trusted over a human’s?

• If a computer can do a job better than a human, when should a


human do the job anyway?

• What would be the social impact if computer “intelligence” surpasses


that of many humans?

87
Summary

• Introduction to AI

AI

You might also like