Bot Battle 2024

Get Started

Explore the following pages

Manual

Learn the basics of the game

What is SYNCS Bot Battle?

Bot Battle is a programming competition that challenges students to systematically solve a video game with an automated solution while competing with other students. The goal is to test student’s programming ability and devise clever solutions to complex problems in a competitive and fun environment.

Game Outline

The game is heavily based on the Hasbro board game Risk: Global Domination, where strategy, diplomacy, and conquest are key. If you're unfamiliar with Risk, it's highly recommended to explore the game to understand its mechanics and relevant strategies. You can find out more about the game and play it for free here.

Risk is a strategy game in which players compete to conquer territories on a world map, aiming for global domination or specific mission objectives. Players will develop their bots to automate gameplay, strategically manage resources, and outmaneuver opponents. The game involves dice-based combat, troop placements, and strategic alliances. Here is the link for the board game manual that we have derived from here.

Game Equipments

Game Board

Though there are several variations to Risk, we will be using the Earth map (42 territories and 6 continents). Each continent contains roughly 4-12 territories. Additionally, each continent contains continent bonuses (see Continent Bonuses).

Listed below are the territories that belong to each continent.

ContinentTerritories
North AmericaAlaska, Alberta, Central America, Eastern United States, Greenland, Northwest Territory, Ontario, Quebec, Western United States
South AmericaArgentina, Brazil, Peru, Venezuela
EuropeGreat Britain, Iceland, Northern Europe, Scandinavia, Southern Europe, Ukraine, Western Europe
AfricaCongo, East Africa, Egypt, Madagascar, North Africa, South Africa
AsiaAfghanistan, China, India, Irkutsk, Japan, Kamchatka, Middle East, Mongolia, Siam, Siberia, Ural, Yakutsk
AustraliaEastern Australia, Indonesia, New Guinea, Western Australia

Map with Territory Id

Territory Cards

There are 44 cards in Risk.

  • 42 being marked with a territory and a symbol (Infantry, Cavalry or Artillery)
  • 2 being "wild" cards (has no territories on it)

Game Setup

Initial Troop Phase

The game is first set up through randomly generating the order of player turns.

  • Claiming territories: Players take turns placing troops on unoccupied territories until all territories on the map are claimed.
  • Fortifying Territories: Players continue placing remaining troops on their controlled territories, setting the stage for future battles.

Every player will have at the start, a total of 25 troops respectively.

Turn Overview

There are 3 stages per turn for each player. This being the troop placement stage, the attacking stage and finally fortifying phase.

Troop Placement Stage

Getting reinforcement troops Each turn a player will be given a certain number of reinforcement troops based on several factors listed below:

  1. The number of territories you occupy. Troops are calculated by dividing and flooring the number of territories you own by 3.
  2. The value of the continents you control (see Continent Bonuses).
  3. The value of the matched sets of territory cards you trade in (see Territory Cards).
  4. The specific territory pictured on a traded-in card (see Territory Cards).

Note — To control a continent, you must occupy all its territories at the start of your turn.

The player will then have a choice to redeem their territory cards into a valid set. Though if they have more than 5 territory cards, they will need to redeem a set.

Distribution of reinforcement troops The player can then deploy as many additional troops as they own on occupied territories until they have no more to deploy. Once the player has no more additional troops they can move onto the battle stage. The player cannot move onto the battle stage till they have deployed all of their additional troops.

Battle Stage

After the troop placement phase, the player can decide to attack the opposing player's territories.

The objective of this stage is to capture a territory by defeating all opposing armies already on it. The battles are fought by rolling dice. More information on Dice Based Combat.

Attacking rules If the player chooses to attack, there are the following rules:

  1. You may only attack a country that's adjacent (touching) to one of your own, or connected by a dashed line.
  2. You must always have at least two armies in the territory you’re attacking from.
  3. You may continue attacking one territory until you have eliminated all armies on it, or you may shift your attack from one territory to another, attacking each as often as you like and attacking as many territories as you like during one turn.

Capturing territories As soon as you defeat the last opposing army on a territory, you capture that territory and must occupy it immediately. To do so, move in at least as many armies as the number of dice you rolled in your last battle.

Remember: In most cases, moving as many armies as you can to the front is advantageous, because armies left behind can’t help you when you are attacking. Also remember you must always leave at least one army behind on the territory you attacked from. During the game, every territory must always be occupied by at least one army.

Eliminating an opponent If during your turn you eliminate an opponent by defeating his or her last army on the game board, you win any territory cards that player has collected.

  • If winning them gives you 6 or more cards, you must immediately trade in enough sets to reduce your hand to 4 or fewer cards, but once your hand is reduced to 4,3, or 2 cards, you must stop trading.
  • But if winning them gives you fewer than 6, you must wait until the beginning of your next turn to trade in a set.
  • When you draw a card from the deck at the end of your turn (for having won a battle), if this brings your total to 6, you must wait until your next turn to trade in.

