This repository contains code to generate datasets to train and benchmark a pix2pix model for predicting the outcome of a move in the game Spread: Transmission.
Implementation of pix2pix | Spread: Transmission on Steam
- Node.js 18
- Clone this repo:
git clone https://github.com/cxve/transmission-dataset-maker
cd transmission-dataset-maker
- Install dependencies with
npm install
- Run the generate script for a specified number of simulations (e.g. 10):
node generate 10
-
To sort the dataset by amount of iterations used to resolve the changes (flat distribution), use the
-fd
flag- Use the
flatdist_compiler
script, to sort the dataset for usage with the pix2pix implementation
- Use the
-
Use the dataset to train a pix2pix model
- Copy the
./datasets/name/sorted/
folder to/path/to/pix2pix/datasets/name
- Learn how to use the pix2pix implementation here
- Copy the
- Run the sort_by_changes script for a specified path (e.g.
./datasets/name
):
node sort_by_changes ./datasets/name
-
To sort the dataset based on the relative amount of changes, use the
-%
flag -
Use the
flatdist_compiler
script, to sort the dataset for usage with the pix2pix implementation
- Run the flatdist_compiler script for a specified path (e.g.
./datasets/name/flatdist2
) and an optional amount of images to include (e.g. 60):
node flatdist_compiler ./datasets/name/flatdist2 60
- Use the dataset to train a pix2pix model
- Copy the
./datasets/name/flatdist2/sorted/
folder to/path/to/pix2pix/datasets/name
- Copy the
- Run the analyze script for a specified path (e.g.
./results/name
):
node analyze ./results/name
- Results are saved as
name.csv
- Run the benchmark script:
node benchmark
- Use the dataset to benchmark a pix2pix model
- Copy the
./datasets_test/testset_name/
folder to/path/to/pix2pix/datasets/name/testset_name
- Copy the