Skip to content

ceshine/google-football-2020

Repository files navigation

Solution to Google Research Football with Manchester City F.C.

In short: MLP and XGB Imitator Models.

The link to the competition overview page.

Commands

Scrape episodes:

python -m football.scraping.scraper

Preprocessing scraped episodes:

python -m football.scraping.preprocess
python -m football.scraping.create_pickle

Train an MLP model:

python -m football.train_mlp_imitator --epochs 100 --batch-size 256

Create the submission:

cp cache/final_weights.pth scripts/model.pth
cp cache/scaler.jbl scripts/
cd scripts && stickytape mlp_submission.py > main.py

Test the submission locally (play 5 games):

cd scripts && python test.py 5

Pack the files into one archive for submission:

cd scripts && zip submission.zip main.py model.pth scaler.jbl

Docker Instructions

This repo comes with a Dockerfile that replicates the development environment.

Install Docker and nvidia-docker. Then build the Docker image:

docker build -t football

Update 20201221: an pre-built image is available now via docker pull ceshine/google-football-2020.

Now you can run the commands in the above section inside a container (with GPU acceleration):

docker run --gpus all --shm-size 1g --rm -ti -v $(pwd):/src -w /src football bash

Since the submission won't have GPU acceleration available, you can run the test script in CPU mode:

docker run --rm -ti -v (pwd):/src -w /src/scripts football python test.py 5

The match videos will be located at a subfolder in cache/runs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages