And if you want to explore what it the list of tricks that make the cartpole balancing faster and longer with Pytorch, from simple DQN to Double Duelling DQN, I recommend this tutorial:

  
      github.com
  
  
    criteo-research/paiss_deeprl/blob/master/exercises_pytorch.ipynb 79
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# PAISS Practical Deep-RL by Criteo Research (Pytorch version)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%pylab inline\n",
    "\n",
    "from utils import RLEnvironment, RLDebugger\n",


  This file has been truncated. show original