SlideShare a Scribd company logo
1 of 1
Questions
Questions are asked periodically throughout the visualizations in order
to:
•Direct the learner’s attention to key points
•Give them the opportunity to exercise their understanding of the
algorithm
•Encourage them to more fully grasp the algorithm
Pseudocode
Because of the nature and complexity of the algorithms,
pseudocode is presented to the student alongside the graphical
visualizations.
Advantages to displaying a pseudocode pane:
• Pertinent line (or lines) are highlighted at each step
• Method scope changes are show along with the
visualization.
• A call stack is presented to the user, indicating the
recursive nature of the algorithm.
The Minimax and alpha-beta
pruning algorithms are both
highly recursive algorithms;
therefore, displaying the call
stack to the student is very
helpful for keeping track of
method calls.
Call Stack
Variables
A list of variables and their values
are kept updated for each step of
the algorithm.
Visualizing Minimax
Color Coding
Since Minimax explores game states of a tree, it is essential that the
student be shown the progress of recursion, and additionally which
nodes have been visited and which node is currently being explored.
The temporary utility value for a node is
displayed to the left of a node and is updated if
a better child is explored. The final utility value
of the node is placed in the node after all
candidate children have been explored.
Nodes in the visualization are color
coded and updated over the course
of the visualization:
White – node unvisited
Yellow – node visited
Orange – current node
Green – node selected
Node Utilities
It is important that the student see how the algorithm keeps track of a
given node’s utility.
Explanatory Captions
To assist the user in easily following the
current state of the visualization, a caption
describing the current step of the
algorithm is displayed above the tree.
Since no children have been
explored yet, a temporary
value is set to infinity.
The final selected
action is shown
In green with an
arrow pointing
from the root to
the selected node
Introduction
Research Problem
Students enrolled in Artificial Intelligence classes
often struggle with concepts relating to adversarial
search, specifically the Minimax algorithm and alpha-
beta pruning.
Solution
An interactive algorithm visualization could engage
students and deepen their understanding of the
Minimax algorithm and its role in adversarial search.
Algorithm Visualization
A considerable amount of research has focused on
the development of students’ understanding of
advanced computer science algorithms.
It has been proposed that when engaged
in the visualization. However, many
algorithm visualizations are limited in their
functionality.
Students learn at different speeds. The JHAVÉ
visualization environment allows students to step
forward and backward through the visualization at his
or her own pace.
Visualizing Alpha-Beta Pruning
Alpha and Beta
One of the greatest difficulties students have in learning Minimax with
Alpha-Beta Pruning is with keeping track of the Alpha and Beta values
which are displayed to the left of the nodes which don’t represent an
end state.
Pruning
To indicate when alpha beta pruning takes
place a slash is placed across the edge
connecting the pruned subtree to its parent,
and, keeping with the proposed coloring
scheme, the pruned (unexplored) nodes are
left white.
One main difference, is that MAX nodes are
labeled with their respective alpha values and
MIN nodes are labeled with their respective
beta values.
Since alpha-beta pruning is a subtle extension to the Minimax algorithm, many of the
components of the alpha-beta pruning visualization are similar to the Minimax visualization.
Related Works
Many previous Minimax algorithm visualizations provide
the following functionality to learners:
• Random tree generation
• Node and utility tracking
• alpha and beta tracking when applying pruning
Our visualizations adds to these features by providing
the learner with the following:
• Modularized learning for Minimax and Minimax
with alpha-beta pruning
• Pseudocode highlighting
• Explanatory captions and progressive utility
tracking
• Question generation and learner assessment
Input Generator
Students are permitted to set bounds on
the size of a randomly generated trees, or
input a tree of their own design using a
proprietary string to tree input scheme.
This is recommended especially for users
who wish to sample both algorithms and
observer the nuances given the same tree.
ACKNOWLEDGEMENTS
Special thanks to Professors George Thomas and Tom
Naps, the University of Wisconsin Oshkosh, the
National Science Foundation, and the
support of our fellow researchers.
This project was funded under the NSF
REU site award 0851569 at the
University of Wisconsin Oshkosh.
Department of Computer Science
University of Wisconsin - Oshkosh
June 20 11 -July 2011
J.T. Gralka
Washington & Jefferson College
gralkajt@jay.washjeff.edu
Christopher Witt
University of Wisconsin - Whitewater
wittcm19@uww.edu
Future Work
Because these two algorithms have ‘real world’ applications in the
field of Artificial Intelligence and game theory, a natural extension
of this project would be to create a visualization for simple games,
e.g., tic-tac-toe.
Source: Hofstadter, Douglas (1979). Gödel, Escher, Bach:
An Eternal Golden Braid
A visualization of a practical
example might provide learners
with a better grasp of Minimax and
alpha-beta pruning.
A hypertext book is under development. This online textbook will
include explanations of the algorithms and pseudocode as well as
provide information on the java implementation. Students will be
able to interact with various examples and practice exercises to
help hone their understanding of the Minimax algorithm as well as
it’s applications to the real world.

