0% found this document useful (0 votes)
9 views55 pages

UNIT-1 Artificial Intelligence

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

UNIT-1 Artificial Intelligence

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

Artificial Intelligence

Mr. Prashant Atmakuri


Assistant Professor
Department of CSE
PVPSIT
[email protected]
+91 8019709941

Textbook:
Artificial Intelligence
A Modern Approach
3rd Edition
Pearson Publications

AUTHORS: STUART RUSSELL


PETER NORVIG
STEM EDUCATION (SCIENCE-
TECHNOLOGY-ENGINEERING-
MATHEMATICS)

◉ Fostering Critical Thinking and Problem-Solving


◉ Promoting Innovation and Creativity
◉ Preparing for Future Careers
◉ Addressing Global Challenges
Topics – Unit I

 Defining Artificial Intelligence.


 Foundations of AI,
 Applications of AI.
 Intelligent agents: Agents and Environments.
 Structure of agents.
Introduction to AI

◉ A branch of Computer Science named Artificial Intelligence (AI) pursues creating the
computers / machines as intelligent as human beings.
John McCarthy the father of Artificial Intelligence described AI as, “The science and
engineering of making intelligent machines, especially intelligent computer programs”.
Artificial Intelligence (AI) is a branch of Science which deals with helping machines find
solutions to complex problems in a more human-like fashion.
◉ This generally involves borrowing characteristics from human intelligence, and applying
them as algorithms in a computer friendly way.
◉ A more or less flexible or efficient approach can be taken depending on the requirements
established, which influences how artificial the intelligent behaviour appears.
Defining AI techniques
APPROACHES TO AI
Thinking
THOUGHT Thinking Humanly Rationally
PROCESS Systems that Systems that A system is
& REASONING think think rational if it
like humans rationally does the “right
thing,” given
Acting Humanly Acting Rationally what it knows.
BEHAVIOUR
Systems that act Systems that act
like humans rationally

HUMAN IDEAL/RATIONAL
Thinking Humanly

◉ Humans as observed from ‘inside’


◉ How do we know how humans think?
◉ Cognitive science: modeling the processes of human thought.
◉ Introspection: trying to catch our own thoughts as they go by.
◉ Psychological experiments: observing a person in action.
◉ Brain imaging: observing the brain in action
◉ Through a set of experiments and computational models, trying to build good
explanations of what we do when we solve a particular task.
◉ Relevance to AI: to solve a problem that humans (or other living being) are
capable of, it's good to know how we go about solving it.
Acting Humanly
◉ How do you distinguish intelligent behavior from intelligence?
◉ Turing test, by A. Turing, 1950: determining if a program qualifies as
artificially intelligent by subjecting it to an interrogation along with a human
counterpart.
◉ The program passes the test if a human judge cannot distinguish between the
answers of the program and the answers of the human subject.
◉ Capabilities
 NLP
 Knowledge representation
 Automated reasoning
 Machine learning
◉ To pass Total Turing Test
 Computer vision
 robotics
Thinking Rationally

◉ Humans are not always ‘rational’


◉ Rational thinking- defined in terms of logic?
◉ Systems capable of reasoning, capable of making logical deductions from
a knowledge base.
◉ The theory of probability allows rigorous reasoning with uncertain
information.
◉ This requires some capacity to make logical inferences, like "All humans
are mortal; Socrates is a human; thus Socrates is mortal".
Acting Rationally

◉ Rational behavior: doing the right thing.


◉ Many AI applications adopt the intelligent agent approach.
◉ An agent is an entity capable of generating action.
◉ In AI a rational agent must be autonomous, capable of perceiving its
environment, adaptable, with a given goal.
◉ Most often the agents are small pieces of code with a specific
proficiency. The problem is solved by combining the skills of
several agents.
Philosophy

◉ 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?
Foundations of AI
Agents

• An agent is anything that can be viewed as perceiving its


environment through sensors and acting upon that
environment through actuators

• Human agent:
– eyes, ears, and other organs for sensors;
– hands, legs, mouth, and other body parts for actuators

• Robotic agent:
– cameras and infrared range finders for sensors
– various motors for actuators
Continued…
Continued…

• The agent function maps from percept histories to actions:


• [f: P*  A]

• The agent program runs on the physical architecture to


produce f
• agent = architecture + program
Vacuum-cleaner world

◉ Percepts: location and contents, e.g., [A,Dirty]


◉ Actions: Left, Right, Suck, NoOp
◉ Agent’s function  look-up table
For many agents this is a very large table
Specifying the Task Environment - PEAS

PEAS: Performance measure, Environment, Actuators,


Sensors
 Must first specify the setting for intelligent agent design
 Consider, e.g., the task of designing an automated taxi driver:
 Performance measure: Safe, fast, legal, comfortable trip, maximize
