1279 53 491 Module-1 AI
1279 53 491 Module-1 AI
INTRODUCTION
AI
ARTIFICIAL INTELLIGENCE
AI
Add a footer 2
1.1 What Is AI?
• The field of artificial intelligence, or AI, is concerned with not just understanding
but also building intelligent entities—machines that can compute how to
act effectively and safely in a wide variety of novel situations. AI
• currently encompasses a huge variety of subfields, ranging from the general
(learning, reasoning, perception, and so on) to the specific, such as
playing chess, proving mathematical theorems, writing poetry, driving a
car, or diagnosing diseases. AI is relevant to any intellectual task; it is truly
a universal field. We have claimed that AI is interesting, but we have not said
what it is. Historically, researchers have pursued several different versions
of AI.
• Some have defined intelligence in terms of fidelity to human performance, while
others prefer an abstract, formal definition of intelligence called rationality
— loosely speaking, doing the “right thing.”
Add a 3
fo1ot0er/9/2024
• Artificial Intelligence is composed of two words Artificial and Intelligence,
Add a 4
fo1ot0er/9/2024
• The methods used are necessarily different: the pursuit of human-like intelligence
must be in part an empirical science related to psychology, involving
observations and hypotheses about actual human behaviour and thought
processes; a rationalist approach, on the other hand, involves a
combination of mathematics and engineering, and connects to statistics,
control theory, and economics. The various groups have both disparaged and
helped each other. Let us look at the four approaches in more detail.
Add a 5
fo1ot0er/9/2024
• 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.
• The computer would need the following capabilities:
• 1) Natural language processing: to communicate successfully in a human
• language;
• 2) Knowledge representation: to store what it knows or hears;
• 3) Automated reasoning: to answer questions and to draw new conclusions;
• 4) Machine learning: to adapt to new circumstances and to detect
and extrapolate patterns.
Add a 6
fo1ot0er/9/2024
• Turing viewed the physical simulation of a person as unnecessary to demonstrate
intelligence. However, other researchers have proposed a total Turing test,
which requires interaction with objects and people in the real world.
• To pass the total Turing test, a robot will need ......
• 5) Computer vision and speech recognition to perceive the world;
• 6) Robotics to manipulate objects and move about.
• These six disciplines compose most of AI. Yet AI researchers have devoted little
effort to passing the Turing test, believing that it is more important to study
the underlying principles of intelligence.
Add a 8
fo1ot0er/9/2024
1.1.3 Thinking rationally:
The “laws of thought” approach The Greek philosopher Aristotle was one
of the first to attempt to codify “right thinking”— that is, irrefutable
reasoning processes. His syllogisms provided patterns for argument
structures that always yielded correct conclusions when given correct
premises. The canonical example starts with Socrates is a man and all men
are mortal and concludes that Socrates is mortal. These laws of thought
were supposed to govern the operation of the mind; their study initiated the
field called logic.
Add a 10
fo1ot0er/9/2024
• 1.2 The Foundations of Artificial Intelligence
• In this section, we provide a brief history of the disciplines that contributed ideas,
viewpoints, and techniques to AI. Like any history, this one concentrates on
a small number of people, events, and ideas and ignores others that also
were important.
• 1.2.1 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?
Add a 11
fo1ot0er/9/2024
• 1.2.2 Mathematics
• • What are the formal rules to draw valid conclusions?
• • What can be computed?
• • How do we reason with uncertain information?
• Philosophers staked out some of the fundamental ideas of AI, but the leap to a
formal science required the mathematization of logic and probability and
the introduction of a new branch of mathematics: computation.
• 1.2.3 Economics
• • How should we make decisions in accordance with our preferences?
• • 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?
Add a 12
fo1ot0er/9/2024
• 1.2.4 Neuroscience
• • How do brains process information?
• Neuroscience is the study of the nervous system, particularly the brain. Although
the exact way in which the brain enables thought is one of the great mysteries
of science, the fact that it does enable thought has been appreciated for
thousands of years because of the evidence that strong blows to the head can
lead to mental incapacitation.
• 1.2.5 Psychology
• • How do humans and animals think and act?
Add a 13
fo1ot0er/9/2024
AI Applications
1. AI in Marketing
2. AI in Banking
3. AI in Finance
4. AI in Agriculture
5. AI in HealthCare
Add a footer 14
AI in Marketing
Add a footer
Artificial Intelligence Applications – AI in 15
Marketing
AI in Banking
18
AI in Health Care
relying on AI.
25
History OF
AI
1921: Czech playwright Karel Čapek released a science fiction play “
Rossum’s Universal Robots” which introduced the idea of “artificial people”
which he named robots. This was the first known use of the word.
1952: A computer scientist named Arthur Samuel developed a program to play checkers,
which is the first to ever learn the game independently.
1 9 6 8 :
S o v i e tm a t h e m a t i c i a n A l e x e y Ivakhnenko pub
lished “Group Method
of DataHandling” in the journal “ Av t o m a t i k a , ” w h i
chproposed a new
approach to AI t h a t w o u l d l a t e rb e c o m ew h a t w e n o w
k n o wa s “DeepLearning.”
1 9 7 3 : A n a p p l i e d mathematician n a m e dJ a m e
sL i g h t h i l l gave a report to the
British Science Council, underlining that strides
were not as impressive as
t h o s et h a t h a d b e e n p r o m i s e d by scientists, which led
to much-reducedsupport and funding for AI rese
arch from the British government.
AI boom: 1980-1987
1980: Fi r s t c onfe r e nc e of t he AI wa s he l d a t St a nfor d .
1980: T h e fi r s t e x pe r t s ys t e m c a me i nt o t he c om me r c i a l ma r ke t
, known as XCON ( e x p e r t c o n f i g u r e r ) . I t was desi g n e d t o assi s
t i n t h e or d e r i n g of c o m p u t e r s ys t e ms b y a u t o m a t i c a l l y p i c
k i ng
c om pon e n t s ba s e d on t he c us t ome r ’s ne e ds .
1981: The J a pa ne s e gove r nme n t a l l oc a t e d $ 850 mi l l i on
( ove r $ 2
b i l l i on dol l a r s in t oda y’s mone y) to t
he Fi ft hGe ne r a t i on
Com put e rpr oj e c t . The i r a i m wa s t o c r e a t e c omput e r s
t ha t c oul d
t r a ns l a t e , c onve r s e i n huma n l a ngua ge ,a nd
e xpr e s s r e a s oni ng on a huma n l e ve l .
1984: The AAAI wa r ns of a n i nc omi ng “ AIWi nt e r ”
whe re f undi ng and i nt erest woul d de cre as e, and m ak e
1985: An aut onom ous dr awi ng progr am k nown as AARO N i s
de mons t r a t e d a t t he AAAI c onfe r e nc e .
2016: Ha ns o n R o b o t i c s c r e a t e d a h u m a n o i d r o b o t n a m e d
Sophi a , who b e c a m e known as t h e f i rst “ robot c i t i zen” a n d wa
s t h e f i r s t robot c r e at e d wi t h a r e a l i s t i c hum an a p p e a r a n c
2017: F a c e b o o k progr am m ed t wo AI chat bot s t o c o n v e r s e and l
earn
how t o ne got i at e , b u t a s t h e y we n t b a c k a n d for t h t h e y e
n d e d u p forgoi n g E n g l i s h a n d d e v e l o p i n g t h e i r own l a n g u a
g e , c o m p l e t e l y a u t on om o us l y.
A n A I a ge nt ca n have m e nta l
prope r t i e s suc h as knowle dge , be l i ef, i nte nti on,
etc .
An Agent
Pe rc e i ve i t s e nvironm e nt t hr ough se nsors a nd act
upon that e nvironm e nt through a c
tuators.
Type s o f Age nt:
Human-Agent: A human agent has eyes, ears, and other organs
which work for sensors and hand, legs, vocal tract work for
actuators.
1. An Intelligent Agent is a system that can perceive its 1. A Rational Agent is an Intelligent Agent that makes
environment and take actions to achieve a specific goal. decisions based on logical reasoning and optimizes its
behavior to achieve a specific goal.
2. An Intelligent Agent can perceive its environment 2. A Rational Agent's perception is based on the
through various sensors or inputs. information available to it and logical reasoning.
3. It can make decisions based on a set of rules or a pre- 3. It makes decisions based on logical reasoning and
defined algorithm. optimizes its behavior to achieve its goals.
4. An Intelligent Agent can learn from its environment and 4. A Rational Agent can also learn from its
adapt its behavior. environment and adapt its behavior, but it does so
based on logical reasoning.
5. It can operate independently of human intervention. 5. It can also operate independently of human
intervention, but it does so based on logical reasoning.
6. An Intelligent Agent can be designed to achieve a 6. A Rational Agent has a specific goal and optimizes
specific goal. its behavior.
Why are rational agents important?
Real-world applications: Rational agents can be used to control autonomous
systems such as self-driving cars, robots, or drones, to make financial decisions,
or to plan logistics.
The environment is the Task Environment (problem) for which the Rational
Agent is the solution. Any task environment is characterised on the basis of
“PEAS”.
48
10/9Ad/
Specifying the task environment FR
“PEAS”
• Performance – What is the performance characteristic which would
either make the agent successful or not.
• Environment – Physical characteristics and constraints expected.
• Actuators – The physical or logical constructs which would take action.
• Sensors – Again physical or logical constructs which would sense the
environment. From our previous example, these are cameras and
dirt sensors.
Add a footer 49
FR
Add a footer 50
FR
Add a footer 51
FR
Rational Agents could be physical agents like the one described above or it could also be a
program that operates in a non-physical environment like an operating system. Imagine a
bot web site operator designed to scan Internet news sources and show the interesting items
to its users, while selling advertising space to generate revenue.
Math E learning SLA defined score Student, Teacher, Computer display Keyboard, Mouse
system on the test parents system for
exercises,
corrections,
feedback
Add a footer 52
An automated taxi driver.
Figure 2.4 summarizes the PEAS description FR
for the taxi’s task environment. We discuss each element in more detail in
the following paragraphs.
Add a footer 53
1. First, what is the performance measure FR
To which we would like our automated driver to
aspire?
Desirable qualities include getting to the correct destination; minimizing fuel consumption
and wear and tear; minimizing the trip time or cost; minimizing violations of traffic laws
and disturbances to other drivers; maximizing safety and passenger comfort.
2. Next, what is the driving environment , that the taxi will face?
Any taxi driver must deal with a variety of roads, ranging from rural lanes and urban alleys
to 12-lane freeways. The roads contain other traffic, pedestrians, stray animals, road
works, police cars, puddles, and potholes. The taxi must also interact with potential and
actual passengers.
3.The actuators for an automated taxi include those available to a human driver:
control over the engine through the accelerator and control over steering and braking. In
addition, it will need output to a display screen or voice synthesizer to talk back to the
passengers, and perhaps some way to communicate with other vehicles, politely or otherwise
Add a footer 54
FR
4.The basic sensors for the taxi will include one or more video cameras so that
it can see, as well as lidar and ultrasound sensors to detect distances to other cars
and obstacles. To avoid speeding tickets, the taxi should have a speedometer,
and to control the vehicle properly, especially on curves, it should
have an accelerometer.
Add a footer 56
4. EPISODIC VS. SEQUENTIAL : FR
In an 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.
reference : https://www.javatpoint.com/agent-environment-in-ai
Add a footer 58
The Structure of Agents FR
So far we have talked about agents by describing behavior—the action that is performed
after any given sequence of percepts.
Architecture : is the machinery that the agent executes on. It is a device with sensors
and actuators, for example, a robotic car, a camera, and a PC.
They take the current percept as input from the sensors and return an action to the
actuators. Notice the difference between the agent program, which takes the current
percept as input, and the agent function, which may depend on the entire percept
history.
Agent programs are fundamental concepts that define how autonomous systems
or agents perceive their environment and take actions to achieve specific goals.
An agent can be a software entity (like a chatbot or a robot) that perceives its
environment through sensors and acts upon it through actuators.
Add a footer 60
The agent program has no choice but to take just the current percept as input FR
because nothing more is available from the
environment; if the agent’s actions need to depend on the entire percept
sequence, the agent will have to remember the percepts.
Now next question is, how to make agent work in proper order?
Taking the percept from environment and generating action based on environment.
Add a footer 61
FR
Now we have to design a agent progarm, it should
perform mapping function
i.e AGENT TO PERCEPT (PROGRAM)
Add a footer 62
FR
Four basic kinds of agent programs that embody the principles underlying almost all
intelligent systems:
Add a footer 63
The Simple reflex agent works on Condition-action rule, which means it maps the FR
current state to action. Such as a Room Cleaner agent, it works only if there is dirt in
the room.
Problems for the simple reflex agent design approach:
• They have very limited intelligence
• They do not have knowledge of non-perceptual parts of the current state
• Mostly too big to generate and to store.
• Not adaptive to changes in the environment.
Add a footer 64
FR
Add a footer 65
2. The Model-based FR
agent can work in a partially observable environment, and track the situation.
A model-based agent has two important factors:
Model: It is knowledge about "how things happen in the world," so it is called a Model-based
agent.
Internal State: It is a representation of the current state based on percept history.
These agents have the model, "which is knowledge of the world" and based on the model they
perform actions.
Updating the agent state requires information about:
• How the world evolves
• How the agent's action affects the world.
Add a footer 66
FR
Add a footer 68
FR
Add a footer 69
4. Utility-based agents FR
These agents are similar to the goal-based agent but provide an extra component of
utility measurement which makes them different by providing a measure of
success at a given state.
Utility-based agent act based not only goals but also the best way to achieve the
goal.
The Utility-based agent is useful when there are multiple possible alternatives, and
an agent has to choose in order to perform the best action.
The utility function maps each state to a real number to check how efficiently each
action achieves the goals.
Add a footer 70
FR
Add a footer 71
A Problem-Solving Agent : FR
Problem- solving agents are the goal-based agents and use atomic
representation.
Add a footer 72
FR
Some of the most popularly used problem solving with the help of artificial
intelligence are:
1. Chess.
2. Travelling Salesman Problem.
3. Tower of Hanoi Problem.
4. Water-Jug Problem.
5. N-Queen Problem.
• Problem Searching
• In general, searching refers to as finding information one needs.
• Searching is the most commonly used technique of problem solving in artificial
intelligence.
• The searching algorithm helps us to search for solution of particular problem.
Add a footer 73
Steps : Solve Problem Using Artificial Intelligence FR
• The process of solving a problem consists of five steps. These
are:
Add a footer 74
FR
1.Defining The Problem: The definition of the problem must be
included precisely. It should contain the possible initial as well as final
situations which should result in acceptable solution.
2. Analyzing The Problem: Analyzing the problem and its requirement must be
done as few features can have immense impact on the resulting solution.
3. Identification OfSolutions: This phase generates reasonable amount
of solutions to the given problem in a particular range.
4. Choosing a Solution: From all the identified solutions, the best
solution is chosen basis on the results produced by respective
solutions.
5. Implementation : After choosing the best solution, its implementation is done.
Add a footer 75
FR
Measuring problem-solving performance
We can evaluate an algorithm’s performance in four ways:
Completeness: Is the algorithm guaranteed to find a solution when there is
one?
Optimality: Does the strategy find the optimal solution?
Time complexity: How long does it take to find a solution?
Space complexity: How much memory is needed to perform the search?
Add a footer 76
Search Algorithm Terminologies FR
•Search: Searching is a step by step procedure to solve a search-problem in a search
given space. A search problem can have three main factors:
1. Search Space: Search space represents a set of possible solutions, which a system
may have.
2. Start State: It is a state from where agent begins the search.
3. Goal test: It is a function which observe the current state and returns whether the goal
state is achieved or not.
• Search tree: A tree representation of search problem is called Search tree. The root
of
the
search tree is the root node which is corresponding to the initial state.
• Transition model: A description of what each action do, can be transition
• Actions: It gives the description of all the available actions to the agent.
represented as a model.
• Path Cost: It is a function which assigns a numeric cost to each path.
•Solution: It is an action sequence which leads from the start node to the goal Optimal
node. ution: If a solution has the lowest cost among all solutions.
Add a footer 77
Example Problems
A Toy Problem is intended to illustrate or exercise various problem-solving methods. Areal- FR
world problem is one whose solutions people actually care about.
Toy Problems
Vacuum World
States: The state is determined by both the agent location and the dirt locations. The agent is in
one of the 2 locations, each of which might or might not contain dirt. Thus there are 2*2^2=8 possible
world states.
Initial state: Any state can be designated as the initial state.
Actions: In this simple environment, each state has just three actions: Left, Right, and Suck.
Larger environments might also include Up and Down.
Transition model: The actions have their expected effects, except that moving Left in the
squ are, moving Right in the rightmost square, and Sucking in a clean squarehave no effect. The
leftmost
complete state space is shown in Figure.
Goal test: This checks whether all the squares are clean.
Path cost: Each step costs 1, so the path cost is the number of steps in the path.
Add a footer 78
FR
Initial State: The starting point or condition from which the AI will begin solving the
problem.
Actions: The set of possible moves or steps the AI can take to transition from one state to
another.
Goal State: The desired outcome or final state the AI aims to achieve.
Path Costs: Costs associated with moving between states. These could be time, distance, energy,
or other metrics depending on the problem context.
Add a footer 81
FR
END OF MODULE 1
Add a footer 82