SlideShare a Scribd company logo
9
Most read
10
Most read
11
Most read
Presentaion on
“MiniMax Algorithm
and Water Jug
Problem
Presented by
Maruf Alom
ID: 1256
World University of Bangladesh
Minimax and Alpha beta
Reduction
• Writing a machine player for a game, we need detraining
the best possible to move.
• Games such as Chess, tic-tac-toe etc. are interesting
because they offer a pure abstraction of the competition
between two armies.
• Minimax is the recursive algorithm.
Presentaion on “MiniMax Algorithm and Water Jug Problem
How Minimax Algorithm
Works
• Game Tree
• Initial State
• Successor function
• Terminal State
• Utility function
Presentaion on “MiniMax Algorithm and Water Jug Problem
Problem with MiniMax
• Too expensive
• Need to prune tree
Alpha-beta pruning
• If we apply alpha-beta pruning to a standard minimax algorithm, it
returns the same move as the standard one, but it removes (prunes)
all the nodes that are possibly not affecting the final decision.
• Alpha: It is the best choice so far for the player MAX. We want to
get the highest possible value here.
• Beta: It is the best choice so far for MIN, and it has to be the lowest
possible value.
Conclusion
• Games are getting exciting. Game playing is to AI
• Given a good implementation minimax algorithm can
tough together.
Water Jug Problem
• Consider the following problem:
A Water Jug Problem: You are given two jugs, a 4-gallon
one and a 3-gallon 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 2 gallons of water in the 4-
gallon jug?
• State Representation and Initial State –
We will represent a state of the problem as a tuple (x, y)
where x represents the amount of water in the 4-gallon jug and
y represents the amount of water in the 3-gallon jug. Goal state
as (2,y).
• (x,y)If x<4 -> (4,y)
• (x,y)If y<3 ->(x,3)
• (x,y)If x>0 ->(x-d,y)
• (x,y)If y>0 ->(x,y-d)
• (x,y)If x>0 ->(0,y)
• (x,y)If y>0 ->(x,0)
• (x,y)If(x+y>=4 and y>0) ->(4,y-(4-x))
• (x,y)If (x+y>=3 and x>0) ->(x-(3-y),3)
• (x,y)If(x+y<=4 and y>0) ->(x+y,0)
• (x,y)If (x+y<=3 and x>0) ->(0,x+y)
• (0,2)->(2,0)
4 Gallon Jug 3 Gallon
Jug
0 0
4 0
1 3
1 0
0 1
4 1
2 3
4 Gallon jug
3 Gallon jug
pump
(0,0)
(4,0)
(4,3) (0,0
)
(1,3)
(0,3)
(4,3
)
(0,0) (3,0)

More Related Content

PPT
Heuristic Search Techniques {Artificial Intelligence}
PPTX
Learning occam razor
PPTX
Vertex cover Problem
PPTX
Unification and Lifting
PPTX
Inductive bias
PPTX
And or graph
PPTX
Decision Tree Learning
PPTX
adaboost
Heuristic Search Techniques {Artificial Intelligence}
Learning occam razor
Vertex cover Problem
Unification and Lifting
Inductive bias
And or graph
Decision Tree Learning
adaboost

What's hot (20)

PPT
Principles of soft computing-Associative memory networks
PPTX
Bayesian network
PPT
Fuzzy relations
PDF
Python networkx library quick start guide
PPT
Bayesian networks
PPTX
Inheritance and Polymorphism
PPTX
Adversarial search with Game Playing
PDF
Mask R-CNN
PPTX
CGChapter 3.pptx
PPTX
Handling Missing Values for Machine Learning.pptx
PPT
Predicate logic_2(Artificial Intelligence)
PDF
Rough K Means - Numerical Example
PPT
Planning
PDF
Convolutional Neural Network Models - Deep Learning
PPT
pushdown automata
PPT
introduction of Java beans
ODP
Production system in ai
PPTX
Evaluating hypothesis
Principles of soft computing-Associative memory networks
Bayesian network
Fuzzy relations
Python networkx library quick start guide
Bayesian networks
Inheritance and Polymorphism
Adversarial search with Game Playing
Mask R-CNN
CGChapter 3.pptx
Handling Missing Values for Machine Learning.pptx
Predicate logic_2(Artificial Intelligence)
Rough K Means - Numerical Example
Planning
Convolutional Neural Network Models - Deep Learning
pushdown automata
introduction of Java beans
Production system in ai
Evaluating hypothesis
Ad

Similar to Presentaion on “MiniMax Algorithm and Water Jug Problem (20)

