0% found this document useful (0 votes)
34 views99 pages

Unit 1 updated

The document provides an overview of Artificial Intelligence (AI), detailing its definitions, techniques, applications, and historical development. It discusses the need for AI in improving efficiency, decision-making, and exploring new frontiers, while also outlining various approaches to AI, including acting humanly, thinking rationally, and the role of agents. Additionally, it covers data acquisition methods and the primary goals of Data Acquisition Systems (DAQ) in monitoring and optimizing processes.

Uploaded by

Shantanu V
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)
34 views99 pages

Unit 1 updated

The document provides an overview of Artificial Intelligence (AI), detailing its definitions, techniques, applications, and historical development. It discusses the need for AI in improving efficiency, decision-making, and exploring new frontiers, while also outlining various approaches to AI, including acting humanly, thinking rationally, and the role of agents. Additionally, it covers data acquisition methods and the primary goals of Data Acquisition Systems (DAQ) in monitoring and optimizing processes.

Uploaded by

Shantanu V
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/ 99

21CSC206T

ARTIFICIAL INTELLIGENCE
Unit - 1
AI techniques, Data acquisition Problem solving-
Problem solving AI Models, and learning Problem solving
with AI, aspects in AI, process,

Formulating Problem types and Problem space and Toy Problems – Tic-
problems, characteristics, search, tac-toe problems,

Real World
Missionaries and Problem –
Cannibals Problem, Travelling
Salesman Problem
By John McCarthy (Father of Textbook Definition: Russell and Norvig (Authors of
AI): • "Artificial Intelligence is the study of Artificial Intelligence: A
• "AI is the science and engineering of how to make computers perform tasks Modern Approach):
making intelligent machines, especially that require human intelligence, such • "AI is the designing of agents that
intelligent computer programs." as reasoning, learning, problem-
solving, understanding language, and perceive their environment and take
perception." actions to maximize their chances of
achieving specific goals."

Layman's Definition: Oxford Dictionary:


• "AI is the ability of a machine or • "The theory and development of
program to think and learn like a computer systems able to perform
human to solve problems and make tasks normally requiring human
decisions." intelligence, such as visual perception,
speech recognition, decision-making,
and language translation."
Artificial Intelligence
Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that
are programmed to think and act like humans.

It involves the development of algorithms and computer programs that can perform tasks
that typically require human intelligence such as visual perception, speech recognition,
decision-making, and language translation.
The main focus of artificial intelligence is towards understanding human behavior and
performance.

This can be done by creating computers with human-like intelligence and capabilities. This
includes natural language processing, facial analysis and robotics.

The main applications of AI are in military, healthcare, and computing; however, it’s
expected that these applications will start soon and become part of our everyday lives.
Need for Artificial Intelligence

Better decision- Exploration of new


Improved
making: Artificial Enhanced accuracy: Personalization: frontiers: Artificial
efficiency: Artificial
intelligence can Artificial Artificial intelligence can be
intelligence can
analyze large intelligence intelligence can be used to explore
automate tasks and
To create expert Helping machines amounts of data algorithms can used to personalize new frontiers and
processes that are
systems that find solutions to and provide process data experiences for discover new
time-consuming
exhibit intelligent complex problems insights that can aid quickly and users, tailoring knowledge that is
and require a lot of
behavior with the like humans do and in decision-making. accurately, recommendations, difficult or
human effort. This
capability to learn, applying them as This can be reducing the risk of and interactions impossible for
can help improve
demonstrate, algorithms in a especially useful in errors that can based on individual humans to access.
efficiency and
explain, and advise computer-friendly domains like occur in manual preferences and This can lead to
productivity,
its users. manner. finance, healthcare, processes. This can behaviors. This can new breakthroughs
allowing humans to
and logistics, where improve the improve customer in fields like
focus on more
decisions can have reliability and satisfaction and astronomy,
creative and high-
significant impacts quality of results. loyalty. genetics, and drug
level tasks.
on outcomes. discovery.
AI – History and Foundations

Alan Turing, British mathematician and WWII code-breaker, is widely


credited as being one of the first people to come up with the idea of
machines that think in 1950.

He even created the Turing test, which is still used today, as a benchmark
to determine a machine’s ability to “think” like a human.

Though his ideas were ridiculed at the time, they set the wheels in
motion, and the term “artificial intelligence” entered popular awareness
in the mid- 1950s, after Turing died.
AI – History and Foundations

The Three Laws of First Law Second Law Third Law


Isaac Asimov, was
Robotics. The rules • A robot may not injure • A robot must obey the • A robot must protect its
an American writer
were introduced in a human being or, orders given to it by own existence as long
and professor of through inaction, allow human beings except as such protection does
his 1950 short
biochemistry at a human being to come where such orders not conflict with the
story "Runaround" to harm. would conflict with the First or Second Law.
Boston University.
and "I,Robot“ First Law.
AI – History and Foundations
⮚ 1951 – First AI based program was written
⮚ a checkers-playing program written by Christopher
Strachey and a chess-playing program written by
Dietrich Prinz.
⮚ 1955 – First self learning game playing
⮚ competing against human players in the game of
Checkers
⮚ In 1955, John McCarthy coined the term Artificial
Intelligence, which he proposed in the famous Dartmouth
conference in 1956.
⮚ 1959 – MIT – AI based lab setup
⮚ 1961 – First Robot is introduced into GM’s assembly line
AI – History and Foundations
⮚ 1964 – First demo of AI program which understand natural language
⮚ 1965 – First chat bot Eliza was invented
⮚ 1974 – First Autonomous vehicle is created
⮚ 1989 – Carnegie Mellon created the first autonomous vehicle using
neural networks
⮚ ALVINN, which stands for Autonomous Land Vehicle In a Neural Network
AI – History and Foundations
⮚ 1996 – IBM’s deep blue – chess playing game
⮚ Deep Blue won its first game against world
champion Garry Kasparov in game one of a six-
game match on 10 February 1996.
⮚ 1999 – Sony introduces AIBO – self learning
entertaining robot
AI – History and Foundations

1999 2009 2011 2016


MIT AI lab – first emotional Google – stared to build a Google now and Cortana UC Berkley launces the
AI is demonstrated self driving car becomes mainstream centre for human
compatible AI

DARPA(Defense Advanced
Research Projects Agency) – Narrative Science AI
introduce first vehicle demonstrate ability to write Stanford issues the AI 100
challenge reports reports

2004 2010 2016


Approaches of AI
1.Acting humanly: The Turing Test approach

• The Turing Test, proposed by Alan Turing in 1950.


• It was designed to provide a satisfactory operational definition of
intelligence.
• 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.
• It gives the details of the test and whether a computer would really
be intelligent. i.e. programming a computer to pass a rigorously
applied test provides plenty to work on.
2. Thinking humanly: The cognitive modeling approach

Have to design and implement programs as how humans think i.e. need to get inside the
actual workings of human minds.
There are three ways to get in human minds
1.Through introspection—trying to catch our own thoughts as they go by
2.Through psychological experiments—observing a person in action
3.Through brain imaging—observing the brain in action.
Once gets the knowledge about mind, it becomes possible to express the knowledge as a
computer program. If the program’s input–output behavior matches corresponding human
behavior, that is evidence that some of the program’s mechanisms could also be operating in
humans.
By 1965, programs existed that could, solve any solvable problem
described in logical notation.

This logicist tradition within artificial intelligence hopes to build on


3. Thinking such programs to create intelligent systems

rationally: The
“laws of thought” There are two main obstacles to this approach.
approach
First, it is not easy to take informal knowledge and state it in the
formal terms required by logical notation, particularly when the
knowledge is less than 100% certain.

Second, there is a big difference between solving a problem “in


principle” and solving it in practice.
4. Acting An agent is just A rational agent is one
something that perceives that acts so as to achieve
rationally: The and acts. the best outcome.
rational agent
approach
Knowledge
All the skills needed for
representation and
the Turing Test also allow
reasoning enable agents
an agent to act rationally.
to reach good decisions.

We need to be able to We need learning not


generate comprehensible only for erudition, but
sentences in natural also because it improves
language to get by in a our ability to generate
complex society. effective behavior
Approaches of AI

Thought Thought

Behavior Behavior
Agent
• An agent is anything that can be viewed as
perceiving its environment through sensors and
acting upon that environment through actuators.
• A human agent has eyes, ears, and other organs for
sensors and hands, legs, vocal tract, and so on for
actuators.
• A robotic agent might have cameras and infrared
range finders for sensors and various motors for
actuators.
• A software agent receives keystrokes, file contents,
and network packets as sensory inputs and acts on
the environment by displaying on the screen,
writing files, and sending network packets.
• A rational agent is one that does the right thing.
• Abstractly, an agent is a function from percept histories to actions:

[f: P* 🡺 A]
• When an agent is plunked down in an environment, it generates a sequence
of actions according to the percepts it receives.
• This sequence of actions causes the environment to go through a sequence of
states.
Rational • If the sequence is desirable, then the agent has performed well.
• This is rational agent giving the best outcome.
agent Example,
• The vacuum-cleaner agent.
• We might propose to measure performance by the amount of dirt cleaned up
in a single eight-hour shift.
• With a rational agent, of course, what you ask for is what you get.
• A rational agent can maximize this performance measure by cleaning up the
dirt.
• A more suitable performance measure would reward the agent for having a
clean floor
⮚ Initially, AI dealt with simple reasoning and
reaction problems. It requires only very less
knowledge base

⮚ Over the period of time, domains like speech


Birth of AI recognition, image processing and medical
image diagnosis had been added under AI

⮚ Later, AI started to handle complex task with


more knowledge base
Examples

⮚ Building intelligent systems,


⮚ Water tap
When tank gets filled, switch off

⮚ Washing machines
Stops water after reaching particular level
Fuzzy logic takes necessary amount of
water only

⮚ Traffic control
Automatically, dynamically adjust signal
timing, info to nearby signals, etc…
Fuzzy with washing machine Inputs

Load Size (Small, Medium, Fabric Type (Delicate, Normal,


Dirt Level (Low, Medium, High):
Large): Heavy):
The amount of dirt detected on
The quantity of clothes in the The type of clothes, such as silk,
the clothes.
washing machine. cotton, or denim.

Temperature Preference (Cold,


Water Hardness (Soft, Medium,
Warm, Hot):
Hard):
Desired water temperature
The hardness of the water
based on user input or fabric
being used.
type.
Output variables

Water Level (Low, Medium, Washing Time (Short,


High): Medium, Long):
The required water level for The duration of the washing
the washing cycle. cycle.

Spin Speed (Low, Medium, Detergent Amount (Low,


High): Medium, High):
The spinning speed at the The optimal amount of
end of the cycle. detergent needed.
1.If Dirt Level is High and Load Size is Large, then Washing Time is Long and Water Level is
High.
2.If Dirt Level is Low and Fabric Type is Delicate, then Washing Time is Short and Spin Speed is
Low.
3.If Load Size is Medium and Dirt Level is Medium, then Detergent Amount is Medium and
Washing Time is Medium.
4.If Water Hardness is Hard, then Detergent Amount is High.
5.If Fabric Type is Heavy and Dirt Level is High, then Spin Speed is High.
6.If Load Size is Small and Dirt Level is Low, then Water Level is Low and Washing Time is
Short. Machine actions
7.If Temperature Preference is Hot and Fabric Type is Normal, then Washing Time is Medium.
Agent actions

Defuzzification:
Input Fuzzification:
Rule Evaluation: The fuzzy results are Control:
Sensor readings (e.g., load
The fuzzy rules are applied converted into precise The washing machine
weight, water clarity, user
to determine the washing values, such as a specific adjusts its operation based
settings) are converted into
parameters. water level, washing on these calculated values.
fuzzy values.
duration, or spin speed.
⮚ So, the basics of AI,

⮚ Machine has to learn

Examples ⮚ Machine learn from given


knowledge

⮚ Knowledge should be properly


represented
Advantages
• More powerful and more useful computers
• New and improved interfaces
• Solving new problems
• Better handling of information
Artificial • Relieves information overload
Intelligence • Conversion of information into knowledge

Disadvantages
• Increased costs
• Difficulty with software development
• Few experienced programmers
AI Models
General block diagarm
Data Acquisition and Learning
Aspects in AI
⮚ Knowledge discovery
⮚ Data Mining
⮚ Machine learning
⮚ Computational learning theory
⮚ Study and analyse of algorithms
⮚ Lot of mathematical models
⮚ Neural and Evolutionary computation
⮚ Neural: mimics the neural behaviour of human beings
⮚ Evolutionary: Biological behaviours
⮚ Intelligent agents and multi-agent systems
⮚ Agent: a software which is flexible and supports users
Ex- DNA
Sequencing
Data Acquisition in AI
In AI, data acquisition is the process of sampling signals that measure physical conditions in the real
world and converting the samples into digital numeric values that a computer can manipulate.

Data acquisition helps to understand the behavior of the system, develop a model for the system,
and improve the performance of the system.

Data acquisition devices contain signal conditioning circuitry and an analog-to-digital converter.
These devices are flexible and can be used in many different applications.

Collecting new data


Converting/transforming legacy data
There are four methods of acquiring data: Sharing/exchanging data
Purchasing data
Primary goals of Data Acquisition (DAQ)

Data Collection: The fundamental purpose of Real-Time Monitoring: DAQ systems offer real-
DAQ is to collect real-world measurements from time monitoring of critical parameters, allowing
sensors and transducers, including temperature, continuous tracking of processes, machinery, and
pressure, voltage, current, humidity, etc., environmental conditions. This data enables
providing valuable data for analysis and decision- prompt detection of anomalies, facilitating
making. timely corrective actions.

Quality Control and Testing: DAQ assesses the


Process Control: DAQ systems in industrial
quality of products and components in
automation monitor and measure parameters,
manufacturing and quality control. Measuring
providing vital feedback to control systems for
and analyzing various parameters during testing
effective automation and optimization of
ensures that products meet specified standards
manufacturing and industrial processes.
and performance criteria.

Data Analysis and Visualization: DAQ systems Process Optimization: DAQ systems continuously
provide data that can be analyzed and visualized collect and analyze data, identifying
for deeper insights. Analyzing trends, patterns, inefficiencies, bottlenecks, and improvement
and correlations in the acquired data helps make areas for enhanced productivity and resource
data-driven decisions and predictions. utilization, contributing to process optimization.
Machine Learning

• Machines learn in a way which help to train an algorithm so that it can learn and improve
by itself, and it is referred to as AI Learning or Machine Learning in AI.
• Machine learning may involve little or no human intervention.
• AI learning is a very important aspect of artificial intelligence as it involves algorithms that
allows the machines to learn automatically from their experience without the need of
human (programmer) intervention.
• Imagine that you are playing scramble with computer. In the beginning you might win
every time. But after many games as the computer starts to learn how to win at scramble
you might not be able to win against him. If the computer applies this strategy against
other players as well in order to win, this is referred to as generalisation.
Components of Machine Learning in AI

• Representation of data
• First and foremost we need to identify the type
of data we have to deal with.
• It is this component which selects the model in
which data can be represented.
• These include decision trees, constraints,
instances etc.
• Evaluation
• This component helps a machine to evaluate the
situation based on an evaluation criterion and
create a hypothesis based on which decisions can
be taken.
• Optimization and Output Unit
• The way by which hypothesis are generated is
known as optimization.
• It is here that the machine learning system would
interact with the outside world with the help of
the output unit and take actions accordingly.
Computational Learning Theory
Supervised
• The main goal of computational learning
theory is to develop algorithms that can
learn from data.
• This includes both supervised and
unsupervised learning algorithms.
• Supervised learning algorithms are given a
set of training data that includes the
correct answers for a set of tasks. The goal
of a supervised learning algorithm is to Unsupervised
learn a function that can map from the
input data to the correct answers.
• Unsupervised learning algorithms are given
a set of data but not the correct answers.
The goal of an unsupervised learning
algorithm is to find patterns in the data.
Computational Learning Methods
1. Inductive learning: This is the most
common type of learning used in AI. In
inductive learning, a computer program
is given a set of training data (examples
of correct inputs and outputs), and it is
then tasked with generating a general
rule or model that can be used to
predict the output for new inputs.
(Eating spicy food)
2. Deductive learning: In deductive
learning, a computer program is given a
set of rules or a model, and it is then
tasked with using these to generate
correct outputs for new inputs.
(Photosynthesis process)
Computational Learning Methods
3. Abductive learning: In abductive learning,
a computer program is given a set of
training data, and it is then tasked with
generating a hypothesis (a possible
explanation for the data) that is consistent
with the data. The grass is wet (the
observation), therefore, It probably rained
last night (the most likely hypothesis).
4. Reinforcement learning: In reinforcement
learning, a computer program is given a set
of rewards and punishments, and it is then
tasked with learning a policy (a set of rules)
that will maximize the rewards and
minimize the punishments. (Autonomous
cars)
Neural and Evolutionary Computing
• Neural Computing
• A neural network is a method in artificial
intelligence that teaches computers to
process data in a way that is inspired by
the human brain.
• It is a type of machine learning process,
that uses interconnected nodes or
neurons in a layered structure that
resembles the human brain.
• It creates an adaptive system that
computers use to learn from their
mistakes and improve continuously.
• Thus, artificial neural networks attempt to
solve complicated problems, like
summarizing documents or recognizing
faces, with greater accuracy.
Neural and Evolutionary Computing

• Evolutionary Computing
• Evolutionary computing is a subfield of
artificial intelligence and soft computing
that studies algorithms inspired by
biological evolution.
• It involves the use of automatic methods
to generate and evaluate successive
generations of a program until a
proficient solution evolves.
• Evolutionary computing techniques are
iterative and population-based, and
involve operations such as selection,
recombination, and mutation.
PROBLEM SOLVING
⮚ Problem solving – area of finding answers for unknown situation
⮚ Understanding
⮚ Representation
⮚ Formulation
⮚ Solving
⮚ Types,
⮚ Simple – Can be solved using deterministic approach
⮚ Complex – Lack of full information
⮚ Humans
⮚ Able to perceive, learn, use statistical methods, mathematical modelling to solve
⮚ AI do the same for the machine
Problem Solving
• Given situation 🡺 Desired situation
• Task of AI – to perform series of action to move from given situation
to desired situation.
• Types of Problem Solving
• Knowledge based :
• Memory based
• Rule based
• Search based
Problem Solving
• Knowledge based
• A knowledge-based system (KBS) is a type of computer system that analyzes
knowledge, data and other information from sources to generate new
knowledge.
• These systems often have built-in problem-solving capabilities that allow
them to understand the context of the data that they review and process and
make informed decisions based on the knowledge that they store.
Problem Solving
• Search based
• The set of states which are possible
via some sequence of actions the
agent takes is called the search space.
• The series of actions that the agent
actually performs is its search path,
and the final state is a solution if it
has the required property. There may
be many solutions to a particular
problem.
• Problem is defined as set of states
• State is the abstraction of all
information
• Collection of state is called state space
• An operator is applied to a state to
move it to the next state
OBJECTIVES OF PROBLEM SOLVING
⮚ Identify the set of actions which leads to the goal (Search)
⮚ Methods of problem solving is categorised into,
⮚ General purpose
⮚ Special purpose
⮚ General purpose:
⮚ Means-ends analysis
⮚ Present situation is compared with goal and the difference is identified
⮚ Search in action space to reduce the difference
⮚ Special purpose:
⮚ A particular problem is modelled with various assumptions
⮚ Special features of the situation are used to solve the problem
⮚ Expert System:
⮚ Uses historical knowledge to define the solution for the current problem
⮚ Problem solving is used in planning and decision making
PROBLEM SOLVING PROCESS
Problem solving is a process of generating solutions for a given
situation.
These are the following steps which require to solve a problem :
⮚ Problem definition: Detailed specification of inputs and acceptable
system solutions.
⮚ Problem analysis: Analyse the problem thoroughly. If boundary
condition not defined properly, it may lead to more operations,
complex and not achievable
⮚ Knowledge Representation: Collect detailed information about the
problem and define all possible techniques.
⮚ Problem-solving: Selection of best techniques
Components to formulate the problem
Problem formulating steps
Problem solving
Initial State Final State

State Transitions
Components to formulate the problem
• Initial State: This state requires an initial state for the problem which starts the AI
agent towards a specified goal. In this state new methods also initialize problem
domain solving by a specific class.
• Action: This stage of problem formulation works with function with a specific
class taken from the initial state and all possible actions done in this stage.
• Transition: This stage of problem formulation integrates the actual action done by
the previous action stage and collects the final stage to forward it to their next
stage.
• Goal test: This stage determines that the specified goal achieved by the
integrated transition model or not, whenever the goal achieves stop the action
and forward into the next stage to determines the cost to achieve the goal.
• Path costing: This component of problem-solving numerical assigned what will be
the cost to achieve the goal. It requires all hardware software and human working
cost.
Problem Solving – Vacuum cleaner
• Two rooms and one vacuum cleaner
• Dirt in both rooms – to be cleaned
• Vacuum cleaner present in any one room
• Goal – clean both rooms
1 – Dirt – both rooms – Vacuum cleaner – Left room
2 – Dirt – both rooms – Vacuum cleaner – Right
room
3 – Dirt - right room – Vacuum cleaner – Left room
4 – Dirt – right room – Vacuum cleaner – Right room
5 – Dirt – left room – Vacuum cleaner – Left room
6 – Dirt – left room – Vacuum cleaner – Right room
7 – No Dirt – both rooms – Vacuum cleaner – Left
room
8 – No Dirt – both rooms – Vacuum cleaner – Right
room
Problem Solving

You are given two jugs, a 5L one and a 3L one, a pump which has
unlimited water which you can use to fill the jug, and the ground on
which water may be poured. Neither jug has any measuring markings
on it. How can you get exactly 4L of water in 5L jug?
Water Jug Problem
You are given two jugs, a 5L one and a 3L one, a pump which has unlimited water which you
can use to fill the jug, and the ground on which water may be poured. Neither jug has any
measuring markings on it. How can you get exactly 4L of water in 5L jug?

1) Fill the 5-liter jug completely.