Note: If you trade in cards immediately after eliminating an opponent, you get an immediate troop placement phase only for the armies received from the cards you redeemed. This can also include matching territory bonuses. After placing these armies, you continue with your turn as normal.

Ending your attack You may end your attack(s) at any time. Note that no matter how many territories you've captured on your turn, you will only receive one territory card (which can also be a wildcard). The player's bot does not choose to take a card; they are automatically given one.

Fortify Stage

No matter what you’ve done on your turn, you may, if you wish, end your turn by fortifying your position. You are not required to win a battle or even to try an attack to do so.

To fortify your position, move as many armies as you’d like from one (and only one) of your territories into one (and only one) of your adjacent territories. Remember to move troops towards borders where they can help in an attack!

Though in moving your armies from one territory to another, you must leave at least one army behind.

Winning

The winner is the first player to eliminate every opponent by capturing all 42 territories on the board. Congratulations! You've conquered the world!

Game Mechanics

Territory Cards

At the end of any turn in which you have captured at least one territory, you will earn one (and only one) territory card.

Valid Sets — The aim for a player is to collect sets of 3 cards in any of these following combinations:

Set TypeCard 1Card 2Card 3Reasoning of Valid Set
All Same DesignAlaska (Infrantry)Ukraine (Infantry)Western Australia (Infantry)All cards have the infantry symbol in them
All Different DesignNorth Africa (Infantry)Great Britain (Artillary)Eastern United States (Cavalry)All cards have one of each symbol in Risk.
Any Two Designs + WildcardSouth Africa (Cavalry)Irkutsk (Artillery)Wild CardThere are two cards that have different symbols and one wildcard is given.

Set Increment — When a player redeems a set, the number of armies you get increases throughout the game. This is to encourage players to trade in sets later since they will be more valuable. Here is the breakdown:

Set NumberArmies Received
1st4
2nd6
3rd8
4th10
5th12
6th15
7th or later5 more than previous set

Example — If you trade in the seventh set, you get 20 armies; if you trade in the eighth, you get 25 armies, and so on. “First” and “second” set, etc., refer to sets traded in by anyone during the game. Thus, if you trade in the third set in the game, you receive 8 armies, even if it’s the first set you have traded in.

Occupied territories — If any of the 3 cards you trade in shows the picture of a territory you occupy, you receive 2 extra armies. You must place both those armies onto that particular territory. Note: On a single turn, you may receive no more than 2 extra armies above and beyond those you receive for the matched sets of cards you trade in.

Important: When you receive bonus armies for a matching territory card, you must place those armies on the matching territory shown on the card.

Hint — No matter how many armies you receive at the start of your turn, deploy them carefully-either to prepare for an attack or to defend against one. It is good military strategy to move your armies to the front, heavily fortifying territories that border enemy territories.

Notes:

  1. You cannot redeem a set that has two wildcards in it.
  2. You can only redeem cards in the troop phase.
  3. You can also redeem cards after eliminating a player.

Dice-based Combat

Rolling dice is done during the attack phase.

Attacker — The attacker will choose to roll either 1, 2 or 3 red dice: Note you need to have at least one more troop in your territory than the number of dice you roll (the more dice you roll the higher your odds of winning and claiming the defender's territory). The catch from this is that the more dice you roll, the more armies you may lose, or be required to move into a captured territory. [Explain how the attacker will input their dice choice]

Defender — The defender will choose to roll either 1 or 2 white dice: Though in order to roll 2 dice, they will need to have at least 2 armies on the territory when under attack. Same as the attacker, if the defender chooses to roll more dice, the greater their odds of winning; though again they could possibly lose more troops.

Deciding a battle

Compare the highest die each of you rolled. If yours (the attacker’s) is higher, the defender loses one army from the territory under attack. But if the defender’s die is higher than yours, you lose one army from the territory you attacked from. If each of you rolled more than one die, now compare the two next-highest dice and repeat the process.

Example:
Attacker's DiceDefender's DiceResult
Example 1Dice 1: 6
Dice 2: 1
Dice 3: 1
Dice 1: 3Defender loses one army.
Example 2Dice 1: 3
Dice 2: 3
Dice 1: 4
Dice 2: 3
Attacker loses two armies
Example 3Dice 1: 6
Dice 2: 1
Dice 3: 2
Dice 1: 3
Dice 2: 2
Defender loses one army and attacker loses on army
Example 4Dice 1: 6Dice 1: 5
Dice 2: 4
Defender loses one army
Note:
  • In case of a tie, the defender always wins.
  • The attacker can never lose more than 2 armies on a single roll.

Continent Bonuses

If at the beginning of a turn a player controls all territories on a continent, the player receives a bonus sum of troops equal to the number listed on the game board next to the name of that continent.

ContinentsTroop Bonuses
Australia2
South America2
Africa3
North America5
Europe5
Asia7

Bot Battle implementation

  • Automated Play: Participants will develop bots to play Risk autonomously. Bots will make strategic decisions regarding troop placements, attacks, and movements, following the game’s rules and mechanics.