hands on reinforcement learning
https://github.com/kkhetarpal/rlalgorithms/blob/master/controllability/tabqlearning.ipynb
The original source is https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html. However, the notebook as it is will not work due to headless server needing a screen to render. The followin updated notebook resolves that issue:
https://colab.research.google.com/drive/1GKatNQWF2lCVPsS_Sk29835Th1v1xzQd