Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do it Python(.py)--> I will hit a like..... Assume that there are two teams and they are team attacker and team defender. Therefore, at

Please do it Python(.py)-->
I will hit a like.....

Assume that there are two teams and they are team attacker and team defender. Therefore, at a state of the game one agent in each team is left alive respectively. Here, the defender is given a lifeline called HP which will be assigned randomly. Furthermore, the attacker agent will try to give maximum negative HP to the defender agent to decrease his(d) chances of survival in the game. On the other hand, the defender agent will try to protect himself by receiving the lowest negative HP possible from the attacker agent. Furthermore, the attacker can have a choice from a number of bullets from his gun and the optimal moves will cost a certain maximum negative HP (chosen from randomly assigned values within the range of minimum and maximum negative HP). Here, are the following things you need to do using Alpha-Beta Pruning algorithm: Sample Input 1: 1. Enter your student id: 17301106 2. Minimum and Maximum value for the range of negative HP: 130 Note: Here, the second input is a space separated single line input string. Sample Input 1 Explanation: Ex. 1 (17301106) (Use 1st digit of your bracu student id) Ex. 60 (17301106) (Use last 2 digits of your bracu student id in reverse) Ex. 3 (17301106) (Use semester code-3rd digit of your bracu student id) Ex. 1 (130) Ex. 30 (130) Sample Output 1: # Number of turns for the attacker agent [Assume that both of them will get equal number of chances] # Initial lifeline (HP) for the defender at initial state of the game # Number of bullets from which the final choice has to be made by the attacker. #Minimum value for the range of negative HP values # Maximum value for the range of negative HP values 1. Depth and Branches ratio is 2:3 2. Terminal States (leaf node values) are 19,22,9,2,26,16,16,27,16. 3. Left life (HP) of the defender after maximum damage caused by the attacker is 44 4. After Alpha-Beta Pruning Leaf Node Comparisons 7

Step by Step Solution

3.36 Rating (149 Votes )

There are 3 Steps involved in it

Step: 1

You can use code like this for a fighting game import random clas... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

Students also viewed these Programming questions