SlideShare a Scribd company logo
1 of 31
Download to read offline
ARTIFICIAL INTELLIGENCE
PROBLEM SOLVING AND
SEARCH
DR. ADNAN SHAHZADA
WHAT IS PROBLEM?
Artificial Intelligence - UMT Search [1]
§ The disparity (perceived gap) between the existing
state and the desired state.
§ A problem is an obstacle which hinders the achievement
of a particular goal, objective or purpose.
§ A problem may have multiple solutions.
WHAT IS PROBLEM
Artificial Intelligence - UMT Search [2]
§ Many problems can be solved by searching for a good
solution in a search space
§ Where reasoning consists of exploring alternatives.
§ Declarative knowledge creates alternatives
• Which pieces of knowledge to use?
• How to use them?
§ Search is a about exploring alternatives.
• It is a major approach to exploit knowledge
§ Examples of such problems are:
• 8 puzzle problem
• Maze
• TSP
SEARCH PROBLEMS
Artificial Intelligence - UMT Search [3]
EXAMPLE: TIC TAC TOE
Artificial Intelligence - UMT Search [4]
§ We model the real problem
• We magnify the parts of the problem that are important
for the solution and neglect the ones that are not
• We have to count and measure the important parts
• We need to identify the possible “operators” that can
be used to change reality
§ We solve the modelled problem
• Chose a framework that can solve the problem
• Set the model in the framework
• The framework solves the problem
• Validate the solution choice to show how good is the
method
§ With the help of the solution found in the model, we
solve the real problem
PROBLEM SOLVING
Artificial Intelligence - UMT Search [5]
§ A problem is defined by following items:
• A search Space
• Initial state
• Actions Or Successor function
• Goal test, can be
• explicit, e.g., x = "at Lahore"
• implicit, e.g., Checkmate(x)
• Path cost (additive)
• e.g., sum of distances, number of actions
executed, etc.
• A solution, a sequence of actions
leading from the initial state to a goal
state
PROBLEM MODELING/FORMULATION
Artificial Intelligence - UMT Search [6]
§ A convenient way of representing search spaces is as
a graph
§ A graph consists of nodes and links
• nodes represent states in a problem solving process
• links represent transitions or relationships
between nodes
§ A special case of a graph is a rooted tree
• A rooted tree has
• a unique node (the root) from which it is possible
to reach all other nodes in the graph
• at most one link between any two nodes
• no cycles
§ Trees are common in search problems
REPRESENTING A SEARCH SPACE
Artificial Intelligence - UMT Search [7]
§ A start state (where we are at the start, for
example the starting position of a game of chess)
§ Intermediary states (where we are now, for
example the current position of the board of
chess)
§ One or more goal states where the search for a
solution terminates (for example a check-mate
position in chess)
REPRESENTING A PROBLEM WITH A GRAPH
Artificial Intelligence - UMT Search [8]
§ State: Any arrangement of 8 numbered tiles and an
empty tile on a 3x3 board
EXAMPLE: 8 PUZZLE
Artificial Intelligence - UMT Search [9]
8 PUZZLE – PARTIAL STATE SPACE
Artificial Intelligence - UMT Search [10]
§ We have 3 jugs of capacities 3, 5, and 8 liters,
respectively.
§ There is no scale on the jugs, so it's only their
capacities that we certainly know.
§ Initially, the 8-litre jug is full of water, the other
two are empty:
§ We can pour water from one jug to another, and the goal
is to have exactly 4 liters of water in any of the jugs.
WATER JUG PROBLEM
Artificial Intelligence - UMT Search [11]
WATER JUG PROBLEM
Artificial Intelligence - UMT Search [12]
Initial State
Possible Goal States
WATER JUG PROBLEM
Artificial Intelligence - UMT Search [13]
MAN, WOLF, GOAT AND CABBAGE PROBLEM
Artificial Intelligence - UMT Search [14]
§ A Farmer needs to bring a wolf, a goat, and a cabbage
across the river.
§ The boat is tiny and can only carry one passenger/load
at a time.
• If he leaves the wolf and the goat alone together, the
wolf will eat the goat.
• If he leaves the goat and the cabbage alone together,
the goat will eat the cabbage.
§ How can he bring all three safely across the river?
MAN, WOLF, GOAT AND CABBAGE PROBLEM
Artificial Intelligence - UMT Search [15]
E
MAN, WOLF, GOAT AND CABBAGE PROBLEM
Artificial Intelligence - UMT Search [16]
§ A solution is a path connecting the initial node
to a goal node (any one)
SOLUTION TO THE SEARCH PROBLEM
Artificial Intelligence - UMT Search [17]
§ A solution is a path connecting the initial node
to a goal node (any one)
§ The cost of a path is the sum of the arc costs
along this path
§ An optimal solution is a solution path of minimum
cost
• There might be no solution !
SOLUTION TO THE SEARCH PROBLEM
Artificial Intelligence - UMT Search [18]
§ Often it is not feasible (or too expensive) to
build a complete representation of the state graph
§ A problem solver must construct a solution by
exploring a small portion of the graph
SOLUTION TO THE SEARCH PROBLEM
Artificial Intelligence - UMT Search [19]
§ Uninformed (exhaustive/blind) search
§ Informed (heuristic-based) search
SEARCH STRATEGIES
Artificial Intelligence - UMT Search [20]
§ A search is said to be exhaustive if the search is
guaranteed to generate all reachable states
(outcomes) before it terminates with failure.
§ Depth-first search (DFS)
§ Breadth-first search(BFS)
EXHAUSTIVE SEARCH
Artificial Intelligence - UMT Search [21]
§ A search strategy that extends the current path as
far as possible before backtracking to the last
choice point and trying the next alternative path
§ Does not guarantee the optimal
§ In this strategy, search reaches a satisfactory
solution more rapidly than breadth first
• an advantage when the search space is large
DEPTH FIRST SEARCH
Artificial Intelligence - UMT Search [22]
§ Algorithm - Depth-first search
§ Put the root node on a stack;
while (stack is not empty)
{ remove a node from the stack;
if (node is a goal node) return success;
put all children of node onto the stack;}
return failure;
DEPTH FIRST SEARCH
Artificial Intelligence - UMT Search [23]
DEPTH FIRST SEARCH
Artificial Intelligence - UMT Search [24]
In case of graph:
Maintain the visited node
information as well !!
§ DFS systematically proceeds towards depth before
another path is considered.
§ If the maximum depth of search tree is reached and
if the solution has not been found, then the
search backtracks to the previous level and
explores any remaining alternatives at this
level, and so on.
§ It is this systematic backtracking procedure that
guarantees that it will systematically and
exhaustively examine all of the possibilities.
DEPTH FIRST SEARCH
Artificial Intelligence - UMT Search [25]
§ A Search strategy, in which the highest layer of a
decision tree is searched completely before
proceeding to the next layer
§ In this strategy, no viable solution is omitted
and therefore guarantee that optimal solution is
found.
§ This strategy is often not feasible when the
search space is large
BREADTH FIRST SEARCH
Artificial Intelligence - UMT Search [26]
§ Algorithm - Breadth-first search
§ Put the root node on a queue;
while (queue is not empty)
{ remove a node from the queue;
if (node is a goal node) return success;
put all children of node onto the queue;}
return failure;
BREADTH FIRST SEARCH
Artificial Intelligence - UMT Search [27]
BREADTH FIRST SEARCH
Artificial Intelligence - UMT Search [28]
§ The search generates all nodes at a particular level before
proceeding to the next level of the tree.
§ The search systematically proceeds testing each node that is
reachable from a parent node before it expands to any child of
those nodes.
§ The control regime guarantees that the space of possible moves is
systematically examined; this search requires considerable memory
resources.
§ The space that is searched is quite large and the solution may
lie a thousand steps away from the start node. It does, however,
guarantee that if we find a solution it will be the shortest
possible.
§ Search terminates when a solution is found and the test returns
true.
BREADTH FIRST SEARCH
Artificial Intelligence - UMT Search [29]
ITERATIVE DEEPENING
Artificial Intelligence - UMT Search [30]

