0% found this document useful (0 votes)
16 views4 pages

Strategy Game Bot Development Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Strategy Game Bot Development Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Error 418 || Round 2

The following document outlines the specifications for two different strategy-based games. Your
task is to create a program, in Python/C++ containing two functions, one for each game. The file
should be saved as “[Link]” (e.g., ac_a.py). Once the round is over, each program
will automatically play against every other program. Points will be awarded based on the
number of other teams each team wins against.
Game 1: Prisoner’s Dilemma

Each bot must decide each round to either cooperate or defect. These choices yield different
point allocations depending on the decisions of both players in each round:

1. Both cooperate: Both players earn 3 points each.


2. One cooperates, one defects: The defecting player earns 1 point, and the cooperating
player earns 0 points.
3. Both defect: Both players earn 0 points.

How to Participate

To participate, you need to create a bot file with a specific function to enable it to play rounds
against other bots. Follow the guidelines below to ensure compatibility with the tournament
system.

Function Requirements

1. Function Name: The function within each file must be named game1.
2. Inputs: The function game1 takes a single parameter:
○ opponent_history: A list of Boolean values representing the opponent’s past
decisions (1 for "cooperate" and 0 for "defect").
3. Output:
○ The function must return a Boolean value:
■ 1 to represent cooperation
■ 0 to represent defection

NOTE: The simulation will be run ~200 times. This is not exactly 200, and is to add a layer of
randomness.
Game 2: Load Block Fire

Welcome to the Load Block Fire tournament! This tournament is a turn-based game where each
bot can choose to perform one of three actions: load, block, or fire. Bots will play against each
other in pairs, attempting to maximize their score and win rounds through strategic planning.
Each match consists of up to 50 turns, after which a tiebreaker is applied if neither bot has won.

Game Rules and Mechanics

Each bot has three actions to choose from:

1. Load: The bot gains one unit of ammo.


2. Fire: The bot attempts to "fire" at its opponent.
○ Firing always uses one unit of ammo.
○ A successful hit (when the opponent is vulnerable or loading) grants the bot a win
for that match.
○ If both bots fire on the same turn, it results in a draw.
○ If no ammo is available, nothing happens. (This will leave you vulnerable to being
fired at)
3. Block: The bot protects itself, avoiding any damage if the opponent fires.
○ Blocking prevents an opponent’s successful hit, even if they have ammo.

The tournament's turn limit is 50 turns per match. If no bot has won after 50 turns, the bot with
more ammo wins. If ammo counts are tied, the match ends in a tie.

Program Requirements for Your Bot

1. Function Name: Each bot file must define a function named game2.
2. Inputs: The game2 function should accept two parameters:
○ ammo: An integer representing the bot’s current ammo count.
○ opponent_history: A list containing the opponent's past moves as
strings (e.g., ["load", "fire", "block"]).
3. Output:
○ The function should return one of three strings:
■ 'load' to load ammo
■ 'fire' to fire at the opponent
■ 'block' to block the opponent’s fire

You might also like