Skip to content

seaiam/AIWarGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 

Repository files navigation

Typing SVG

📋Description

Welcome to our AI War Game! The goal is simple, protect your AI unit at all cost !

🛠️Language

Python

👩‍💻Team members

Name Student ID GitHub Username
Fatima El Fouladi 40108832 seaiam
Anum Siddiqui 40129811 AnumSidd
Raya Maria Lahoud 40129965 rayalahoud

💻 How to run the game

On Mac OS

  1. Clone the repository
  2. run python3 -m venv venv NOTE: could be python instead of python3
  3. activate virtual environment by running source venv/bin/activate
  4. run the game python wargame.py. You can add game settings as we will see later.

On Windows

  1. Clone the repository
  2. run python3 -m venv venv NOTE: could be python instead of python3
  3. activate virtual environment by running venv\Scripts\activate
  4. run the game python wargame.py. You can add game settings as we will see later.

🎮 How to play the game !

Game settings

  • 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

Allowed moves

  1. The destination must be free (no other unit is on it).
  2. 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.
  3. The attacker’s AI, Firewall and Program can only move up or left. The Tech and Virus can move left, top, right, bottom.
  4. The defender’s AI, Firewall and Program can only move down or right. The Tech and Virus can move left, top, right, bottom.

Damage Table

For a unit S attacking a unit T. Damage is bidirectional.
Screenshot 2024-01-16 at 11 40 47 AM
Note that units can self-destruct and give 2 units of damage to every adjacent unit, including friendly ones.

Repair Table

For a unit S healing a friendly unit T.
Screenshot 2024-01-16 at 11 41 21 AM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages