This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gym | |
import numpy as np | |
# This is a straightforwad implementation of SARSA for the FrozenLake OpenAI | |
# Gym testbed. I wrote it mostly to make myself familiar with the OpenAI gym; | |
# the SARSA algorithm was implemented pretty much from the Wikipedia page alone. | |
env = gym.make("FrozenLake-v0") | |
def choose_action(observation): |