2) Transfer 3 liters from a 5-liter jug
to a 3-liter jug.
3) Empty the 3-liter capacity jug.
4) Transfer the remaining 2 liters
from a 5-liter jug to a 3-liter jug.
5) Now, fill the 5-liter jug fully.
6) Pour 1 liter from a 5-liter jug into a
3-liter jug.
Problem Types and Characteristics

1. Deterministic or observable (single-state)


2. Non-observable (multiple-state)
3. Non-deterministic or partially observable
4. Unknown state space

57
Problem Types
1. Deterministic or observable(Single-state problems)
• Each state is fully observable and it goes to one
definite state after any action.
• Here , the goal state is reachable in one single action
or sequence of actions.
• Deterministic environments ignore
uncertainty.
• Ex- Vacuum cleaner with sensor.

58
Problem Types
2. Non-observable(Muliple-state problems) /
conformant problems
• Problem – solving agent does not have any
information about the state.
• Solution may or may not be reached.
• Ex- In case of vacuum cleaner , the goal state is to clean the
floor rather clean floor. Action is to suck if there is dirt. So , in
non-observable condition , as there is no sensor , it will have to
suck the dirt , irrespective of whether it is towards right or left .
Here , the solution space is the states specifying its movement
across the floor.

59
Problem Types
3. Non-deterministic(partially observable) /
contingency problem
• The effect of action is not clear.
• Percepts provide new information about the
current state.
• Ex- If we take Vacuum cleaner , and now assume that the
sensor is attached to it , then it will suck if there is dirt.
Movement of the cleaner will be based on its current
percept.

60
Problem Types
4. Unknown state space problems
• Typically exploration problems
• States and impact of actions are not known
• Ex- online search that involves acting without complete
knowledge of the next state or scheduling without map.

61
Problem Characteristics
1. Is the problem Decomposable?
2. Can solution steps to be ignored or undone?
3. Is the problem’s universe predictable?
4. Is the good solution is absolute or relative?
5. Is the solution a state or a path?
6. What is the role of knowledge?
7. Does the task require interaction with a person?
1) Is the problem Decomposable?
• Decomposable problem: Non - Decomposable problem:
2. Can solution steps to be ignored or
undone?
Consider following 3 problems
• In the Theorem Proving problem, a lemma that has been proved can be ignored for the
next steps.
• Such problems are called Ignorable problems.
• In the 8-Puzzle, Moves can be undone and backtracked.
• Such problems are called Recoverable problems.
• In Playing Chess, moves cannot be retracted.
• Such problems are called Irrecoverable problems.
• Ignorable problems can be solved using a simple control structure that never backtracks.
• Recoverable problems can be solved using backtracking.
• Irrecoverable problems can be solved by recoverable style methods via planning.
3. Is the problem’s universe predictable?
• 8 puzzle problem – next step is always predictable – normal planning -
certain outcome

• Card game – next step is hidden – use probability for finding –


