Skip to content

Instantly share code, notes, and snippets.

View lezwon's full-sized avatar

Lezwon Castelino lezwon

View GitHub Profile
@kastnerkyle
kastnerkyle / painless_q.py
Last active August 18, 2023 09:32
Painless Q-Learning Tutorial implementation in Python http://mnemstudio.org/path-finding-q-learning-tutorial.htm
# Author: Kyle Kastner
# License: BSD 3-Clause
# Implementing http://mnemstudio.org/path-finding-q-learning-tutorial.htm
# Q-learning formula from http://sarvagyavaish.github.io/FlappyBirdRL/
# Visualization based on code from Gael Varoquaux [email protected]
# http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection