Chapter 1
Chapter 1
Intelligence
Introduction to Artificial
Intelligence
John McCarthy who has coined the word “Artificial
Intelligence” in 1956, has defined AI as “the
science and engineering of making intelligent
machines”, especially intelligent computer
programs.
Artificial Intelligence (AI) is relevant to any
intellectual task where the machine needs to take
some decision or choose the next action based on
the current state of the system, in short act
intelligently or rationally. As it has a very wide
range of applications, it is truly a universal field.
Introduction to Artificial
Intelligence
In simple words, Artificial Intelligent System works
like a Human Brain, where a machine or software
shows intelligence while performing given tasks;
such systems are called intelligent systems or
expert systems. You can say that these systems
can “think” while generating output!!!
1. Perception
2. Knowledge representation
3. Learning
4. Reasoning
5. Problem solving
6. Natural language processing
(Language-understanding)
Components of AI
Perception
In order to work in the environment, intelligent
agents need to scan the environment and the
various objects in it.
Agent scans the environment using various
sense organs like camera, temperature sensor,
etc. This is called as perception.
After capturing various scenes, perceiver
analyses the different objects in it and extracts
their features and relationships among them.
Knowledge representation
There are two blocks A and B having some dirt. Vacuum cleaner agent
supposed to sense the dirt and collect it, thereby making the room clean.
Vacuum cleaner agent
Intelligent agent is the one which can take input from the
environment through its sensors and act upon the
environment through its actuators. Its actions are always
directed to achieve a goal.
In case of intelligent agents, the software modules are
responsible for exhibiting intelligence. Generally observed
capabilities of an intelligent agent can be given as follows:
Ability to remain autonomous (Self-directed)
Responsive
Goal-Oriented
Structure of Intelligent Agents
Rational Agent
Rational agent can be defined as an agent who makes use of its percept sequence, experience and
knowledge to maximize the performance measure of an agent for every probable action. It selects the most
feasible action which will lead to the expected results optimally.
PEAS representation for an
agent
PEAS : PEAS stands for Performance
Measure, Environment, Actuators,
and Sensors.
It is the short form used for
performance issues grouped under
Task Environment.
PEAS
In Rubik’s cube, we have a cube with six color faces. The goal is to
arrange all the cuboids in such a way that each face of cube will show
distinct color as
Example of 8-Puzzle Problem
From the above examples, it must be clear that AI problems are the
one , in which there are few conditions specified and the aim is to not
only generate the solution but also to improve performance of
the system;
because that is where the intelligence of the system gets challenged.
The term intelligence includes many cognitive skills, like the ability to
solve problems, learn, interpret and understand language.
Problem Formulation
Solution :
{{1, 2, 3}, {4, 8, 0}, {7, 6, 5}}
{{1, 2, 3}, {4, 8, 5}, {7, 6, 0}}
{{1, 2, 3}, {4, 8, 5}, {7, 0, 6}}
{{1, 2, 3}, {4, 0, 5}, {7, 8, 6}}
{{1, 2, 3}, {4, 5, 0}, {7, 8, 6}}
{{1, 2, 3}, {4, 5, 6}, {7, 8, 0}}
Path cost = 5 steps
Example of Missionaries and
Cannibals Problem
The problem statement as discussed in the previous section. Let’s
formulate the problem first.
States : In this problem, state can be data structure having triplet (i,j,k)
representing the number of missionaries, cannibals, and canoes on the left
bank of the river respectively.
1. Initial state : It is (3, 3, 1), as all missionaries, cannibals and canoes
are on the left bank of the river.
2. Actions : Take x number of missionaries and y number of cannibals
3. Successor function : If we take one missionary, one cannibal the
other side of the river will have two missionaries and two cannibals left.
4. Goal test : Reached state (0, 0, 0)
5. Path cost : Number of crossings to attain the goal state.
Example of Missionaries and
Cannibals Problem
Example of Missionaries and
Cannibals Problem
Example of Missionaries and
Cannibals Problem
Example of Missionaries and
Cannibals Problem
Solution :
The sequence of actions within the path :
(3,3,1) → (2,2,0) →(3,2,1) → (3,0,0) → (3,1,1) → (1,1,0) → (2,2,1) →
(0,2,0) → (0,3,1) → (0,1,0) → (0,2,1) → (0,0,0)
Cost = 11 crossings
4 Queens Problem
State Space
Important Questions(Qbank)
Q. Define artificial intelligence.
Q. Write a short note on : Applications of artificial intelligence.
Q. What are the four approaches to define AI
Q. What is Turing test?
Q. What are the components of AI?
Q. Explain PEAS representation with example.
Q. Define agent and give classification of agents.
Q. What is intelligent agent?
Q. Write a short note on: Rational agent.
Q. Write a short note on : Structure of Intelligent agents.
Q. Give types of agents.
Q. What are various agent environments? Give PEAS representation for an agent.
Q. What do you mean by PEAS? Explain properties of task environment.
Q. Explain detail architecture of goal based agent.
Q. Explain detail architecture of Model based agent
Q. Explain Simple reflex agent architecture.
Q. Explain learning agent architecture and its components
Q. Write state space representation for classical AI problems