diff options
author | Matt Strapp <matt@mattstrapp.net> | 2022-01-27 15:29:31 -0600 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2022-01-27 15:29:31 -0600 |
commit | 772cff67fd3b491d015ba89601a0a098c69edd69 (patch) | |
tree | 7c1f6b3110bb45913bc0b895c0754d5cefda52e0 /System/swingUp.py | |
parent | Add Uploads to the gitignore. (diff) | |
download | ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.tar ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.tar.gz ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.tar.bz2 ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.tar.lz ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.tar.xz ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.tar.zst ee4511w-772cff67fd3b491d015ba89601a0a098c69edd69.zip |
Add code that was not committed before
Diffstat (limited to '')
-rw-r--r--[-rwxr-xr-x] | System/swingUp.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/System/swingUp.py b/System/swingUp.py index f14ef37..fb5d4c0 100755..100644 --- a/System/swingUp.py +++ b/System/swingUp.py @@ -20,16 +20,16 @@ class SwingUpEnv(gym.Env): Observation: Type: Box(4) - Num Observation Min Max - 0 Cart Position -4.8 4.8 - 1 Cart Velocity -Inf Inf - 2 Pole Angle -Inf Inf - 3 Pole Velocity At Tip -Inf Inf + Num Observation Min Max + 0 Cart Position -4.8 4.8 + 1 Cart Velocity -Inf Inf + 2 Pole Angle -Inf Inf + 3 Pole Velocity At Tip -Inf Inf Actions: Type: Box(1) - Num Action Min Max - 0 Push cart -1 1 + Num Action Min Max + 0 Push cart -1 1 Note: The amount the velocity that is reduced or increased is not fixed; it depends on the angle the pole is pointing. This is because the center of gravity of the pole increases the amount of energy needed to move the cart underneath it @@ -94,7 +94,7 @@ class SwingUpEnv(gym.Env): state = self.state x, x_dot, theta, theta_dot = state force = self.force_mag * action[0] - + costheta = math.cos(theta) sintheta = math.sin(theta) |