Question: Part 1 : Mortal Kombat [ 5 Points ] In the world of Mortal Kombat, the ultimate battle between Scorpion and Sub - Zero is
Part : Mortal Kombat Points
In the world of Mortal Kombat, the ultimate battle between Scorpion and SubZero is about to
commence in the Earth realm. The air is thick with tension as these two legendary warriors prepare to
face off in a fight to the death. Both fighters are masters of their respective arts, each with a full health
bar, ready to unleash their fury upon one another. In this brutal, turnbased clash, the warriors will
alternately strike at their opponent and ensure victory.
As the battle unfolds, every turn counts. Will it be Scorpion, with his fiery vengeance, who claims
victory? Or will SubZero's icy precision lead him to triumph? The outcome depends on the initial setup:
who strikes first, and how powerful their moves can be
Your task is to simulate this epic showdown given the initial conditions who starts the battle and
determines who emerges as the victor. Prepare yourselves, for this is Mortal Kombat, where only one
warrior will be left standing. Round Fight!
Game Description & Rules:
Players: Scorpion and SubZero.
TurnBased Gameplay: Players take turns to attack.
Turns: The player specified by the first input number will take the first turn in the first round. The
player who didn't take the first turn in the previous round will start in subsequent rounds.
Assume the branching factor and the max depth of the game tree
You have to create the appropriate number of leaf nodes and assign them utility values if
scorpion wins, and if subzero wins
Input
One singledigit number. The number indicates which player starts first for Scorpion, for
SubZero
Output
The name of the gamewinner.
The number of rounds played.
The winner of each round.
Sample Input:
Sample Output:
Game Winner: Scorpion
Total Rounds Played:
Winner of Round : SubZero
Winner of Round : Scorpion
Winner of Round : Scorpion
Now apply the alphabeta pruning algorithm to simulate the problem and find the winner.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
