Skip to content

Instantly share code, notes, and snippets.

View jeremybk21's full-sized avatar

Jeremy Kimball jeremybk21

View GitHub Profile
@jeremybk21
jeremybk21 / cartpole_continuous_action.py
Created March 30, 2023 14:41
Exact same as OpenAI Gymnasium cartpole environment except with a continuous action space. Good for learning control methods other than RL.
"""
Classic cart-pole system implemented by Rich Sutton et al.
Copied from http://incompleteideas.net/sutton/book/code/pole.c
permalink: https://perma.cc/C9ZM-652R
"""
import math
from typing import Optional, Tuple, Union
import numpy as np