More Related Content

Similar to ARTIFICIAL INTELLIGENCE PROBLEM SOLVING AND SEARCH

turning test, how it works and winners.ppt
turning test, how it works and winners.pptturning test, how it works and winners.ppt
turning test, how it works and winners.pptMuhammadAbdullah311866
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchTaymoor Nazmy
 
Search-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdfSearch-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdfMrRRThirrunavukkaras
 
Searching is the universal technique of problem solving in Artificial Intelli...
Searching is the universal technique of problem solving in Artificial Intelli...Searching is the universal technique of problem solving in Artificial Intelli...
Searching is the universal technique of problem solving in Artificial Intelli...KarpagaPriya10
 
problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsSlimAmiri
 
Artificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxArtificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxRatnakar Mikkili
 
09_Informed_Search.ppt
09_Informed_Search.ppt09_Informed_Search.ppt
09_Informed_Search.pptrnyau
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligenceananth
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchPalGov
 
aiMODULE 1.pptx
aiMODULE 1.pptxaiMODULE 1.pptx
aiMODULE 1.pptxSharika Tr
 

Similar to ARTIFICIAL INTELLIGENCE PROBLEM SOLVING AND SEARCH (20)

turning test, how it works and winners.ppt
turning test, how it works and winners.pptturning test, how it works and winners.ppt
turning test, how it works and winners.ppt
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-search
 