More Related Content

What's hot

Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning Usama Fayyaz
 
An overview of machine learning
An overview of machine learningAn overview of machine learning
An overview of machine learningKhaledAbdElFatha
 
Supervised Machine Learning With Types And Techniques
Supervised Machine Learning With Types And TechniquesSupervised Machine Learning With Types And Techniques
Supervised Machine Learning With Types And TechniquesSlideTeam
 
Introduction To Machine Learning
Introduction To Machine LearningIntroduction To Machine Learning
Introduction To Machine LearningKnoldus Inc.
 
Cmpe 255 cross validation
Cmpe 255 cross validationCmpe 255 cross validation
Cmpe 255 cross validationAbraham Kong
 
Supervised Machine Learning
Supervised Machine LearningSupervised Machine Learning
Supervised Machine LearningAnkit Rai
 
Introduction to the Telecom Forum Course
Introduction to the Telecom Forum CourseIntroduction to the Telecom Forum Course
Introduction to the Telecom Forum CourseProjectENhANCE
 
Machine Learning
Machine LearningMachine Learning
Machine LearningShrey Malik
 
Supervised Unsupervised and Reinforcement Learning
Supervised Unsupervised and Reinforcement Learning Supervised Unsupervised and Reinforcement Learning
Supervised Unsupervised and Reinforcement Learning Aakash Chotrani
 
Comnet teaching and curriculum development processes
Comnet teaching and curriculum development processesComnet teaching and curriculum development processes
Comnet teaching and curriculum development processesProjectENhANCE
 
Machine Learning an Research Overview
Machine Learning an Research OverviewMachine Learning an Research Overview
Machine Learning an Research OverviewKathirvel Ayyaswamy
 
Supervised Machine Learning Techniques
Supervised Machine Learning TechniquesSupervised Machine Learning Techniques
Supervised Machine Learning TechniquesTara ram Goyal
 

What's hot (20)

Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning Supervised learning and Unsupervised learning
Supervised learning and Unsupervised learning
 
An overview of machine learning
An overview of machine learningAn overview of machine learning
An overview of machine learning
 
Supervised Machine Learning With Types And Techniques
Supervised Machine Learning With Types And TechniquesSupervised Machine Learning With Types And Techniques
Supervised Machine Learning With Types And Techniques
 
Introduction To Machine Learning
Introduction To Machine LearningIntroduction To Machine Learning
Introduction To Machine Learning
 
Cmpe 255 cross validation
Cmpe 255 cross validationCmpe 255 cross validation
Cmpe 255 cross validation
 
Supervised Machine Learning
Supervised Machine LearningSupervised Machine Learning
Supervised Machine Learning
 
Week 9: Programming for Data Analysis
Week 9: Programming for Data AnalysisWeek 9: Programming for Data Analysis
Week 9: Programming for Data Analysis
 
Supervised learning
Supervised learningSupervised learning
Supervised learning
 