PPT
Various Uninform Search Strategies in AI.ppt
PPT
Uninformed Search goal based agents Representing states and operations
PDF
03_UninformedSearch.pdf
PPTX
UninformedSearch (2).pptx
PPTX
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
PDF
Games.4
PPT
PPTX
AI-04 Production System - Search Problem.pptx
PDF
Paper Study: OptNet: Differentiable Optimization as a Layer in Neural Networks
PPTX
Problem Formulation
PPT
GamePlaying.ppt
PPT
Chapter 02-artificialPROBLEM SOLVING.ppt
PPTX
AI-State Space Representation.pptx
PPTX
AI-State Space Representation.pptx
PPTX
Chapter 5.pptx
PPT
Rai practical presentations.
PPT
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
PPT
cs-171-07-Games and Adversarila Search.ppt
PPTX
Balls and-bins model app
PPTX
Av 738-Adaptive Filters - Extended Kalman Filter
Various Uninform Search Strategies in AI.ppt
Uninformed Search goal based agents Representing states and operations
03_UninformedSearch.pdf
UninformedSearch (2).pptx
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Games.4
AI-04 Production System - Search Problem.pptx
Paper Study: OptNet: Differentiable Optimization as a Layer in Neural Networks
Problem Formulation
GamePlaying.ppt
Chapter 02-artificialPROBLEM SOLVING.ppt
AI-State Space Representation.pptx
AI-State Space Representation.pptx
Chapter 5.pptx
Rai practical presentations.
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
cs-171-07-Games and Adversarila Search.ppt
Balls and-bins model app
Av 738-Adaptive Filters - Extended Kalman Filter
Ad

Recently uploaded (20)

PDF
Digital Logic Computer Design lecture notes
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Well-logging-methods_new................
DOCX
573137875-Attendance-Management-System-original
PPT
Project quality management in manufacturing
PPTX
Sustainable Sites - Green Building Construction
PPT
introduction to datamining and warehousing
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Digital Logic Computer Design lecture notes
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Safety Seminar civil to be ensured for safe working.
OOP with Java - Java Introduction (Basics)
Well-logging-methods_new................
573137875-Attendance-Management-System-original
Project quality management in manufacturing
Sustainable Sites - Green Building Construction
introduction to datamining and warehousing
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Model Code of Practice - Construction Work - 21102022 .pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
Automation-in-Manufacturing-Chapter-Introduction.pdf
CH1 Production IntroductoryConcepts.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Presentaion on “MiniMax Algorithm and Water Jug Problem

  • 1. Presentaion on “MiniMax Algorithm and Water Jug Problem Presented by Maruf Alom ID: 1256 World University of Bangladesh
  • 2. Minimax and Alpha beta Reduction • Writing a machine player for a game, we need detraining the best possible to move. • Games such as Chess, tic-tac-toe etc. are interesting because they offer a pure abstraction of the competition between two armies. • Minimax is the recursive algorithm.
  • 4. How Minimax Algorithm Works • Game Tree • Initial State • Successor function • Terminal State • Utility function
  • 6. Problem with MiniMax • Too expensive • Need to prune tree
  • 7. Alpha-beta pruning • If we apply alpha-beta pruning to a standard minimax algorithm, it returns the same move as the standard one, but it removes (prunes) all the nodes that are possibly not affecting the final decision. • Alpha: It is the best choice so far for the player MAX. We want to get the highest possible value here. • Beta: It is the best choice so far for MIN, and it has to be the lowest possible value.
  • 8. Conclusion • Games are getting exciting. Game playing is to AI • Given a good implementation minimax algorithm can tough together.
  • 9. Water Jug Problem • Consider the following problem: A Water Jug Problem: You are given two jugs, a 4-gallon one and a 3-gallon 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 2 gallons of water in the 4- gallon jug? • State Representation and Initial State – We will represent a state of the problem as a tuple (x, y) where x represents the amount of water in the 4-gallon jug and y represents the amount of water in the 3-gallon jug. Goal state as (2,y).
  • 10. • (x,y)If x<4 -> (4,y) • (x,y)If y<3 ->(x,3) • (x,y)If x>0 ->(x-d,y) • (x,y)If y>0 ->(x,y-d) • (x,y)If x>0 ->(0,y) • (x,y)If y>0 ->(x,0) • (x,y)If(x+y>=4 and y>0) ->(4,y-(4-x)) • (x,y)If (x+y>=3 and x>0) ->(x-(3-y),3) • (x,y)If(x+y<=4 and y>0) ->(x+y,0) • (x,y)If (x+y<=3 and x>0) ->(0,x+y) • (0,2)->(2,0)
  • 11. 4 Gallon Jug 3 Gallon Jug 0 0 4 0 1 3 1 0 0 1 4 1 2 3 4 Gallon jug 3 Gallon jug pump