Unit 1: Introduction
1.1 Introduction
Artificial Intelligence (AI) is that branch of computer science that creates intelligent machines
that think and act like humans. It is one of the revolutionizing technologies that people are
fascinated by because of its ability to relate to their daily lives. AI enables machines to think,
learn and adapt, to enhance and automate tasks across industries.
Artificial intelligence can be categorized into different types −
Based on Capabilities
AI is classified into the following types based on capabilities −
Normal AI (Weak AI)
Narrow AI is a type of AI that enables to perform a specific task with intelligence. Narrow AI is
trained only for a specific task and fails to perform beyond its limitations.
Voice assistants like AppleSiri, Alexa, and others are a good example of Narrow AI, as they are
trained to operate within a limited range of functions. Some of the other examples of Narrow AI
are chess games, facial recognition, and recommendation engines.
General AI (Strong AI)
General AI is a type of AI that enables to perform intellectual tasks as efficient;y as humans. The
systems are trained to have the capability to understand, learn, adapt, and think like humans.
Though it seems efficient, the General AI still seems to be a theoretical concept that researchers
aim to develop in the future. It is quite challenging, as the system should be trained to be self-
conscious, to get aware of the surroundings, and to make independent decisions. The potential
applications could be robots.
Super AI
Super AI is a type of AI that surpasses human intelligence and can perform any task better than
humans. It is an advanced version of general AI, where machines make their own decisions and
solve problems by themselves.
Such AI would not only perform tasks but also understand and interpret emotions and respond
like humans. While it remains hypothetical, development of such models would be complex.
Based on Functionality
AI is classified into the following types based on the functionality −
Reactive Machines
Reactive Machines are the most basic type of artificial intelligence. These machines operate only
on the present data and do not store any previous experiences or learn from past actions.
Additionally, these systems respond to specific inputs with predetermined outputs and cannot be
changed.
IBM's Deep Blue is a great example of reactive machines. It is the first computer system to
defeat a reigning world chess champion, Garry Kasparov. It could identify pieces on the board
and make predictions but could not store any memories or learn from the past games.
Google's AlphaGo is another example of a reactive machine, playing the board game Go with a
similar method of pattern recognition without gaining knowledge from previous games.
Limited Memory
Limited Memory is the most used category in most modern AI applications. It can store past
experiences and learn from them to improve future outcomes. These machines store historical
data to predict and make decisions but do not have long-term memory. Major applications like
autonomous systems and robotics often rely on limited memory.
Chatbots is an example of limited memory, where it can remember recent conversations to
improve the flow and relevance. Additionally, self-driving cars is another example that observes
the road, traffic signs, and surroundings to make decisions based on past experiences and current
conditions.
Theory of Mind
Theory of Mind could understand the human emotions, beliefs, and intentions. While this type of
AI is still in development, it has enabled machines to interpret emotions accurately and modify
behavior accordingly so that machines could interact with humans effectively. Some of the
possible applications of this type are probably collaborating robots and human-robot interaction.
Self-Awareness
Self-Aware AI represents the future of artificial intelligence with self-consciousness and
awareness similar to humans.While we are far from achieving the goal of self-aware AI, it is an
important objective for the development of AI. The applications of self-aware AI could be fully
autonomous systems that could take moral and ethical decisions.
1.2 AI Problems:
Much of the early working AI focused on formal tasks, such as game playing and theorem
proving. For example chess playing, logic theorist was an early attempt to prove mathematical
theorems. Game playing and theorem proving share the property that people who do them well
are considered to be displaying intelligence.
Despite this it appeared that computers could perform well at those tasks by being fast at
exploring a large number of solution paths and then selecting the best one. But no computer is
fast enough to overcome the combinatorial explosion generated by most problems.
AI focusing on the sort of problem solving we do every day for instance, when we decide to get
to work in the morning, often called commonsense reasoning. In investigating this sort of
reasoning Newell, Shaw, and Simon built the General Problem Solver (GPS), which they applied
to several commonsense tasks as well performing symbolic manipulations of logical expression.
However no attempt was made to create a program with a large amount of knowledge about a
particular problem domain. Only quite simple tasks were selected.
As AI research progressed and techniques for handling larger amounts of world knowledge were
developed in dealing with problem solving in specialized domains such as medical diagnosis and
chemical analysis.
Perception (vision and speech) is another area for AI problems. Natural language understanding
and problem solving in specialized domain are other areas related to AI problems. The problem
of understanding spoken language is perceptual problem and is hard to solve from the fact that it
is more analog related than digital related. Many people can perform one or may be more
specialized tasks in which carefully, acquired expertise is necessary. Examples of such as tasks
include engineering design, scientific discovery, medical diagnosis, and financial planning.
Programs that can solve problems in these domains also fall under the aegis of Artificial
Intelligence.
The tasks that are targets of works in AI can be categorized as follows:
1. Mundane tasks - Perception (Vision and Speech), Natural language
(Understanding, Generation, Translation, Commonsense reasoning, Robot control)
2. Formal tasks - Games (Chess, etc.), Mathematics (Geometry, Logic, Integral calculus, etc.)
3. Expert tasks - Engineering (Design, Fault finding, Manufacturing planning), Scientific
analysis, Medical diagnosis, Financial analysis
A person who knows how to perform tasks from several of the categories shown in above list
learn the necessary skills in a standard order. First perceptual, linguistic, and commonsense skills
are learned. Later expert skills such as engineering, medicine, or finance are acquired. Earlier
skills are easier and thus more amenable to computerized duplication than the later, more
specialized one. For this reason much of the initial work in Al work was concentrated in those
early areas.
The problems areas where now AI is flourishing most as a practical discipline are primarily the
domains that require only specialized expertise without the assistance of commonsense
knowledge. Expert systems (AI programs) now are up for day-to-day tasks that aim at solving
part, or perhaps all, of practical, significant problem that previously required high human
expertise.
When one is building a expert system, following questions need to be considered before one can
progress further:
• What are the underlying assumptions about intelligence?
• What kinds of techniques will be useful for solving AI problems?
• At what level if at all can human intelligence be modelled?
• When will it be realised when an intelligent program has been built?
1.3 Underlying Assumption
A physical symbol system consists of a set of entities called symbols which are patterns that can
occur as components of another entity called an expression. At an instant the system will contain
a collection of these symbol structures. In addition the system also contains a collection of
processes that operate on expressions to produce other expressions; processes of creation,
modification, reproduction and destruction. A physical symbol system is a machine that produces
through time an evolving collection of symbol structures. Such a system is machine that
produces through time an evolving collection of symbol structures.
Following are the examples of physical systems -
• Formal logic: The symbols are words like "and", "or", "not", "for all x" and so on. The
expressions are statements in formal logic which can be true or false. The processes are the rules
of logical deduction.
• Algebra: The symbols are "+", "x", "x", "y", "1", "2", "3", etc. The expressions are o equations.
The processes are the rules of algebra that allow you to manipulate a mathematical expression
and retain its truth.
• A digital computer: The symbols are zeros and ones of computer memory, the processes are
the operations of the CPU that change memory.
• Chess: The symbols are the pieces, the processes are the legal chess expressions are the
positions of all the pieces on the board
The physical symbol system hypothesis claims that both of these are also examples of physical
symbol systems. Intelligent human thoughts are the symbols that are encoded in our brains. The
expressions are thoughts. The processes are the mental operations of thinking. In a running
artificial intelligence program the symbols are data, the expressions are more data and the
processes are programs that manipulate the data.
The importance of the physical symbol system hypothesis is twofold. It is significant theory of
the nature of human intelligence and it forms the basis of the belief that it is possible to build
programs that can perform intelligent tasks which are currently performed by people.
1.4 What is an AI Techniques
Intelligence requires knowledge but knowledge possesses less desirable properties such as, 1. It
is voluminous. 2. It is difficult to characterize accurately. 3. It is constantly changing. 4. It differs
from data by being organised in a way that corresponds to its application.
An AI technique is a method that exploits knowledge that is represented so that the knowledge
captures generalizations and situations that share properties which can be grouped together,
rather than being allowed separate representation. It can be understood by people who must
provide the knowledge; although for many programs the bulk of the data may come
automatically, such as from readings.
In many Al domains people must supply the knowledge to programs in a form the people
understand and in a form that is acceptable to the program. Knowledge can be easily modified to
correct errors and reflect changes in real conditions. Knowledge can be widely used even if it is
incomplete or inaccurate. Knowledge can be used to help overcome its own sheer bulk by
helping to narrow the range of possibilities that must be usually considered.
Following are three important AI techniques -
• Search - Provides a way of solving problems for which no more direct approach is available.
• Use of knowledge - Provides a way of solving complex problems by exploiting the structures
of the objects that are involved.
• Abstraction - Provides a way of separating important features and variations from the many
unimportant ones that would otherwise overwhelm any process.
1.5 Level of the Model
Before starting doing something, it is good idea to decide exactly what one is trying to do. One
should ask following questions for self analysis:-
• What is the goal in trying to produce programs that do the tasks the same people do?
• Are we trying to produce programs that do the tasks the same way people do? Or are we trying
to produce programs that simply do the tasks in whatever way appears easiest?
Efforts to build program that perform tasks the way people do can be divided into two classes.
The first one is those that attempt to solve problems that do not really fit our definition of AI. i.e.
problems that computer could easily solve. The second class attempt to model human
performance are those that do things that fall more clearly within our definition of AI tasks; they
do things that are not trivial for the computer.
Reasons for modeling human performance for these kind of tasks:-
• To test psychological theories of human performance. e.g. PARRY program written for this
reason, which exploited a model of human paranoid behavior to simulate the conversational
behavior of a paranoid person.
• To enable computer to understand human reasoning. For example, for a computer or to be able
to read a news paper story and then answer question, such as "Why I did Ravana lose the game?"
• To enable people to understand computer reasoning. In many cases people are reluctant to rely
on the output of computer unless they can understand how the machine arrived at its result.
• To exploit what knowledge we can collect from people.
• To ask for assistance from best performing people and ask them how to proceed in dealing with
their tasks.
1.6 Criteria for Success
One of the most important questions to answer in any scientific or engineering research project is
"How will we know if we have succeeded?". So how in Al we have to ask ourselves, how will
we know if we have constructed a machine that is intelligent? The question is hard as
unanswerable question "What is Intelligence?"
To measure the progress we use proposed method known as Turing Test. Alan Turing suggested
this method to determine whether the machine can think. To conduct this test, we need two
people and the machine to be evaluated. One person acts as interrogator, who is in a separate
room from the computer and the other person. The interrogator can ask questions of either the
person or computer by typing questions and received typed responses. However, the interrogator
knows them only as A and B and aims to determine which is the person and which is the
machine. The goal of the machine is to fool the interrogator into believing that it is the person. If
the machine succeeds at this, then we will conclude that the machine can think.
1.7 Agents and Environments:
An AI system is composed of an agent and its environment. The agents act in their environment.
The environment may contain other agents.
What are Agent and Environment?
An agent is anything that can perceive its environment through sensors and acts upon that
environment through effectors.
A human agent has sensory organs such as eyes, ears, nose, tongue and skin parallel to the
sensors, and other organs such as hands, legs, mouth, for effectors.
A robotic agent replaces cameras and infrared range finders for the sensors, and various motors
and actuators for effectors.
A software agent has encoded bit strings as its programs and actions.
What is an Environment?
The environment is the external context or space in which an agent operates. It provides the
stimuli the agent perceives and reacts to. Environments can be static or dynamic, simple or
complex, and fully or partially observable, depending on the scenario.
Examples of Environments:
• A maze for a robot navigating toward a goal.
• A game world where an AI player interacts with virtual elements and competitors.
• Real-world scenarios for autonomous vehicles, including traffic, weather, and road
conditions.
By understanding the interplay between agents and environments, AI systems are designed to
function effectively, adapt to challenges, and achieve desired outcomes.
Agent Terminology
Understanding the key terms related to agents is essential for comprehending how they interact
with their environments:
• Percept: A percept is the information or input that an agent receives from its
environment through its sensors. For example, a robotic vacuum cleaner perceives the
layout of a room or detects obstacles.
• Percept Sequence: This refers to the complete history of all percepts an agent has
received over time. It helps the agent analyze past inputs to make better decisions. For
instance, a self-driving car uses its percept sequence to understand past traffic patterns
and adjust its navigation accordingly.
• Action: An action is the response or output generated by the agent based on its percept or
percept sequence. Actions are executed through actuators, such as a robot moving its arm
or an AI system playing a chess move.
1.8 Rationality in Agents
In the context of AI, rationality refers to an agent’s ability to act optimally, selecting actions that
align with its goals based on its percepts and knowledge. A rational agent makes decisions that
are most likely to achieve the best possible outcome within its environment. Rationality is not
just about acting correctly but acting intelligently under given constraints, such as incomplete
information or time limitations.
What is an Ideal Rational Agent?
An ideal rational agent is one that always chooses actions that maximize its performance
measure, considering its current percepts, percept sequence, and built-in knowledge. It evaluates
its environment and selects the best possible action to achieve its goals efficiently.
Examples of Ideal Rational Agents:
• AI Bots in Games: These agents calculate the best moves to maximize their chances of
winning, such as chess engines predicting multiple moves ahead.
• E-Commerce Recommendation Systems: These agents suggest products to users based
on their browsing history and preferences, aiming to maximize user engagement and
sales.
Rationality is the cornerstone of intelligent agent design, ensuring that the agent adapts and
performs effectively in diverse scenarios.
1.9 The Structure of Agents
Intelligent agents are designed with various structures to handle tasks based on the complexity of
their environment and objectives. These structures define how an agent perceives, processes, and
responds to its environment.
1. Simple Reflex Agents
Simple reflex agents are the simplest agent form that grounds actions on perception. This agent
does not hold any memory, nor does it interact with other agents if it is missing information.
These agents function on a set of so-called reflexes or rules. This means that the agent is
preprogrammed to perform actions that correspond to certain conditions being met.
If the agent encounters a situation that it is not prepared for, it cannot respond appropriately. The
agents are only effective in environments that are fully observable granting access to all
necessary information.
Example: A thermostat that turns on the heating system at a set time every night. The condition-
action rule here is, for instance, if it is 8 PM, then the heating is activated.
2. Model-Based Reflex Agents
Model-based reflex agents use both their current perception and memory to maintain an internal
model of the world. As the agent continues to receive new information, the model is updated.
The agent’s actions depend on its model, reflexes, previous precepts and current state.
These agents, unlike simple reflex agents, can store information in memory and can operate in
environments that are partially observable and changing. However, they are still limited by their
set of rules.6
Example: A robot vacuum cleaner. As it cleans a dirty room, it senses obstacles such as furniture
and adjusts around them. The robot also stores a model of the areas it has already cleaned to not
get stuck in a loop of repeated cleaning.
3. Goal-Based Agents
Goal-based agents have an internal model of the world and also a goal or set of goals. These
agents search for action sequences that reach their goal and plan these actions before acting on
them. This search and planning improve their effectiveness when compared to simple and model-
based reflex agents.7
Example: A navigation system that recommends the fastest route to your destination. The model
considers various routes that reach your destination, or in other words, your goal. In this
example, the agent’s condition-action rule states that if a quicker route is found, the agent
recommends that one instead.
.
4. Utility-Based Agents
Utility-based agents select the sequence of actions that reach the goal and also maximize utility
or reward. Utility is calculated using a utility function. This function assigns a utility value, a
metric measuring the usefulness of an action or how “happy” it will make the agent, to each
scenario based on a set of fixed criteria.
The criteria can include factors such as progression toward the goal, time requirements, or
computational complexity. The agent then selects the actions that maximize the expected utility.
Hence, these agents are useful in cases where multiple scenarios achieve a desired goal and an
optimal one must be selected.7
Example: A navigation system that recommends the route to your destination that optimizes fuel
efficiency and minimizes the time spent in traffic and the cost of tolls. This agent measures
utility through this set of criteria to select the most favorable route.
1.10 The Nature of Environments
Some programs operate in the entirely artificial environment confined to keyboard input,
database, computer file systems and character output on a screen.
In contrast, some software agents (software robots or softbots) exist in rich, unlimited softbots
domains. The simulator has a very detailed, complex environment. The software agent needs to
choose from a long array of actions in real time. A softbot designed to scan the online
preferences of the customer and show interesting items to the customer works in the real as well
as an artificial environment.
The most famous artificial environment is the Turing Test environment, in which one real and
other artificial agents are tested on equal ground. This is a very challenging environment as it is
highly difficult for a software agent to perform as well as a human.
Turing Test
The success of an intelligent behavior of a system can be measured with Turing Test.
Two persons and a machine to be evaluated participate in the test. Out of the two persons, one
plays the role of the tester. Each of them sits in different rooms. The tester is unaware of who is
machine and who is a human. He interrogates the questions by typing and sending them to both
intelligences, to which he receives typed responses.
This test aims at fooling the tester. If the tester fails to determine machines response from the
human response, then the machine is said to be intelligent.
Properties of Environment
The environment has multifold properties −
Discrete / Continuous − If there are a limited number of distinct, clearly defined, states of the
environment, the environment is discrete (For example, chess); otherwise it is continuous (For
example, driving).
Observable / Partially Observable − If it is possible to determine the complete state of the
environment at each time point from the percepts it is observable; otherwise it is only partially
observable.
Static / Dynamic − If the environment does not change while an agent is acting, then it is static;
otherwise it is dynamic.
Single agent / Multiple agents − The environment may contain other agents which may be of
the same or different kind as that of the agent.
Accessible / Inaccessible − If the agents sensory apparatus can have access to the complete state
of the environment, then the environment is accessible to that agent.
Deterministic / Non-deterministic − If the next state of the environment is completely
determined by the current state and the actions of the agent, then the environment is
deterministic; otherwise it is non-deterministic.
Episodic / Non-episodic − In an episodic environment, each episode consists of the agent
perceiving and then acting. The quality of its action depends just on the episode itself.
Subsequent episodes do not depend on the actions in the previous episodes. Episodic
environments are much simpler because the agent does not need to think ahead.