uncertain problem
4. Is the good solution is absolute or relative?
1. Deena is a man.
2. Deena is a worker in a company.
3. Deena was born in 1905.
4. All men are mortal.
5. All workers in a factory died when there was an accident in 1952.
6. No mortal lives longer than 100 years.
“Is Deena alive”
Solution 1: Solution 2:
1. Deena is a man. 1. Deena is a worker in the company.
2. Deena was born in 1915. 2. All workers in the company died in
3. All men are mortal. 1952.
4. Now it is 2024, so Deena’s age is 109 years.
5. No mortal lives longer than 100 years.

Any path problem – Relative solutions


4. Is the good solution is absolute or relative?
Consideration 2 : Travelling Salesman problem

Travelling salesman problem: Goal : shortest path from source city to destination city –
visiting all cities one by one

Solution : Shortest path – to visit all cities


Best path problem – Absolute solutions
Any path problem – Relative solution
5. Is the solution a state or a path?
Consideration 2 : Path problem
The Water Jug Problem, the path that leads to the goal must be reported.
A path-solution problem can be reformulated as a state-solution problem by
describing a state as a partial path to a solution.
The question is whether that is natural or not.

Solution: path taken from (0,0) – (4,0)

Water jug problem: Goal : (4,0)


Solution : path taken to reach goal state from initial state
6. What is the role of knowledge?
• Chess playing
– rules for determining legal moves + some simple control mechanisms
• News paper story
– Supporters of 2 political party.
• It would have to know such things as:
• The names of the candidates in each party.
• The fact that if the major thing you want to see done is have taxes lowered, you
are probably supporting the one party.
• The fact that if the major thing you want to see done is improved education for
minority students, you are probably supporting the other party.
• And so on …
7. Does the task require interaction with a
person?
• Solitary:
• Computer is given with a problem description
• No intermediate communication
• No demand for an explanation
• Conversational:
• Intermediate conversations between person to computer
• User need to provide additional information
• Robotics
Problem Solving
• Tower of Hanoi
• It consists of three rods and N disks.
• The task is to move all disks to
another rod following certain rules:
• Only one disk can be moved at a time.
• Only the uppermost disk can be moved
from one stack to the top of another
stack or to an empty rod.
• Larger disks cannot be placed on top of
smaller disks.
Tower of Hanoi
Tower of Hanoi
N - Queens problem

