Question
Please NO SPAM answers! Original code only. Please write the program in C++ . Problem : You are to implement the minimax(max value function and
Please NO SPAM answers! Original code only.
Please write the program in C++. Problem: You are to implement the minimax(max value function and min value funtion) tree to do both alpha and beta pruning according to link(https://en.wikipedia.org/wiki/Alphabeta_pruning) and print a message "alpha pruning" or "beta pruning" each time that occurs (in addition to the max of the tree). For example, the inputted tree: ((3,8,(7,(3,0,7),(8,8,2))), (4,(7,9,8),8), (((3,6,4),2,6),((9,2,9),4,7,(6,4,5) ),4,(6,4,5))) would print "alpha pruning" 3 times and "beta pruning" 3 times.
So the user will be prompted to enter the above input and then after the program finishes the output would be the: "alpha pruning" 3 times and "beta pruning" 3 times.
A visual representation of the tree inputted above is:
A visual representation of the tree minmax alpha beta complete of input above is:
So then once the program is done its output should be printed: "alpha pruning" 3 times and "beta pruning" 3 times.
If you have any more question, then let me know, thanks.
p.s. IF YOU can do the above problem in PYTHON, then please do so and comment it and provide good indention on here.
Max Min Max 4 4 2) (6 4) (7 6 Max Min Max 4 4 2) (6 4) (7 6Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started