ARTIFICIAL INTELLIGENCE
CO1: Enumerate the history & Foundation of AI (Understand-L2)
CO2: Apply the Searching algorithms for AI in problem solving (Apply-L3)
CO3: Choose the appropriate representation of knowledge (Apply-L3)
CO4: Choose the appropriate logic concepts (Apply-L3)
CO5: Understand the Expert systems techniques in AI (Understand-L2)
Course Outcomes: At the end of this course
UNIT-I: Introduction:
INTRODUCTION
WHAT IS ARTIFICIAL INTELLIGENCE?�
Definition of AI:
FOUNDATIONS OF AI
PHILOSOPHY
Aristotle (384–322 B.C.), was the first to formulate a precise set of laws governing the rational part of the mind. He developed an informal system of syllogisms for proper reasoning, which in principle allowed one to generate conclusions mechanically, given initial premises.
Example: All dogs are animals and all animals have 4 legs .
-i.e All doges have 4 legs.
HISTORY OF ARTIFICIAL INTELLIGENCE
HISTORY OF ARTIFICIAL INTELLIGENCE
Maturation of Artificial Intelligence (1943-1952)
The birth of Artificial Intelligence (1952-1956)
At that time high-level computer languages such as FORTRAN, LISP, or COBOL were invented. And the enthusiasm for AI was very high at that time.
The golden years-Early enthusiasm (1956-1974)
The first AI winter (1974-1980)
A boom of AI (1980-1987):-
The second AI winter (1987-1993)
The emergence of intelligent agents (1993-2011)
Deep learning, big data and artificial general intelligence (2011-present)
APPLICATION OF AI
AGENTS
AND
ENVIRONMENTS
AGENT is a particular thing or particular equipment.
Environment what is able to see?
Through Sensors and act on their environment.
Through Actuators is a machine to operate.
Definition of Agent:-
An Agent can be anything that perceive environment through sensors and act upon that environment through actuators.
Types of Agents:-
HUMAN-AGENT: A human agent has eyes, ears, and other organs which work for sensors and hand, legs, vocal tract work for actuators.
ROBOTIC AGENT: A robotic agent can have cameras, infrared range finder, NLP for sensors and various motors for actuators.
SOFTWARE AGENT: Software agent can have keystrokes, file contents as sensory input and act on those inputs and display output on the screen.
EXAMPLE FOR AGENT AND ENVIRONMENTS?
HOW DOES THE AGENT INTERACT WITH THE ENVIRONMENT?
The agents interact with the environment in two ways:
1.PERCEPTION
Perception is a passive interaction, where the agent gains information about the environment without changing the environment. The sensors of the robot help it to gain information about the surroundings without affecting the surrounding. Hence, gaining information through sensors is called perception.
2.ACTION
Action is an active interaction where the environment is changed. When the robot moves an obstacle using its arm, it is called an action as the environment is changed. The arm of the robot is called an “Effector” as it performs the action.
CONSIDER A VACUUM CLEANER WORLD
Imagine that our intelligent agent is a robot vacuum cleaner.
Let's suppose that the world has just two rooms. The robot can be in either room and there can be dirt in zero, one, or two rooms.
MEASURING PERFORMANCE
With any intelligent agent, we want it to find a (good) solution and not spend forever doing it.
The interesting quantities are, therefore,
THE SEARCH COST--how long the agent takes to come up with the solution to the problem,
and
THE PATH COST--how expensive the actions in the solution are.
The total cost of the solution is the sum of the above two quantities.
Agent Type | Percepts | Action | Goals | Environment |
Car Driver | Speedometer, GPS, Microphone, Cameras | Steering control, accelerate, brake, talk to passenger | Safe, legal, comfortable journey | Road, Traffic, Pedestrian etc. |
THE CONCEPT OF RATIONALITY
INTELLIGENT AGENTS:
An intelligent agent is an autonomous entity which act upon an environment using sensors and actuators for achieving goals. An intelligent agent may learn from the environment to achieve their goals. A thermostat is an example of an intelligent agent.
Following are the main four rules for an AI agent:
ØRule 1: An AI agent must have the ability to perceive the environment.
ØRule 2: The observation must be used to make decisions.
ØRule 3: Decision should result in an action.
ØRule 4: The action taken by an AI agent must be a rational action.
RATIONAL AGENT:
A rational agent is an agent which has clear preference, models uncertainty, and acts in a way to maximize its performance measure with all possible actions.
A rational agent is said to perform the right things. AI is about creating rational agents to use for game theory and decision theory for various real- world scenarios.
For an AI agent, the rational action is most important because in AI reinforcement learning algorithm, for each best possible action, agent gets the positive reward and for each wrong action, an agent gets a negative reward.
NOTE: Rational agents in AI are very similar to intelligent agents.
Essentially, all rational agents are intelligent agents, but not all intelligent agents are rational. While an intelligent agent can learn and adapt, a rational agent focuses on making the most logical and optimal choices based on information and goals.
RATIONALITY:
The rationality of an agent is measured by its performance measure. Rationality can be judged on the basis of following points:
NOTE: Rationality differs from Omniscience because an Omniscient agent knows the actual outcome of its action and act accordingly, which is not possible in reality.
To design a rational agent we need to specify a task environment
A problem specification for which the agent is a solution
PEAS Representation
PEAS is a type of model on which an AI agent works upon. When we define an AI agent or rational agent, then we can group its properties under PEAS representation model. It is made up of four words:
P: Performance measure
E: Environment
A: Actuators
S: Sensors
Here performance measure is the objective for the success of an agent's behaviour.
Performance measure: ? Environment: ?
Actuators: ? Sensors: ?
Performance measure:
safe, fast, legal, comfortable, maximize profits
Environment:
roads, other traffic, pedestrians, customers
Actuators:
steering, accelerator, brake, signal, horn
Sensors:
cameras, sonar, speedometer, GPS
PEAS: SPECIFYING AN AUTOMATED TAXI DRIVER
PEAS: SPECIFYING AN AUTOMATED TAXI DRIVER
PERFORMANCE MEASURE: Healthy patient, minimize costs, lawsuits
ENVIRONMENT: Patient, hospital, staff
ACTUATORS: Screen display (form including: questions, tests, diagnoses, treatments,
referrals)
SENSORS: Keyboard (entry of symptoms, findings, patient's answers)
Example of Agents with their PEAS representation
THE NATURE OF ENVIRONMENTS
input from the environment through sensors and delivers the output to the environment through actuators.
FEATURES OF ENVIRONMENT
As per Russell and Norvig, an environment can have various features from the point of view of an agent:
then it is a fully observable environment, else it is partially observable.
required for the action.
and operating by itself then such an
a multi-agent environment.
called a dynamic environment else it is called a static environment.
7. ACCESSIBLE VS INACCESSIBLE
an environment is called an Accessible environment else it is called inaccessible.
8. KNOWN VS UNKNOWN
knowledge to perform an action.
environment, agent needs to learn how it works in order to perform an action.
THE STRUCTURE OF
AGENTS
THE STRUCTURE OF AGENTS
The task of AI is to design an agent program which implements the agent function. The structure of an intelligent agent is a combination of architecture and agent program. It can be viewed as:
Agent = Architecture + Agent program
Architecture: Architecture is machinery that an AI agent executes on. Agent Function: Agent function is used to map a percept to an action. f:P* → A
Agent program: Agent program is an implementation of agent function. An agent
program executes on the physical architecture to produce function f.
TYPES OF AI AGENTS
Agents can be grouped into five classes based on their degree of perceived intelligence and
capability. All these agents can improve their performance and generate better action over the time. These are given below:
action. Such as a Room Cleaner agent, it works only if there is dirt in the room.
Schematic diagram of a simple reflex agent.
they perform actions.
A model-based reflex agent.
3. GOAL-BASED AGENTS
agent to what to do.
information.
whether the goal is achieved or not. Such considerations of different scenario are called
searching and planning, which makes an agent proactive.
4. UTILITY-BASED AGENTS
measurement which makes them different by providing a measure of success at a given
state.
agent has to choose in order to perform the best action.
achieves the goals.
5. LEARNING AGENTS
learning capabilities.
doing with respect to a fixed performance standard.
A general learning agent.
PROBLEM-SOLVING AGENT
PROBLEM-SOLVING AGENT
The problem-solving agent performs precisely by defining problems and its several solutions.
definite goal from a present state or condition.”
encompasses a number of techniques such as algorithms, heuristics to solve a problem.
STEPS PERFORMED BY PROBLEM-SOLVING AGENT
Goal Formulation: It is the first and simplest step in problem-solving.
(discussed below).
Problem Formulation: It is the most important step of problem-solving which decides what actions should be taken to achieve the formulated goal.
There are following five components involved in problem formulation:
state. It takes a problem as an input and returns solution as its output.
NOTE: Initial state, actions, and transition model together define the state-space of the problem implicitly. State-space of a problem is a set of all states which can be reached from the initial state followed by any sequence of actions. The state-space forms a directed map or graph where nodes are the states, links between the nodes are actions, and the path is a sequence of states connected by the sequence of actions.
EXAMPLE PROBLEMS
Basically, there are two types of problem approaches:
problem.
SOME TOY PROBLEMS
8 Puzzle Problem: Here, we have a 3×3 matrix with movable tiles numbered from 1 to 8 with a blank space. The tile adjacent to the blank space can slide into that space. The objective is to reach a specified goal state similar to the goal state, as shown in the below figure.
SOME TOY PROBLEMS
THE PROBLEM FORMULATION IS AS FOLLOWS:
EIGHT PUZZLE PROBLEM
follow (square root of (N+1) rows and square root of (N+1) columns).
Here We are solving a problem of 8 puzzle that is a 3x3 matrix.
The puzzle can be solved by moving the tiles one by one in the single empty space and thus achieving the Goal state.
Rules of solving puzzle
Instead of moving the tiles in the empty space we can visualize moving the empty space in place
of the tile.
The empty space can only move in four directions (Movement of empty space) Up Down Right or Left
The empty space cannot move diagonally and can take only one step at a time.
You are given with 2 Jugs, 4 Gallon and a 3 Gallon one. Neither of the jugs has any Measuring marks on it. There is a pump that can be used to fill the jugs with water. How can we get exactly 2 Gallons of water in 4 Gallon Jug?
start state : (0,0)
goal state : (2,n) where n = any value