. Problem Statement 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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Use python to solve this alpha beta pruning problem problem statement is 1st picture output 1 explanation is 2nd picture
. Problem Statement
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.
2.
Enter your student id:
17301106
Minimum and Maximum value for the range of negative HP:
1 30
Note: Here, the second input is a space separated single line input string.
Sample Input 1 Explanation:
Ex. 30 (1 30)
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)
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
Transcribed Image Text:. Problem Statement 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. 2. Enter your student id: 17301106 Minimum and Maximum value for the range of negative HP: 1 30 Note: Here, the second input is a space separated single line input string. Sample Input 1 Explanation: Ex. 30 (1 30) 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) 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
MAX
ΜΙΝ
Sample Output 1 Explanation:
Hint:
- Level 0
Leaf Nodes - Level 2
- Level 1
Note:
(Application of Alpha-Beta Pruning Algorithm)
Attacker's Turn / Initial Start
Defender's Turn
Terminal state
MAX utility/Best Choice
3 branches
(Left lifeline/HP)
Left Life (60 - 16) = 44
So, Left life(HP) of the defender after maximum damage caused by the attacker is 44
3^2=9 Leaf Nodes(Random States)
[19, 22, 9, 2, 26, 16, 16, 27, 16]
1. Apply Alpha-Beta Pruning algorithm for sample output line 3 and line 4
2. Formula: Left life HP-Initial life HP-MAX negative HP
Terminal nodes are randomly generated values within the given range of negative HP (sample output line 2).
Transcribed Image Text:MAX ΜΙΝ Sample Output 1 Explanation: Hint: - Level 0 Leaf Nodes - Level 2 - Level 1 Note: (Application of Alpha-Beta Pruning Algorithm) Attacker's Turn / Initial Start Defender's Turn Terminal state MAX utility/Best Choice 3 branches (Left lifeline/HP) Left Life (60 - 16) = 44 So, Left life(HP) of the defender after maximum damage caused by the attacker is 44 3^2=9 Leaf Nodes(Random States) [19, 22, 9, 2, 26, 16, 16, 27, 16] 1. Apply Alpha-Beta Pruning algorithm for sample output line 3 and line 4 2. Formula: Left life HP-Initial life HP-MAX negative HP Terminal nodes are randomly generated values within the given range of negative HP (sample output line 2).
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY