Skip to content

Instantly share code, notes, and snippets.

View sunyong2016's full-sized avatar

Yong Sun sunyong2016

View GitHub Profile
@sunyong2016
sunyong2016 / frozen_lake.py
Created January 14, 2018 03:21 — forked from DataWraith/frozen_lake.py
SARSA implementation for the OpenAI gym Frozen Lake environment
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):