The algorithm uses a custom built Q Learning agent in Python 3. https://github.com/ryanpeach/openaigym/tree/FrozenLake-QLearner
- Python 3
- Tensorflow
- Numpy
- Scipy
The algorithm uses a custom built Q Learning agent in Python 3. https://github.com/ryanpeach/openaigym/tree/FrozenLake-QLearner
# Ryan Peach 3/1/2016 | |
# References Used for this Implementation | |
# https://en.wikipedia.org/wiki/Hungarian_algorithm | |
# https://github.com/bmc/munkres/blob/master/munkres.py | |
# http://csclab.murraystate.edu/bob.pilgrim/445/munkres.html | |
# --- | |
# No copying and pasting of online code was performed, though some code may turn out to be similar due to the standardized nature of this algorithm. | |
# This is a very different implementation due to the fact that it heavily uses numpy, vastly simplifies many poorly pythonized coding elements | |
# removes the "class" approach for a function based one. Etc. | |
# Improvements that need to be made is to require the matrix class, and to vectorize iterations through the matrix. |
from time import time, sleep | |
from functools import wraps | |
import socket | |
import unittest | |
class TimeoutError(socket.timeout): | |
pass | |
none_val = lambda x: 0.0 if x is None else float(x) # Returns float(x), or 0 if x is None |