Ait 307 Artificial Intelligence
Ait 307 Artificial Intelligence
Ait 307 Artificial Intelligence
ARTIFICIAL INTELLIGENCE
➢If we are going to say that a given program thinks like a human, we must
have some way of determining how humans think.
➢We need to get inside the actual working of human minds.
➢There are three ways to do this:
1. Introspection:- Trying to catch our own thoughts as they go by.
2. Psychological Experiments:- Observing a person’s action
3. Brain Imaging:- Observing the action of the brain.
Thinking humanly: The cognitive Modeling Approach
➢Turing Test
➢The Cognitive Modelling Approach
➢The Law of Thought Approach
➢The Rational Agent Approach
Fields in AI
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
• Philosophy:-
• The history of philosophy can be organized around the following series of
questions.
❑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?
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
• Philosophy:-
The terms in philosophy which is important to in terms of AI:-
• Rationalism: power of reasoning in understanding the world
• Dualism: there is a part of the human mind (or soul or spirit) that is outside
of nature, exempt from physical laws
• Materialism: brain’s operation according to the laws of physics constitutes
the mind
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
• Philosophy:-
• Induction: general rules are acquired by exposure to repeated associations
between their elements
• Logical positivism: doctrine holds that all knowledge can be characterized
• by logical theories connected, ultimately, to observation sentences that
correspond to sensory inputs; thus logical positivism combines rationalism
and empiricism
• confirmation theory: attempted to analyze the acquisition of knowledge
from experience
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
• Mathematics
• Mathematics 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 the algorithms.
•What are the formal rules to draw valid conclusions?
•What can be computed?
• How do we reason with uncertain information?
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
• Mathematics
•Three fundamental areas:
1. logic
2. computation
3. probability.
• George Boole: worked out the details of propositional, or Boolean logic
• Gottlob Frege: creating the first-order logic that is used today
• Alan Turing: characterize exactly which functions are computable. Turing machine
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
• Economics
➢Neuroscience
✓Neuroscience is the study of the nervous system, particularly the brain.
✓How do brain process information?
✓Neuroscientists discovered some facts about how the brain works and the
ways in which it is similar to and different from computers.
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
➢Neuroscience
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
➢Psychology
✓ How do humans and animals think and act?
✓ Psychologists adopted the idea that humans and animals can be considered
information processing machines.
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
➢Computer Engineering
✓How can we build an efficient computer?
✓Computer engineers provided the ever more powerful machines that make
AI applications possible.
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
➢Linguistics
✓ How does language relate to thought?
✓ Modern linguistics and AI were “born” at about the same time, and grew up
together, intersecting in a hybrid field called Computational Linguistics or
Natural Language Processing.
Gestation of Artificial Intelligence (1943- 1955)
•Year 1943: The first work which is now recognized as AI was done by Warren
McCulloch and Walter pits in 1943. They proposed a model of artificial
neurons.
•Year 1949: Donald Hebb demonstrated an updating rule for modifying the
connection strength between neurons. His rule is now called Hebbian learning.
•Year 1950: The Alan Turing who was an English mathematician and pioneered
Machine learning in 1950. Alan Turing publishes "Computing Machinery and
Intelligence" in which he proposed a test. The test can check the machine's
ability to exhibit intelligent behavior equivalent to human intelligence, called a
Turing test.
• Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial
intelligence program Which was named as "Logic Theorist". This program had
proved 38 of 52 Mathematics theorems, and find new and more elegant proofs
for some theorems.
Gestation of Artificial Intelligence (1943- 1955)
Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial intelligence
program Which was named as "Logic Theorist". This program had proved 38 of 52
Mathematics theorems, and find new and more elegant proofs for some theorems.
• The word "Artificial Intelligence" first adopted by American Computer scientist John
McCarthy at the Dartmouth Conference. For the first time, AI coined as an academic field.
• The golden years-Early enthusiasm (1956-1974)
•Year 1966:
• The researchers emphasized developing algorithms which can solve mathematical
problems. Joseph Weizenbaum created the first chatbot in 1966, which was named as ELIZA.
•Year 1972:
• The first intelligent humanoid robot was built in Japan which was named as WABOT-1.
History of AI- Tutorial 1
INTELLIGENCE
AGENTS
• An agent is anything that can be viewed as perceiving its environment
through sensors and acting upon that environment through actuators
AGENTS
• An agent runs in the cycle of perceiving, thinking, and acting. An agent
can be:-
1. Human Agent:- A human agent has eyes, ears, and other organs that
work for sensors, and the hand, legs, and vocal tract work for actuators.
2. Robotic Agent:- A robotic agent can have cameras, infrared range
finder, NLP for sensors and various motors for actuators.
3. Software Agent:- Software agent can have keystrokes, file contents as
sensory input and display output on the screen.
AGENTS
• The term percept to refer to the agent’s perceptual inputs at any given
instant.
• An agent’s percept sequence is the complete history of everything the
agent has ever perceived
• An agent’s choice of action at any given instant can depend on the entire
percept sequence observed to date, but not on anything it hasn’t perceived.
• An agent’s behavior is described by the agent function that maps any given
percept sequence to an action.
• agent = architecture + program
• The agent function is an abstract mathematical description; the agent
program is a concrete implementation, running within some physical
system.
INTELLIGENT AGENTS
INTELLIGENT AGENTS
The Vacuum Cleaner World
• This particular world has just two locations: squares A and B.
• The vacuum agent perceives which square it is in and whether there is
dirt in the square. It can choose to move left, move right, suck up the dirt,
or do nothing.
• One very simple agent function is the following: if the current square is
dirty, then suck; otherwise, move to the other square.
The Vacuum Cleaner World
•Rational Agent: For each possible percept sequence, a rational agent should
select an action that is expected to maximize its performance measure,
given the evidence provided by the percept sequence and whatever built-in
knowledge the agent has.
Omniscience, learning, and autonomy
• Omniscient agent: knows the actual outcome of its actions and can act
accordingly; but omniscience is impossible in reality.
• rationality is not the same as perfection.
• Rationality maximizes expected performance, while perfection maximizes
actual performance.
• Exploration
• Learn as much as possible from what it perceives
• Rational agent should be autonomous—it should learn what it can to
compensate for partial or incorrect prior knowledge
Task Environment
• PEAS (Performance, Environment, Actuators, Sensors)
• In designing an agent, the first step must always be to specify the task environment
as fully as possible.
• Example: The task of designing a self- driving car.
Task Environment
Task Environment Types
• “stochastic” generally implies that uncertainty about outcomes is quantified in terms of probabilities
• a nondeterministic environment is one in which actions are characterized by their possible outcomes,
• but no probabilities are attached to them
Episodic vs. sequential
• Episodic task environment:
◦ the agent’s experience is divided into atomic episodes.
◦ In each episode the agent receives a percept and then performs a single
action.
◦ Crucially, the next episode does not depend on the actions taken in
previous episodes.
◦ Many classification tasks are episodic.
• Sequential environments
◦ the current decision could affect all future decisions
◦ Chess and taxi driving are sequential: in both cases, short-term actions can
have long- term consequences.
◦ Episodic environments are much simpler than sequential environments
because the agent does not need to think ahead.
Static vs. dynamic
• If the environment can change while an agent is deliberating, then we
say the environment is dynamic for that agent; otherwise, it is static
• A static environment does not change while the agent is thinking.
• The passage of time as an agent deliberates is irrelevant.
• Dynamic environments, on the other hand, are continuously asking the
agent what it wants to do;
• if it hasn’t decided yet, that counts as deciding to do nothing.
• If the environment itself does not change with the passage of time but the
agent’s performance
• score does, then we say the environment is semi-dynamic.
Discrete vs. continuous
• If the number of distinct percepts and actions is limited, the environment is
discrete, otherwise it is continuous.
• The chess environment has a finite number of distinct states (excluding the clock).
• Chess also has a discrete set of percepts and actions.
• Taxi driving is a continuous-state and continuous-time problem: the speed and location
of the taxi and of the other vehicles sweep through a range of continuous values and do
so smoothly over time
• Taxi-driving actions are also continuous (steering angles, etc.).
• Input from digital cameras is discrete, strictly speaking, but is typically treated as
representing continuously varying intensities and locations.
Known vs. unknown
• In a known environment, the outcomes (or outcome probabilities if the environment is
stochastic) for all actions are given.
• If the environment is unknown, the agent will have to learn how it works in order to
make good
• decisions
• a known environment can be partially observable
◦ for example, in solitaire card games, I know the rules but am still unable to see the
cards that have not yet been turned over.
• An unknown environment can be fully observable
◦ in a new video game, the screen may show the entire game state but I still don’t
know what
• the buttons do until I try them.
Structure of Agent
• The job of AI is to design an agent program that implements the
agent function the mapping from percepts to actions.
• his program will run on some sort of computing device with physical
sensors and actuators called the architecture
• agent = architecture + program
• Architecture makes the percepts from the sensors available to the
program, runs the program, and feeds the program’s action choices to
the actuators as they are generated
Agent programs
• Agent program: use current percept as input from the sensors and
return an action to the actuators
• Agent function: takes the entire percept history
Agent programs
• Let P be the set of possible percepts and let T be the lifetime of the
agent (the total number of percepts it will receive)
• The lookup table will contain entries
• Consider the automated taxi: the visual input from a single camera
comes in at the rate of roughly 27 megabytes per second (30 frames per
second, 640 × 480 pixels with 24 bits of color information). This gives a
lookup table with over 10250,000,000,000 entries for an hour’s driving.
• Even the lookup table for chess a tiny, well-behaved fragment of the
real world would have at least
Agent programs