16355694.ppt
16355694.ppt16355694.ppt
16355694.ppt
 
Search-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdfSearch-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdf
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
 
Searching is the universal technique of problem solving in Artificial Intelli...
Searching is the universal technique of problem solving in Artificial Intelli...Searching is the universal technique of problem solving in Artificial Intelli...
Searching is the universal technique of problem solving in Artificial Intelli...
 
problem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , problomsproblem solve and resolving in ai domain , probloms
problem solve and resolving in ai domain , probloms
 
Artificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptxArtificial Intelligence_Searching.pptx
Artificial Intelligence_Searching.pptx
 
Sudoku
SudokuSudoku
Sudoku
 
AI: AI & problem solving
AI: AI & problem solvingAI: AI & problem solving
AI: AI & problem solving
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Chap11 slides
Chap11 slidesChap11 slides
Chap11 slides
 
09_Informed_Search.ppt
09_Informed_Search.ppt09_Informed_Search.ppt
09_Informed_Search.ppt
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligence
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
 
aiMODULE 1.pptx
aiMODULE 1.pptxaiMODULE 1.pptx
aiMODULE 1.pptx
 

More from Jeff Brooks

Freedom Writers Wiki, Synopsis, Reviews, Watch A
Freedom Writers Wiki, Synopsis, Reviews, Watch AFreedom Writers Wiki, Synopsis, Reviews, Watch A
Freedom Writers Wiki, Synopsis, Reviews, Watch AJeff Brooks
 
IELTS Academic Essay Writing Tips For A Better Score
IELTS Academic Essay Writing Tips For A Better ScoreIELTS Academic Essay Writing Tips For A Better Score
IELTS Academic Essay Writing Tips For A Better ScoreJeff Brooks
 
Posted On March 31, 2017. Online assignment writing service.
Posted On March 31, 2017. Online assignment writing service.Posted On March 31, 2017. Online assignment writing service.
Posted On March 31, 2017. Online assignment writing service.Jeff Brooks
 
Best Custom Writing Service. Best Custom Writing Service
Best Custom Writing Service. Best Custom Writing ServiceBest Custom Writing Service. Best Custom Writing Service
Best Custom Writing Service. Best Custom Writing ServiceJeff Brooks
 
Where To Buy Parchment Paper For Writing. Where Can I Buy Parchment
Where To Buy Parchment Paper For Writing. Where Can I Buy ParchmentWhere To Buy Parchment Paper For Writing. Where Can I Buy Parchment
Where To Buy Parchment Paper For Writing. Where Can I Buy ParchmentJeff Brooks
 
