Skip to content

Instantly share code, notes, and snippets.

@tcfuji
tcfuji / dql.jl
Last active July 8, 2021 19:11
Deep Q-Learning in Julia with OpenSpiel
"""
Deep Q-Learning for turn-based board games in Julia using the OpenSpiel package. Just install packages and run 'julia dql.jl'.
Trains against a random agent (usually enough to train a decently strong agent for games like breakthrough). Based on work I did
in pytorch at PNNL. Learned Flux, OpenSpiel.jl for this over a weekend.
"""
using OpenSpiel
using StatsBase
using Flux
using BSON
FROM google/cloud-sdk
RUN apt-get update && apt-get install -y --no-install-recommends curl sshpass netcat-traditional
RUN curl https://get.docker.io/builds/Linux/x86_64/docker-latest -o /bin/docker && chmod +x /bin/docker
RUN curl http://stedolan.github.io/jq/download/linux64/jq -o /bin/jq && chmod +x /bin/jq
ADD gce2docker-fork.sh /
EXPOSE 44243
ENV DOCKER_HOST :44243
ENTRYPOINT ["/gce2docker-fork.sh"]