This is 2082. Robots have taken over the world. The International Robot Sports Committee (IRSC) has been arranging Olym
Posted: Tue Jul 12, 2022 8:09 am
This is 2082. Robots have taken over the world. TheInternational Robot Sports Committee (IRSC) has beenarranging Olympics for recreations of fellow robots for the last 10years. In Robot Olympic 2082, there is a game called ‘ROBOSword-Fight’. In this game, two robots fight against eachother using swords.
One of the participants in the ROBO Sword-Fight is OptimusPrime. Optimus Prime convincingly won each of his previousgames. There is only one game left for him to reach glory, and hewill have to fight Megatron in that game. In order to win thegame, Optimus Prime will have to achieve a certain amount ofpoints.You have to perform the two tasks given below by usingAlpha-Beta pruning.
Task 1: Calculate the points and find if Optimus Prime won ornot. [6]
Task 2: Shuffle the generated list by S times and find how manytimes Optimus Prime won. [4]
[Hint: This will be a 4-level binary tree. On Level 0(MAX),it will be Optimus Prime’s Turn. On Level 1(MIN) it will beMegatron’s Turn. On Level 2(MAX), again it will be Optimus Prime’sTurn. On Level 3, there will be Terminal Nodes] NOTE: Ifany digit in your id is 0 consider it as 8
Sample Input 1 :
Enter your student ID
25485465
Sample Output 1(For Task-1):
Generated 8 random points between the minimum and maximum pointlimits: [66, 74, 14, 73, 19, 26, 32, 40]
Total points to win: 56
Achieved point by applying alpha-beta pruning = 73
The winner is Optimus Prime
[How to find the winner: As the achieved point by Optimus Primeis 73 which is greater than 56, Optimus Prime wins. If the Achievedpoint by applying alpha-beta pruning >= Total points to win,then Winner is Optimus Prime. Otherwise, the Winner isMegatron]
Sample Output 1(For Task-2):
After the shuffle:
List of all points values from each shuffles: [66, 73, 66, 73,73, 66, 40, 66] The maximum value of all shuffles: 73
Won 7 times out of 8 number of shuffles
One of the participants in the ROBO Sword-Fight is OptimusPrime. Optimus Prime convincingly won each of his previousgames. There is only one game left for him to reach glory, and hewill have to fight Megatron in that game. In order to win thegame, Optimus Prime will have to achieve a certain amount ofpoints.You have to perform the two tasks given below by usingAlpha-Beta pruning.
Task 1: Calculate the points and find if Optimus Prime won ornot. [6]
Task 2: Shuffle the generated list by S times and find how manytimes Optimus Prime won. [4]
[Hint: This will be a 4-level binary tree. On Level 0(MAX),it will be Optimus Prime’s Turn. On Level 1(MIN) it will beMegatron’s Turn. On Level 2(MAX), again it will be Optimus Prime’sTurn. On Level 3, there will be Terminal Nodes] NOTE: Ifany digit in your id is 0 consider it as 8
Sample Input 1 :
Enter your student ID
25485465
Sample Output 1(For Task-1):
Generated 8 random points between the minimum and maximum pointlimits: [66, 74, 14, 73, 19, 26, 32, 40]
Total points to win: 56
Achieved point by applying alpha-beta pruning = 73
The winner is Optimus Prime
[How to find the winner: As the achieved point by Optimus Primeis 73 which is greater than 56, Optimus Prime wins. If the Achievedpoint by applying alpha-beta pruning >= Total points to win,then Winner is Optimus Prime. Otherwise, the Winner isMegatron]
Sample Output 1(For Task-2):
After the shuffle:
List of all points values from each shuffles: [66, 73, 66, 73,73, 66, 40, 66] The maximum value of all shuffles: 73
Won 7 times out of 8 number of shuffles