v-kas-dangi / Tower_defense_ai-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tower-Defense-AI

A fresh take on the classic tower defense game and AI to play it. Made in Python. The game contains 2 modes:

  1. Manual
  2. AI mode (genetic Algorithm mode)

Player can choose to use the game in any of given modes.

Implemented Genetic Algorithm from scratch whose performance matches human level performance.

Alternative RL Algorithms

Model-Free RL

  1. Asynchronous Advantage Actor-Critic (A2C/A3C)
  2. Proximal Policy Optimization (PPO)
  3. Trust Region Policy Optimization (TRPO)
  4. Deep Deterministic Policy Gradient (DDPG)
  5. Twin Delayed DDPG (TD3)
  6. Soft Actor-Critic (SAC)
  7. Deep Q-Networks (DQN)
  8. Categorical 51-Atom DQN (C51)
  9. Quantile Regression DQN (QR-DQN)
  10. Hindsight Experience Replay (HER)

Model-Based RL

  1. World Models
  2. Imagination-Augmented Agents (I2A)
  3. Model-Based RL with Model-Free Fine-Tuning (MBMF)
  4. Model-Based Value Expansion (MBVE)
  5. AlphaZero

Usage

The objective of the game is to stop enemy from crossing a map by building towers that slow them down and eventually destroy them. Players must manage their money and strategically place towers on the map to stop waves of enemy creeps that gain health and speed as the game progresses. Towers have varying characteristics such as dealing splash damage and slowing down creeps within a certain radius. The interface is largely intuitive as shown below

gameplay

Installation

Clone the git repo into a local directory and run on the desktop

$ git clone git@github.com:code-ash-IIT/Tower_defense_ai.git localDir/
$ cd localDir/code
$ python main.py

Shots from Gameplay

About


Languages

Language:Python 100.0%