Skip to content

CNN and Q-learning Implementation for Starcraft II

License

Notifications You must be signed in to change notification settings

adhal007/SC2-GCP-CNN

Repository files navigation

SC2-GCP-CNN

Local Implementation of CNN neural network for StarCraft II using Keras

2 files to run the CNN neural network for SCII game data on command prompt.

  1. model.py : This file defines the model architecture for the neural network. It currently uses 3 hidden layers of CNN with 32, 64, 128 architecture followed by Dense MLP with softmax implementation. It is imported into the second file
  2. task.py: This file builds the training data with the following arguments:
    a. --model-name: (str) type - Give a model name for saving

    b. --model-dir : (str)type - Give model directory where raw input data is located

    c. --batch-size: (int)type - Specify the batch size for each epoch to the run the training and evaluate the results

    d. --test-split: (float)type - a value between (0, 1) for training testing data splitting

    e. --seed: (int) type - set seed for the run

    f. --increment: (int) type - additional argument for iterating through n files at a time when training and testing.

Running on command prompt:

  1. Ensure Python is in the path of command prompt for windows, For linux users configure the .bashrc script to add python to path, similar for mac users
  2. Go to directory where the task.py file is located.
  3. Run python task.py --model-name "myCNNModel" --model-dir "C:/Users/..." --batch-size 25 --test-split 0.3 --seed 42 --increment 25

Running on Google Colab:

  1. Navigate to Colab-files and initiate and setup Google Colab from that script
  2. Run the script for finalCNN.py in colab

Graphs for CNN network

Navigate to CNN_tex folder. Use the tex and .sty files to graph the Custom CNN network

About

CNN and Q-learning Implementation for Starcraft II

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published