profits
 Environment: Roads, other traffic, pedestrians, customers
 Actuators: Steering wheel, accelerator, brake, signal, horn
 Sensors: Cameras, sonar, speedometer, GPS, odometer, engine sensors,
keyboard
PEAS

◉ Performance Measure: Performance measure is


the unit used to define an agent’s success. The
performance of agents changes according to their
distinct principles.
◉ Actuator: An actuator is a component of the
agent that provides the action’s output to the
environment.
◉ Sensor: Sensors are the receptive components of
an agent that receive input.
PEAS

◉ Environment: The environment is an agent’s


immediate surroundings. If the agent is set in
motion, it changes over time. There are five
primary types of environments:
Fully Observable & Partially Observable
Episodic & Sequential
Static & Dynamic
Discrete & Continuous
Deterministic & Stochastic
Continued…

◉ Agent: Interactive English tutor


◉ Performance measure: Maximize student's score
on test
◉ Environment: Set of students
◉ Actuators: Screen display (exercises,
suggestions, corrections)
◉ Sensors: Keyboard
Environment types

• Fully observable (vs. partially observable)


• Deterministic (vs. stochastic)
• Episodic (vs. sequential)
• Static (vs. dynamic)
• Discrete (vs. continuous)
• Single agent (vs. multiagent):
Continued…

◉ 1) Fully observable / Partially observable


If an agent’s sensors give it access to the complete state of
the environment needed to choose an action, the
environment is fully observable.
(e.g. chess)
Continued…

Deterministic / Stochastic
 An environment is deterministic if the next state of the environment
is completely determined by the current state of the environment and
the action of the agent;
 In a stochastic environment, there are multiple, unpredictable
outcomes. (If the environment is deterministic except for the actions
of other agents, then the environment is strategic).
Continued…

◉ We say an environment is uncertain if it is not fully observable or


not deterministic.
◉ In a fully observable, deterministic environment, the agent
need not deal with uncertainty.
◉ “stochastic” generally implies that uncertainty about outcomes
is quantified in terms of probabilities.
Continued…
Episodic / Sequential

In an episodic environment, the agent’s experience is divided into atomic


episodes. Each episode consists of the agent perceiving and then performing a
single action.

Subsequent episodes do not depend on what actions occurred in previous


episodes. Choice of action in each episode depends only on the episode itself.
(E.g., classifying images.)

In a sequential environment, the agent engages in a series of connected


episodes. Current decision can affect future decisions. (E.g., chess and
driving)
Continued…

Static / Dynamic

A static environment does not change while the agent is thinking.

The passage of time as an agent deliberates is irrelevant.

The environment is semidynamic if the environment itself does


not change with the passage of time but the agent's
performance score does.
Continued…

Discrete / Continuous
If the number of distinct percepts and actions is limited, the environment is
discrete, otherwise it is continuous.
Single agent / Multi-agent
If the environment contains other intelligent agents, the agent needs to be
concerned about strategic, game-theoretic aspects of the environment (for
either cooperative or competitive agents).
Most engineering environments don’t have multi-agent properties, whereas
most social and economic systems get their complexity from the interactions
of (more or less) rational agents.
Continued…
◉ Known vs. unknown: Strictly speaking, this distinction refers not
to the environment itself but to the agent’s (or designer’s) state of
knowledge about the “laws of physics” of the environment.
Continued…
Activity

◉ Crossword -1
◉ Crossword -2
◉ Team Activity
◉ Quiz -1
◉ Quiz -2
Agent Examples for Team Activity
◉ drone for package delivery ◉ receptionist
◉ self-driving taxi ◉ paper valuation
◉ tracking of a person in an ◉ Shopping for used AI books on the
organization Internet.
◉ dynamic traffic control system ◉ Playing a tennis match.
◉ child care taker ◉ Practicing tennis against a wall.
◉ self-driving train ◉ Performing a high jump.
◉ drone to rescue people in danger at ◉ Knitting a sweater.
sea ◉ Bidding on an item at an auction.
◉ Tutor to teach AI ◉ bank cashier.
◉ elderly care taker
Types of Agents

 Simple reflex agents


 Reflex agents with state/model
 Goal-based agents
 Utility-based agents
Simple reflex agents

• Simple but very limited intelligence.


• Action does not depend on percept
history, only on current percept.
• Therefore no memory requirements.
Simple reflex agents

◉ A Simple Reflex Agent is typically employed


when all the information of the current game state
is directly observable, (eg: Chess, Checkers, Tic
Tac Toe, Connect-Four) and the decision
regarding the move only depends on the current
state.
◉ That is, when the agent does not need to
remember any information of the past state to
make a decision.
Model-based reflex agents
 Know how world evolves
 Overtaking car gets closer from behind
 How agents actions affect the world
 Wheel turned clockwise takes you right

 Model base agents update their state


Model-based reflex agents

◉ Model-based reflex agents are AI agents that


make decisions based on their current
perception of the environment and an internal
model that represents their knowledge and
predictions about the world. They combine the
reactive nature of simple reflex agents with the
ability to reason about the environment using their
internal models.
Model-based reflex agents

◉ While simple reflex agents make decisions solely


based on their current perception, model-based
reflex agents go a step further by considering their
internal models.
◉ These models allow them to make more informed
decisions by taking into account not only the
immediate sensory information but also their
knowledge and predictions about the environment.
Model-based reflex agents

◉ Internal models play a crucial role in the decision-


making process of model-based reflex agents.
These models represent the agent's understanding
of the environment, including the current state,
possible future states, and the effects of actions.
By leveraging these models, agents can make
predictions, plan ahead, and adapt their behavior
based on their knowledge and expectations.
Architecture of Model-Based Reflex Agents

◉ The perception module is responsible for capturing and


processing sensory information from the environment.
◉ The internal model is a core component of model-based
reflex agents.
◉ The decision-making module uses the information from
the perception module and the internal model to determine
the appropriate action to take.
◉ Once the decision-making module selects an action, the
action execution component carries out the chosen action in
the environment.
Model-based reflex agents- Types of Internal Models
◉ State-based models represent the environment as a set
of discrete states and the transitions between them.
◉ Predictive models focus on forecasting future states or
outcomes based on the current state and the agent's
actions.
◉ Hybrid models combine elements of state-based and
predictive models to create a more comprehensive
representation of the environment.
Advantages of Model-Based Reflex Agents

◉ More Informed Decision-Making


◉ Ability to Handle Uncertainty
◉ Adaptability to Changing Environments
Model-based reflex agents- Challenges and Limitations

◉ Computational Complexity
◉ Model Accuracy and Maintenance
◉ Handling Incomplete or Noisy Information
Applications of Model-Based Reflex Agents

◉ Robotics and Autonomous Systems


◉ Gaming and Simulation
◉ Intelligent Control Systems

Future Developments:
◉ Integration with Machine Learning
◉ Scalability and Real-Time Performance
◉ Ethical Considerations
Goal-based agents

• knowing state and environment? Enough?


– Taxi can go left, right, straight
• Have a goal
A destination to get to
Uses knowledge about a goal to guide its actions
E.g., Search, planning
Goal-based agents

◉ The goal-based agent is also known as a planning


or goal-seeking agent.
◉ We sometimes call it a rule-based agent as it
follows a set of rules to achieve its goal.
◉ It uses search algorithms to find the most efficient
path to the goal. Additionally, it also utilizes
heuristics and AI techniques to improve its
performance.
Utility-based agents

Goals are not always enough


• Many action sequences get taxi to
destination
• Consider other things. How fast, how
safe…..
A utility function maps a state onto a real
number which describes the associated
degree of “happiness”, “goodness”,
“success”.
Utility-based agents

◉ It makes decisions based on a set of


predetermined criteria or a utility function.
◉ These criteria represent the goals or objectives of
the agent.
◉ The goal of the agent is to maximize the utility
function.
Goal-based agents Utility-based agents
Goal-Based Agents Utility-Based Agents
Goal-based agents may perform in a way Utility-based agents are more reliable
that produces an unexpected outcome because they can learn from their
because their search space is limited environment and perform most efficiently
Makes decisions based on the goal and the Makes decisions based on the utility and
available information general information
Implementing utility-based agents can be a
Goal-based agents are easier to program
complex task
Maps each state to an actual number to
Considers a set of possible actions before
check how efficiently each step achieves its
deciding whether the goal is achieved or not
goals
Utilized in computer vision, robotics, and
Used in GPS and tracking systems
NLP
Learning agent
learning element -> to make
improvements

performance element (agent)->


selecting external actions

The learning element uses feedback


from the critic on how the agent is
doing and determines how the
performance element should be
modified to do better in the future.

problem generator ->suggesting


actions that will lead to new and
informative experiences.
How the components of agent programs work
Continue….
◉ (a) Atomic representation: a state (such as B or C) is a black
box with no internal structure;
◉ (b) Factored representation: a state consists of a vector of
attribute values; values can be Boolean, real valued, or one
of a fixed set of symbols.
◉ (c) Structured representation: a state includes objects, each
of which may have attributes of its own as well as
relationships to other objects.
◉ a more expressive representation can capture, at least as
concisely, everything a less expressive one can capture, plus
some more
◉ THANK YOU

You might also like