SlideShare a Scribd company logo
9
Most read
10
Most read
12
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

What's hot (20)

PPTX
Karatsuba algorithm for fast mltiplication
Atul Singh
 
PPTX
A star algorithms
sandeep54552
 
PDF
02 Machine Learning - Introduction probability
Andres Mendez-Vazquez
 
PPTX
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Simplilearn
 
PPT
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Salah Amean
 
DOC
Branch and bound
Nv Thejaswini
 
PDF
Outlier detection method introduction
DaeJin Kim
 
ODP
Machine Learning With Logistic Regression
Knoldus Inc.
 
PPTX
K means clustering
keshav goyal
 
PDF
Dijkstra's Algorithm
ArijitDhali
 
PPTX
Detection of heart diseases by data mining
Abheepsa Pattnaik
 
ODP
NAIVE BAYES CLASSIFIER
Knoldus Inc.
 
PPT
Decision tree
Soujanya V
 
PPTX
Boolean difference examples
Aledin Group of Companies
 
PPTX
DAA-Floyd Warshall Algorithm.pptx
ArbabMaalik
 
PPTX
Data Mining: Mining ,associations, and correlations
Datamining Tools
 
PPTX
Ensemble methods
zekeLabs Technologies
 
PPTX
Inductive bias
swapnac12
 
PDF
Regression, Bayesian Learning and Support vector machine
Dr. Radhey Shyam
 
PPTX
Support vector machine learning.pptx
Abhiroop Bhattacharya
 
Karatsuba algorithm for fast mltiplication
Atul Singh
 
A star algorithms
sandeep54552
 
02 Machine Learning - Introduction probability
Andres Mendez-Vazquez
 
Decision Tree In R | Decision Tree Algorithm | Data Science Tutorial | Machin...
Simplilearn
 
Data mining: Concepts and Techniques, Chapter12 outlier Analysis
Salah Amean
 
Branch and bound
Nv Thejaswini
 
Outlier detection method introduction
DaeJin Kim
 
Machine Learning With Logistic Regression
Knoldus Inc.
 
K means clustering
keshav goyal
 
Dijkstra's Algorithm
ArijitDhali
 
Detection of heart diseases by data mining
Abheepsa Pattnaik
 
NAIVE BAYES CLASSIFIER
Knoldus Inc.
 
Decision tree
Soujanya V
 
Boolean difference examples
Aledin Group of Companies
 
DAA-Floyd Warshall Algorithm.pptx
ArbabMaalik
 
Data Mining: Mining ,associations, and correlations
Datamining Tools
 
Ensemble methods
zekeLabs Technologies
 
Inductive bias
swapnac12
 
Regression, Bayesian Learning and Support vector machine
Dr. Radhey Shyam
 
Support vector machine learning.pptx
Abhiroop Bhattacharya
 

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

PPT
Various Uninform Search Strategies in AI.ppt
prathipaceec
 
PPT
Uninformed Search goal based agents Representing states and operations
ADITIRAMTEKE1
 
PDF
03_UninformedSearch.pdf
kaxeca4096
 
PPTX
UninformedSearch (2).pptx
SankarTerli
 
PPTX
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Jay Patel
 
PDF
Games.4
Praveen Kumar
 
PPT
Games
kalavathisugan
 
PPTX
AI-04 Production System - Search Problem.pptx
Pankaj Debbarma
 
PDF
Paper Study: OptNet: Differentiable Optimization as a Layer in Neural Networks
ChenYiHuang5
 
PPTX
Problem Formulation
Adri Jovin
 
PPT
GamePlaying.ppt
VihaanN2
 
PPT
Chapter 02-artificialPROBLEM SOLVING.ppt
jenyisblessed
 
PPTX
AI-State Space Representation.pptx
Ratnakar Mikkili
 
PPTX
AI-State Space Representation.pptx
Ratnakar Mikkili
 
PPTX
Chapter 5.pptx
Tekle12
 
PPT
Rai practical presentations.
Pradeep Vishwakarma
 
PPT
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
pavan402055
 
PPT
cs-171-07-Games and Adversarila Search.ppt
Samiksha880257
 
PPTX
Balls and-bins model app
deawoo Kim
 
PPTX
Av 738-Adaptive Filters - Extended Kalman Filter
Dr. Bilal Siddiqui, C.Eng., MIMechE, FRAeS
 
Various Uninform Search Strategies in AI.ppt
prathipaceec
 
Uninformed Search goal based agents Representing states and operations
ADITIRAMTEKE1
 
03_UninformedSearch.pdf
kaxeca4096
 
UninformedSearch (2).pptx
SankarTerli
 
Greedy algorithms -Making change-Knapsack-Prim's-Kruskal's
Jay Patel
 
Games.4
Praveen Kumar
 
AI-04 Production System - Search Problem.pptx
Pankaj Debbarma
 
Paper Study: OptNet: Differentiable Optimization as a Layer in Neural Networks
ChenYiHuang5
 
Problem Formulation
Adri Jovin
 
GamePlaying.ppt
VihaanN2
 
Chapter 02-artificialPROBLEM SOLVING.ppt
jenyisblessed
 
AI-State Space Representation.pptx
Ratnakar Mikkili
 
AI-State Space Representation.pptx
Ratnakar Mikkili
 
Chapter 5.pptx
Tekle12
 
Rai practical presentations.
Pradeep Vishwakarma
 
AIMA_ch3_L2-complement.ppt kjekfkjekjfkjefkjefkjek
pavan402055
 
cs-171-07-Games and Adversarila Search.ppt
Samiksha880257
 
Balls and-bins model app
deawoo Kim
 
Av 738-Adaptive Filters - Extended Kalman Filter
Dr. Bilal Siddiqui, C.Eng., MIMechE, FRAeS
 
Ad

Recently uploaded (20)

PPTX
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PPT
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PPTX
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Evaluation and thermal analysis of shell and tube heat exchanger as per requi...
shahveer210504
 
PPT2_Metal formingMECHANICALENGINEEIRNG .ppt
Praveen Kumar
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
Design Thinking basics for Engineers.pdf
CMR University
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
GitOps_Without_K8s_Training simple one without k8s
DanialHabibi2
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
MRRS Strength and Durability of Concrete
CivilMythili
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Day2 B2 Best.pptx
helenjenefa1
 
Depth First Search Algorithm in 🧠 DFS in Artificial Intelligence (AI)
rafeeqshaik212002
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Ad

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