Question: Part 1 : Mortal Kombat [ 5 Points ] In the world of Mortal Kombat, the ultimate battle between Scorpion and Sub - Zero is

Part 1: Mortal Kombat [5 Points]
In the world of Mortal Kombat, the ultimate battle between Scorpion and Sub-Zero 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, turn-based 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 Sub-Zero'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 1, Fight!
Game Description & Rules:
Players: Scorpion and Sub-Zero.
Turn-Based 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 =2 and the max depth of the game tree =5
You have to create the appropriate number of leaf nodes and assign them utility values (-1 if
scorpion wins, and 1 if sub-zero wins)
Input
One single-digit number. The number indicates which player starts first (0 for Scorpion, 1 for
Sub-Zero).
Output
The name of the game-winner.
The number of rounds played.
The winner of each round.
Sample Input:
Sample Output:
Game Winner: Scorpion
Total Rounds Played: 3
Winner of Round 1: Sub-Zero
Winner of Round 2: Scorpion
Winner of Round 3: Scorpion
Now apply the alpha-beta pruning algorithm to simulate the problem and find the winner.
Part 1 : Mortal Kombat [ 5 Points ] In the world

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!