Software Radio Course
Software Radio CourseSoftware Radio Course
Software Radio Course
 
Week 8: Programming for Data Analysis
Week 8: Programming for Data AnalysisWeek 8: Programming for Data Analysis
Week 8: Programming for Data Analysis
 
Programming for Data Analysis: Week 3
Programming for Data Analysis: Week 3Programming for Data Analysis: Week 3
Programming for Data Analysis: Week 3
 
Introduction to the Telecom Forum Course
Introduction to the Telecom Forum CourseIntroduction to the Telecom Forum Course
Introduction to the Telecom Forum Course
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
supervised learning
supervised learningsupervised learning
supervised learning
 
Supervised Unsupervised and Reinforcement Learning
Supervised Unsupervised and Reinforcement Learning Supervised Unsupervised and Reinforcement Learning
Supervised Unsupervised and Reinforcement Learning
 
Comnet teaching and curriculum development processes
Comnet teaching and curriculum development processesComnet teaching and curriculum development processes
Comnet teaching and curriculum development processes
 
Machine Learning an Research Overview
Machine Learning an Research OverviewMachine Learning an Research Overview
Machine Learning an Research Overview
 
Supervised Machine Learning Techniques
Supervised Machine Learning TechniquesSupervised Machine Learning Techniques
Supervised Machine Learning Techniques
 
Lesson 11 1
Lesson 11  1Lesson 11  1
Lesson 11 1
 
Uses of accelerometer sensor and its application in m-Learning environments: ...
Uses of accelerometer sensor and its application in m-Learning environments: ...Uses of accelerometer sensor and its application in m-Learning environments: ...
Uses of accelerometer sensor and its application in m-Learning environments: ...
 

Similar to Visualizing Minimax and Alpha-Beta Pruning Algorithms

Developing Computational Skills in the Sciences with Matlab Webinar 2017
Developing Computational Skills in the Sciences with Matlab Webinar 2017Developing Computational Skills in the Sciences with Matlab Webinar 2017
Developing Computational Skills in the Sciences with Matlab Webinar 2017SERC at Carleton College
 
ALGORITHM VISUALIZER
ALGORITHM VISUALIZERALGORITHM VISUALIZER
ALGORITHM VISUALIZERJoe Andelija
 
Machine learning for Data Science
Machine learning for Data ScienceMachine learning for Data Science
Machine learning for Data ScienceDr. Vaibhav Kumar
 
Week_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxWeek_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxmuhammadsamroz
 
