Skip to content

Instantly share code, notes, and snippets.

View JuhaKiili's full-sized avatar

Juha Kiili JuhaKiili

  • Valohai Ltd
  • Finland
View GitHub Profile
@JuhaKiili
JuhaKiili / deep_gambler.py
Last active April 18, 2019 09:15 — forked from joannapurosto/deep_gambler.py
Q-learning tutorial part 3 and Deep Learning
from enums import *
import random
import tensorflow as tf
import numpy as np
class DeepGambler:
def __init__(self, learning_rate=0.1, discount=0.95, exploration_rate=1.0, iterations=10000):
self.learning_rate = learning_rate
self.discount = discount # How much we appreciate future reward over current
self.exploration_rate = 1.0 # Initial exploration rate