Welcome to our AI War Game! The goal is simple, protect your AI unit at all cost !
Name | Student ID | GitHub Username |
---|---|---|
Fatima El Fouladi | 40108832 | seaiam |
Anum Siddiqui | 40129811 | AnumSidd |
Raya Maria Lahoud | 40129965 | rayalahoud |
On Mac OS
- Clone the repository
- run
python3 -m venv venv
NOTE: could be python instead of python3 - activate virtual environment by running
source venv/bin/activate
- run the game
python wargame.py
. You can add game settings as we will see later.
On Windows
- Clone the repository
- run
python3 -m venv venv
NOTE: could be python instead of python3 - activate virtual environment by running
venv\Scripts\activate
- run the game
python wargame.py
. You can add game settings as we will see later.
- game_type: By default, this is human vs human. The types are : auto, attacker, defender, manual
- max_time: How long the algorithm can take to make a decision. By default, this is 5.0 seconds
- max_turns: How many turns the game can have. If we reach the max, Defender automatically wins. By default, this is 100
- heuristic: Which of our 3 heuristics will the algorithm use for the mini-max algorithm? By default, it is 0: ie the least informed heuristic.
- alpha_beta: Will the algorithm use alpha-beta pruning to optimize its search? By default, this is set to True.
- max_depth: How deep in the search tree will the mini-max algorithm go? By default, this is set to 4
- The destination must be free (no other unit is on it).
- Units are said to be engaged in combat if an adversarial unit is adjacent (in any of the 4 directions). If an AI, a Firewall or a Program is engaged in combat, they cannot move. The Virus and the Tech can move even if engaged in combat.
- The attacker’s AI, Firewall and Program can only move up or left. The Tech and Virus can move left, top, right, bottom.
- The defender’s AI, Firewall and Program can only move down or right. The Tech and Virus can move left, top, right, bottom.
For a unit S attacking a unit T. Damage is bidirectional.
Note that units can self-destruct and give 2 units of damage to every adjacent unit, including friendly ones.