[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...
[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...
[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...Jihoo Kim
 
Deep learning Tutorial - Part II
Deep learning Tutorial - Part IIDeep learning Tutorial - Part II
Deep learning Tutorial - Part IIQuantUniversity
 
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
Deep Learning For Practitioners,  lecture 2: Selecting the right applications...Deep Learning For Practitioners,  lecture 2: Selecting the right applications...
Deep Learning For Practitioners, lecture 2: Selecting the right applications...ananth
 
Deep learning with Keras
Deep learning with KerasDeep learning with Keras
Deep learning with KerasQuantUniversity
 
Circuit design presentation
Circuit design presentationCircuit design presentation
Circuit design presentationDebopriyo Roy
 
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersAlbert Y. C. Chen
 
Building High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning ApplicationsBuilding High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning ApplicationsYalçın Yenigün
 
Low Cost Business Intelligence Platform for MongoDB instances using MEAN stack
Low Cost Business Intelligence Platform for MongoDB instances using MEAN stackLow Cost Business Intelligence Platform for MongoDB instances using MEAN stack
Low Cost Business Intelligence Platform for MongoDB instances using MEAN stackAvinash Kaza
 
V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...
V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...
V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...eMadrid network
 
background.pptx
background.pptxbackground.pptx
background.pptxKabileshCm
 
antennapropagation.pdf
antennapropagation.pdfantennapropagation.pdf
antennapropagation.pdfsandeepvs17
 
Antenna And Wave Propagation
Antenna And Wave PropagationAntenna And Wave Propagation
Antenna And Wave PropagationYolanda Ivey
 

Similar to Visualizing Minimax and Alpha-Beta Pruning Algorithms (20)

Developing Computational Skills in the Sciences with Matlab Webinar 2017
Developing Computational Skills in the Sciences with Matlab Webinar 2017Developing Computational Skills in the Sciences with Matlab Webinar 2017
Developing Computational Skills in the Sciences with Matlab Webinar 2017
 
BE-DIP-Lab-Manual.pdf
BE-DIP-Lab-Manual.pdfBE-DIP-Lab-Manual.pdf
BE-DIP-Lab-Manual.pdf
 
ALGORITHM VISUALIZER
ALGORITHM VISUALIZERALGORITHM VISUALIZER
ALGORITHM VISUALIZER
 
Machine learning for Data Science
Machine learning for Data ScienceMachine learning for Data Science
Machine learning for Data Science
 
Seminar nov2017
Seminar nov2017Seminar nov2017
Seminar nov2017
 
Week_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxWeek_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptx
 
[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...
[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...
[Paper Review] Personalized Top-N Sequential Recommendation via Convolutional...
 
Deep learning Tutorial - Part II
Deep learning Tutorial - Part IIDeep learning Tutorial - Part II
Deep learning Tutorial - Part II
 
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
Deep Learning For Practitioners,  lecture 2: Selecting the right applications...Deep Learning For Practitioners,  lecture 2: Selecting the right applications...
Deep Learning For Practitioners, lecture 2: Selecting the right applications...
 
Deep learning with Keras
Deep learning with KerasDeep learning with Keras
Deep learning with Keras
 
Circuit design presentation
Circuit design presentationCircuit design presentation
Circuit design presentation
 
Machine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional ManagersMachine Learning Foundations for Professional Managers
Machine Learning Foundations for Professional Managers
 
Building High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning ApplicationsBuilding High Available and Scalable Machine Learning Applications
Building High Available and Scalable Machine Learning Applications
 
Antenna Balanis
Antenna BalanisAntenna Balanis
Antenna Balanis
 
VIIQ: Auto-suggestion Enabled Visual Interface for Interactive Graph Query Fo...
VIIQ: Auto-suggestion Enabled Visual Interface for Interactive Graph Query Fo...VIIQ: Auto-suggestion Enabled Visual Interface for Interactive Graph Query Fo...
VIIQ: Auto-suggestion Enabled Visual Interface for Interactive Graph Query Fo...
 
Low Cost Business Intelligence Platform for MongoDB instances using MEAN stack
Low Cost Business Intelligence Platform for MongoDB instances using MEAN stackLow Cost Business Intelligence Platform for MongoDB instances using MEAN stack
Low Cost Business Intelligence Platform for MongoDB instances using MEAN stack
 
V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...
V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...
V Jornadas eMadrid sobre "Educación Digital". Cristina Conati, University of ...
 
background.pptx
background.pptxbackground.pptx
background.pptx
 
antennapropagation.pdf
antennapropagation.pdfantennapropagation.pdf
antennapropagation.pdf
 
Antenna And Wave Propagation
Antenna And Wave PropagationAntenna And Wave Propagation
Antenna And Wave Propagation
 

Visualizing Minimax and Alpha-Beta Pruning Algorithms

  • 1. Questions Questions are asked periodically throughout the visualizations in order to: •Direct the learner’s attention to key points •Give them the opportunity to exercise their understanding of the algorithm •Encourage them to more fully grasp the algorithm Pseudocode Because of the nature and complexity of the algorithms, pseudocode is presented to the student alongside the graphical visualizations. Advantages to displaying a pseudocode pane: • Pertinent line (or lines) are highlighted at each step • Method scope changes are show along with the visualization. • A call stack is presented to the user, indicating the recursive nature of the algorithm. The Minimax and alpha-beta pruning algorithms are both highly recursive algorithms; therefore, displaying the call stack to the student is very helpful for keeping track of method calls. Call Stack Variables A list of variables and their values are kept updated for each step of the algorithm. Visualizing Minimax Color Coding Since Minimax explores game states of a tree, it is essential that the student be shown the progress of recursion, and additionally which nodes have been visited and which node is currently being explored. The temporary utility value for a node is displayed to the left of a node and is updated if a better child is explored. The final utility value of the node is placed in the node after all candidate children have been explored. Nodes in the visualization are color coded and updated over the course of the visualization: White – node unvisited Yellow – node visited Orange – current node Green – node selected Node Utilities It is important that the student see how the algorithm keeps track of a given node’s utility. Explanatory Captions To assist the user in easily following the current state of the visualization, a caption describing the current step of the algorithm is displayed above the tree. Since no children have been explored yet, a temporary value is set to infinity. The final selected action is shown In green with an arrow pointing from the root to the selected node Introduction Research Problem Students enrolled in Artificial Intelligence classes often struggle with concepts relating to adversarial search, specifically the Minimax algorithm and alpha- beta pruning. Solution An interactive algorithm visualization could engage students and deepen their understanding of the Minimax algorithm and its role in adversarial search. Algorithm Visualization A considerable amount of research has focused on the development of students’ understanding of advanced computer science algorithms. It has been proposed that when engaged in the visualization. However, many algorithm visualizations are limited in their functionality. Students learn at different speeds. The JHAVÉ visualization environment allows students to step forward and backward through the visualization at his or her own pace. Visualizing Alpha-Beta Pruning Alpha and Beta One of the greatest difficulties students have in learning Minimax with Alpha-Beta Pruning is with keeping track of the Alpha and Beta values which are displayed to the left of the nodes which don’t represent an end state. Pruning To indicate when alpha beta pruning takes place a slash is placed across the edge connecting the pruned subtree to its parent, and, keeping with the proposed coloring scheme, the pruned (unexplored) nodes are left white. One main difference, is that MAX nodes are labeled with their respective alpha values and MIN nodes are labeled with their respective beta values. Since alpha-beta pruning is a subtle extension to the Minimax algorithm, many of the components of the alpha-beta pruning visualization are similar to the Minimax visualization. Related Works Many previous Minimax algorithm visualizations provide the following functionality to learners: • Random tree generation • Node and utility tracking • alpha and beta tracking when applying pruning Our visualizations adds to these features by providing the learner with the following: • Modularized learning for Minimax and Minimax with alpha-beta pruning • Pseudocode highlighting • Explanatory captions and progressive utility tracking • Question generation and learner assessment Input Generator Students are permitted to set bounds on the size of a randomly generated trees, or input a tree of their own design using a proprietary string to tree input scheme. This is recommended especially for users who wish to sample both algorithms and observer the nuances given the same tree. ACKNOWLEDGEMENTS Special thanks to Professors George Thomas and Tom Naps, the University of Wisconsin Oshkosh, the National Science Foundation, and the support of our fellow researchers. This project was funded under the NSF REU site award 0851569 at the University of Wisconsin Oshkosh. Department of Computer Science University of Wisconsin - Oshkosh June 20 11 -July 2011 J.T. Gralka Washington & Jefferson College gralkajt@jay.washjeff.edu Christopher Witt University of Wisconsin - Whitewater wittcm19@uww.edu Future Work Because these two algorithms have ‘real world’ applications in the field of Artificial Intelligence and game theory, a natural extension of this project would be to create a visualization for simple games, e.g., tic-tac-toe. Source: Hofstadter, Douglas (1979). Gödel, Escher, Bach: An Eternal Golden Braid A visualization of a practical example might provide learners with a better grasp of Minimax and alpha-beta pruning. A hypertext book is under development. This online textbook will include explanations of the algorithms and pseudocode as well as provide information on the java implementation. Students will be able to interact with various examples and practice exercises to help hone their understanding of the Minimax algorithm as well as it’s applications to the real world.