Place n - queens in such a manner on an n x n chessboard that no


queens attack each other by being in the same row, column or
diagonal.
Travelling Salesman Problem
• Given a set of cities and distances between every pair of cities.
• Find the shortest possible route that visits every city exactly once and
returns to the starting point.
Traveling Salesman Problem
Traveling Salesman Problem
⮚ Given: n cities and distances
⮚ Initial State: fix a city
⮚ Operators:
⮚ add a city to current path
⮚ [move a city to new position]
⮚ [swap two cities]
⮚ [UNCROSS]
⮚ Goal: cheapest path visiting all cities once and returning.
Traveling Salesman Problem

Given: n cities and distances

add a city to current path

Initial State: fix a city


[move a city to new
position]
Operators:

[swap two cities]


Goal: cheapest path visiting
all cities once and returning.
[UNCROSS]
PROBLEM ANALYSIS AND
REPRESENTATION
PROBLEM ANALYSIS AND REPRESENTATION
⮚ Performance of a solution depends on representation
⮚ Important factors for problem representation:
⮚ Compactness: Restricted and defined boundaries
⮚ Utility: compatible with existing system and algorithms
⮚ Soundness: should not report false negative or false positive
⮚ Completeness: Shouldn’t loose earlier information
⮚ Generality: able to capture all the instance of a problem
⮚ Transparency: Reasoning behind the action taken should be visible
Problem Representation
⮚ Steps of problem solving can be modelled into a system so machines
will execute these well defined steps
⮚ This automatic problem solving is called Problem Solver
⮚ Problem solver – Methodology or algorithm that accepts problem
description, domain description and boundary conditions as input and
then searches solution in problem space
⮚ Design knowledge
Performance Measuring
• Various factors needs to be considered in problem solving
• Three outcomes of problem solver
• Finding a solution
• Terminating with failure after search space is exhausted
• Terminating after certain number of iterations
• Reward: if the problem is solved but the amount of time and resource used needs
to be considered
• Performance gain,
• Problem: Well defined problem or poorly defined
• Time: Time taken to arrive at the solution
• Resource: Storage cost, hardware cost, etc.…
• Result: Success or Failure
Problems in design of search programs
• State representation and identifying relationships between states