100 College Application Essay Topics. Online assignment writing service.
100 College Application Essay Topics. Online assignment writing service.100 College Application Essay Topics. Online assignment writing service.
100 College Application Essay Topics. Online assignment writing service.Jeff Brooks
 
Moduladmission Essay Essay For University
Moduladmission Essay Essay For UniversityModuladmission Essay Essay For University
Moduladmission Essay Essay For UniversityJeff Brooks
 
MDA . Online assignment writing service.
MDA  . Online assignment writing service.MDA  . Online assignment writing service.
MDA . Online assignment writing service.Jeff Brooks
 
Introduction About Yourself Essay Examples Sitedoct
Introduction About Yourself Essay Examples SitedoctIntroduction About Yourself Essay Examples Sitedoct
Introduction About Yourself Essay Examples SitedoctJeff Brooks
 
Sociology Essay Topics. Online assignment writing service.
Sociology Essay Topics. Online assignment writing service.Sociology Essay Topics. Online assignment writing service.
Sociology Essay Topics. Online assignment writing service.Jeff Brooks
 
How To Write A Proposal Examples.Project-Proposa
How To Write A Proposal Examples.Project-ProposaHow To Write A Proposal Examples.Project-Proposa
How To Write A Proposal Examples.Project-ProposaJeff Brooks
 
How To Write A College Essay -- Bid4Papers Guide
How To Write A College Essay -- Bid4Papers GuideHow To Write A College Essay -- Bid4Papers Guide
How To Write A College Essay -- Bid4Papers GuideJeff Brooks
 
Literature Review Sample UK. Not Sure. Online assignment writing service.
Literature Review Sample UK. Not Sure. Online assignment writing service.Literature Review Sample UK. Not Sure. Online assignment writing service.
Literature Review Sample UK. Not Sure. Online assignment writing service.Jeff Brooks
 
10 Tips How To Write A Debate Essay In 2023 - At
10 Tips How To Write A Debate Essay In 2023 - At10 Tips How To Write A Debate Essay In 2023 - At
10 Tips How To Write A Debate Essay In 2023 - AtJeff Brooks
 
Accountants Report Sample Example Format Compilati
Accountants Report Sample Example Format CompilatiAccountants Report Sample Example Format Compilati
Accountants Report Sample Example Format CompilatiJeff Brooks
 
How To Write A Informal Letter Essay - Agnew Text
How To Write A Informal Letter Essay - Agnew TextHow To Write A Informal Letter Essay - Agnew Text
How To Write A Informal Letter Essay - Agnew TextJeff Brooks
 
Create Chinese Character Practice Writing Sheets
Create Chinese Character Practice Writing SheetsCreate Chinese Character Practice Writing Sheets
Create Chinese Character Practice Writing SheetsJeff Brooks
 
Importance Of Reviews To Find Be. Online assignment writing service.
Importance Of Reviews To Find Be. Online assignment writing service.Importance Of Reviews To Find Be. Online assignment writing service.
Importance Of Reviews To Find Be. Online assignment writing service.Jeff Brooks
 
Critical Essay Topics For Exemplification Essay
Critical Essay Topics For Exemplification EssayCritical Essay Topics For Exemplification Essay
Critical Essay Topics For Exemplification EssayJeff Brooks
 
Printable High School Report Writing Template Examples
Printable High School Report Writing Template ExamplesPrintable High School Report Writing Template Examples
Printable High School Report Writing Template ExamplesJeff Brooks
 

More from Jeff Brooks (20)

Freedom Writers Wiki, Synopsis, Reviews, Watch A
Freedom Writers Wiki, Synopsis, Reviews, Watch AFreedom Writers Wiki, Synopsis, Reviews, Watch A
Freedom Writers Wiki, Synopsis, Reviews, Watch A
 
