Skip to content

Instantly share code, notes, and snippets.

@JonathanCroenen
JonathanCroenen / dqn_torch.py
Last active May 5, 2023 09:35
Implementation of DQN with pytorch in the DeepMind Open Spiel environment (Won't learn)
from __future__ import annotations
from collections import deque, namedtuple
import pyspiel
from open_spiel.python.algorithms.evaluate_bots import evaluate_bots
from open_spiel.python.bots.uniform_random import UniformRandomBot
import torch
import torch.nn as nn
import torch.optim as optim
import random
import math