• Proper selection of forward and backward movement to determine


optimal path

• Rule selection
Problem Space and Search
• Problem is represented as state space
• Search is a general algorithm for finding path in state space
• The identified path will either lead to solution or dead end
• Search algorithm makes use of control strategy like forward or
backward search
• Two types of search
• Informed search
• Uninformed search
Search Types
⮚ Informed
⮚ Heuristic search – skill based
⮚ Based on common sense, rule of thumb, educated guesses or intuitive judgement
⮚ Higher order cognitive process
⮚ Rank alternatives at each multiple selection path and choose the best
⮚ Speedy
⮚ But it ensures high probability of arriving at solution
⮚ Uninformed
⮚ Does not consider specific nature of problem
⮚ Generates all possible states in state space
⮚ Approach is time consuming
⮚ Uninformed search is also referred as blind search
⮚ Generates all possible states in state space and checks for goal state
⮚ Preferred in the algorithm where any error in algorithm has serious consequences
⮚ Search methods are evaluated based on Completeness, Optimality, Time
complexity and Space complexity
AND OR Graph
🞂 OR graphs : generally used for
data driven approach
🞂 AND OR graphs: used for Goal
driven approach
🞂 Problems solvable by
decomposing into sub problems
some of which is to be solved.
🞂 Graph consisting of OR arcs
and AND arcs
🞂 OR : the node has to be solved.
🞂 AND : all the nodes in the arc has
to be solved
Issues in design of search space
⮚ Problem as state space search
⮚ Solve problem by steps that will lead to solution
⮚ During search, the state space will be traversed
⮚ Forward track – moving from one state to another closer to goal state
⮚ Back track – when an error occurred move backwards in the state space
⮚ Need of systematic forward and backtrack
⮚ Issues while designing
⮚ State representation and relationships among states
⮚ Proper forward and backtrack to obtain optimal route
⮚ Rule selection
State-Space Model
⮚ Initial State
⮚ Operators: maps a state into a next state
⮚ alternative: successors of state
⮚ Goal Predicate: test to see if goal achieved
⮚ Optional:
⮚ cost of operators
⮚ cost of solution
Problems
⮚ Toy Problems,
⮚ Tic Tac Toe

⮚ Missionaries and Cannibals

⮚ Real World Problems,


⮚ Route finding

⮚ Travelling Salesman problem

You might also like