IELTS Academic Essay Writing Tips For A Better Score
IELTS Academic Essay Writing Tips For A Better ScoreIELTS Academic Essay Writing Tips For A Better Score
IELTS Academic Essay Writing Tips For A Better Score
 
Posted On March 31, 2017. Online assignment writing service.
Posted On March 31, 2017. Online assignment writing service.Posted On March 31, 2017. Online assignment writing service.
Posted On March 31, 2017. Online assignment writing service.
 
Best Custom Writing Service. Best Custom Writing Service
Best Custom Writing Service. Best Custom Writing ServiceBest Custom Writing Service. Best Custom Writing Service
Best Custom Writing Service. Best Custom Writing Service
 
Where To Buy Parchment Paper For Writing. Where Can I Buy Parchment
Where To Buy Parchment Paper For Writing. Where Can I Buy ParchmentWhere To Buy Parchment Paper For Writing. Where Can I Buy Parchment
Where To Buy Parchment Paper For Writing. Where Can I Buy Parchment
 
100 College Application Essay Topics. Online assignment writing service.
100 College Application Essay Topics. Online assignment writing service.100 College Application Essay Topics. Online assignment writing service.
100 College Application Essay Topics. Online assignment writing service.
 
Moduladmission Essay Essay For University
Moduladmission Essay Essay For UniversityModuladmission Essay Essay For University
Moduladmission Essay Essay For University
 
MDA . Online assignment writing service.
MDA  . Online assignment writing service.MDA  . Online assignment writing service.
MDA . Online assignment writing service.
 
Introduction About Yourself Essay Examples Sitedoct
Introduction About Yourself Essay Examples SitedoctIntroduction About Yourself Essay Examples Sitedoct
Introduction About Yourself Essay Examples Sitedoct
 
Sociology Essay Topics. Online assignment writing service.
Sociology Essay Topics. Online assignment writing service.Sociology Essay Topics. Online assignment writing service.
Sociology Essay Topics. Online assignment writing service.
 
How To Write A Proposal Examples.Project-Proposa
How To Write A Proposal Examples.Project-ProposaHow To Write A Proposal Examples.Project-Proposa
How To Write A Proposal Examples.Project-Proposa
 
How To Write A College Essay -- Bid4Papers Guide
How To Write A College Essay -- Bid4Papers GuideHow To Write A College Essay -- Bid4Papers Guide
How To Write A College Essay -- Bid4Papers Guide
 
Literature Review Sample UK. Not Sure. Online assignment writing service.
Literature Review Sample UK. Not Sure. Online assignment writing service.Literature Review Sample UK. Not Sure. Online assignment writing service.
Literature Review Sample UK. Not Sure. Online assignment writing service.
 
10 Tips How To Write A Debate Essay In 2023 - At
10 Tips How To Write A Debate Essay In 2023 - At10 Tips How To Write A Debate Essay In 2023 - At
10 Tips How To Write A Debate Essay In 2023 - At
 
Accountants Report Sample Example Format Compilati
Accountants Report Sample Example Format CompilatiAccountants Report Sample Example Format Compilati
Accountants Report Sample Example Format Compilati
 
How To Write A Informal Letter Essay - Agnew Text
How To Write A Informal Letter Essay - Agnew TextHow To Write A Informal Letter Essay - Agnew Text
How To Write A Informal Letter Essay - Agnew Text
 
Create Chinese Character Practice Writing Sheets
Create Chinese Character Practice Writing SheetsCreate Chinese Character Practice Writing Sheets
Create Chinese Character Practice Writing Sheets
 
Importance Of Reviews To Find Be. Online assignment writing service.
Importance Of Reviews To Find Be. Online assignment writing service.Importance Of Reviews To Find Be. Online assignment writing service.
Importance Of Reviews To Find Be. Online assignment writing service.
 
Critical Essay Topics For Exemplification Essay
Critical Essay Topics For Exemplification EssayCritical Essay Topics For Exemplification Essay
Critical Essay Topics For Exemplification Essay
 
Printable High School Report Writing Template Examples
Printable High School Report Writing Template ExamplesPrintable High School Report Writing Template Examples
Printable High School Report Writing Template Examples
 

Recently uploaded

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Recently uploaded (20)

INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

ARTIFICIAL INTELLIGENCE PROBLEM SOLVING AND SEARCH

  • 1. ARTIFICIAL INTELLIGENCE PROBLEM SOLVING AND SEARCH DR. ADNAN SHAHZADA
  • 2. WHAT IS PROBLEM? Artificial Intelligence - UMT Search [1]
  • 3. § The disparity (perceived gap) between the existing state and the desired state. § A problem is an obstacle which hinders the achievement of a particular goal, objective or purpose. § A problem may have multiple solutions. WHAT IS PROBLEM Artificial Intelligence - UMT Search [2]
  • 4. § Many problems can be solved by searching for a good solution in a search space § Where reasoning consists of exploring alternatives. § Declarative knowledge creates alternatives • Which pieces of knowledge to use? • How to use them? § Search is a about exploring alternatives. • It is a major approach to exploit knowledge § Examples of such problems are: • 8 puzzle problem • Maze • TSP SEARCH PROBLEMS Artificial Intelligence - UMT Search [3]
  • 5. EXAMPLE: TIC TAC TOE Artificial Intelligence - UMT Search [4]
  • 6. § We model the real problem • We magnify the parts of the problem that are important for the solution and neglect the ones that are not • We have to count and measure the important parts • We need to identify the possible “operators” that can be used to change reality § We solve the modelled problem • Chose a framework that can solve the problem • Set the model in the framework • The framework solves the problem • Validate the solution choice to show how good is the method § With the help of the solution found in the model, we solve the real problem PROBLEM SOLVING Artificial Intelligence - UMT Search [5]
  • 7. § A problem is defined by following items: • A search Space • Initial state • Actions Or Successor function • Goal test, can be • explicit, e.g., x = "at Lahore" • implicit, e.g., Checkmate(x) • Path cost (additive) • e.g., sum of distances, number of actions executed, etc. • A solution, a sequence of actions leading from the initial state to a goal state PROBLEM MODELING/FORMULATION Artificial Intelligence - UMT Search [6]
  • 8. § A convenient way of representing search spaces is as a graph § A graph consists of nodes and links • nodes represent states in a problem solving process • links represent transitions or relationships between nodes § A special case of a graph is a rooted tree • A rooted tree has • a unique node (the root) from which it is possible to reach all other nodes in the graph • at most one link between any two nodes • no cycles § Trees are common in search problems REPRESENTING A SEARCH SPACE Artificial Intelligence - UMT Search [7]
  • 9. § A start state (where we are at the start, for example the starting position of a game of chess) § Intermediary states (where we are now, for example the current position of the board of chess) § One or more goal states where the search for a solution terminates (for example a check-mate position in chess) REPRESENTING A PROBLEM WITH A GRAPH Artificial Intelligence - UMT Search [8]
  • 10. § State: Any arrangement of 8 numbered tiles and an empty tile on a 3x3 board EXAMPLE: 8 PUZZLE Artificial Intelligence - UMT Search [9]
  • 11. 8 PUZZLE – PARTIAL STATE SPACE Artificial Intelligence - UMT Search [10]
  • 12. § We have 3 jugs of capacities 3, 5, and 8 liters, respectively. § There is no scale on the jugs, so it's only their capacities that we certainly know. § Initially, the 8-litre jug is full of water, the other two are empty: § We can pour water from one jug to another, and the goal is to have exactly 4 liters of water in any of the jugs. WATER JUG PROBLEM Artificial Intelligence - UMT Search [11]
  • 13. WATER JUG PROBLEM Artificial Intelligence - UMT Search [12] Initial State Possible Goal States
  • 14. WATER JUG PROBLEM Artificial Intelligence - UMT Search [13]
  • 15. MAN, WOLF, GOAT AND CABBAGE PROBLEM Artificial Intelligence - UMT Search [14] § A Farmer needs to bring a wolf, a goat, and a cabbage across the river. § The boat is tiny and can only carry one passenger/load at a time. • If he leaves the wolf and the goat alone together, the wolf will eat the goat. • If he leaves the goat and the cabbage alone together, the goat will eat the cabbage. § How can he bring all three safely across the river?
  • 16. MAN, WOLF, GOAT AND CABBAGE PROBLEM Artificial Intelligence - UMT Search [15] E
  • 17. MAN, WOLF, GOAT AND CABBAGE PROBLEM Artificial Intelligence - UMT Search [16]
  • 18. § A solution is a path connecting the initial node to a goal node (any one) SOLUTION TO THE SEARCH PROBLEM Artificial Intelligence - UMT Search [17]
  • 19. § A solution is a path connecting the initial node to a goal node (any one) § The cost of a path is the sum of the arc costs along this path § An optimal solution is a solution path of minimum cost • There might be no solution ! SOLUTION TO THE SEARCH PROBLEM Artificial Intelligence - UMT Search [18]
  • 20. § Often it is not feasible (or too expensive) to build a complete representation of the state graph § A problem solver must construct a solution by exploring a small portion of the graph SOLUTION TO THE SEARCH PROBLEM Artificial Intelligence - UMT Search [19]
  • 21. § Uninformed (exhaustive/blind) search § Informed (heuristic-based) search SEARCH STRATEGIES Artificial Intelligence - UMT Search [20]
  • 22. § A search is said to be exhaustive if the search is guaranteed to generate all reachable states (outcomes) before it terminates with failure. § Depth-first search (DFS) § Breadth-first search(BFS) EXHAUSTIVE SEARCH Artificial Intelligence - UMT Search [21]
  • 23. § A search strategy that extends the current path as far as possible before backtracking to the last choice point and trying the next alternative path § Does not guarantee the optimal § In this strategy, search reaches a satisfactory solution more rapidly than breadth first • an advantage when the search space is large DEPTH FIRST SEARCH Artificial Intelligence - UMT Search [22]
  • 24. § Algorithm - Depth-first search § Put the root node on a stack; while (stack is not empty) { remove a node from the stack; if (node is a goal node) return success; put all children of node onto the stack;} return failure; DEPTH FIRST SEARCH Artificial Intelligence - UMT Search [23]
  • 25. DEPTH FIRST SEARCH Artificial Intelligence - UMT Search [24] In case of graph: Maintain the visited node information as well !!
  • 26. § DFS systematically proceeds towards depth before another path is considered. § If the maximum depth of search tree is reached and if the solution has not been found, then the search backtracks to the previous level and explores any remaining alternatives at this level, and so on. § It is this systematic backtracking procedure that guarantees that it will systematically and exhaustively examine all of the possibilities. DEPTH FIRST SEARCH Artificial Intelligence - UMT Search [25]
  • 27. § A Search strategy, in which the highest layer of a decision tree is searched completely before proceeding to the next layer § In this strategy, no viable solution is omitted and therefore guarantee that optimal solution is found. § This strategy is often not feasible when the search space is large BREADTH FIRST SEARCH Artificial Intelligence - UMT Search [26]
  • 28. § Algorithm - Breadth-first search § Put the root node on a queue; while (queue is not empty) { remove a node from the queue; if (node is a goal node) return success; put all children of node onto the queue;} return failure; BREADTH FIRST SEARCH Artificial Intelligence - UMT Search [27]
  • 29. BREADTH FIRST SEARCH Artificial Intelligence - UMT Search [28]
  • 30. § The search generates all nodes at a particular level before proceeding to the next level of the tree. § The search systematically proceeds testing each node that is reachable from a parent node before it expands to any child of those nodes. § The control regime guarantees that the space of possible moves is systematically examined; this search requires considerable memory resources. § The space that is searched is quite large and the solution may lie a thousand steps away from the start node. It does, however, guarantee that if we find a solution it will be the shortest possible. § Search terminates when a solution is found and the test returns true. BREADTH FIRST SEARCH Artificial Intelligence - UMT Search [29]