{"id":21031453,"url":"https://github.com/tkkim-robot/unstable_gym","last_synced_at":"2025-05-15T11:33:38.102Z","repository":{"id":45865551,"uuid":"431462187","full_name":"tkkim-robot/unstable_gym","owner":"tkkim-robot","description":"A gym-like classical control benchmark for evaluating the robustnesses of control and reinforcement learning algorithms.","archived":false,"fork":false,"pushed_at":"2022-05-11T14:12:50.000Z","size":3251,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-11T12:36:43.551Z","etag":null,"topics":["benchmark","control","gym","mbrl","mppi","pendulum","robustness","smppi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkkim-robot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-24T11:43:46.000Z","updated_at":"2023-08-16T08:45:45.000Z","dependencies_parsed_at":"2022-07-22T11:03:04.140Z","dependency_job_id":null,"html_url":"https://github.com/tkkim-robot/unstable_gym","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkkim-robot%2Funstable_gym","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkkim-robot%2Funstable_gym/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkkim-robot%2Funstable_gym/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkkim-robot%2Funstable_gym/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkkim-robot","download_url":"https://codeload.github.com/tkkim-robot/unstable_gym/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225349198,"owners_count":17460331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","control","gym","mbrl","mppi","pendulum","robustness","smppi"],"created_at":"2024-11-19T12:28:27.623Z","updated_at":"2024-11-19T12:28:28.058Z","avatar_url":"https://github.com/tkkim-robot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Benchmark for Robustness Tests of Control Alrogithms\n\nThis repository contains classical control benchmarks for evaluating robustnesses of control and reinforcement learning algorithms. It can be used as zero-shot control performance evaluations. It is built upon OpenAI Gym.\n\n# Installation\n\nClone repository, then 'pip install -e .' or 'pip3 install -e .' based on your environment.\n\nOr you can manually install dependencies:\n\n    - numpy\n    - gym\n\n# How to Run Example\n\nYou can run our test example by:\n\nFor pendulum,\n```bash\npython unstable_pendulum.py\n```\nFor cartpole(continuous action),\n```bash\npython unstable_cartpole_cont.py\n```\n\nIt's an inverted pendulum in gym environment. The sample results of the two different winds are shown below:\n\n|                                                              Sine wave side wind                                                               |                                                                Random side wind                                                                |\n| :--------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------: |\n| \u003cimg src=\"https://user-images.githubusercontent.com/40379815/143234809-686f1395-2bac-4d33-a5c8-910c6c9bf9aa.gif\" width=\"200px\" height=\"200px\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/40379815/143234945-3585a0bf-eb56-4c94-9a54-72bab8169c79.gif\" width=\"200px\" height=\"200px\"\u003e |\n\nIt's a cartpole (continuous action) environment. The sample results of the two different winds are shown below:\n\n|                                                              Sine wave side wind                                                               |                                                                Random side wind                                                                |\n| :--------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------: |\n| \u003cimg src=\"https://user-images.githubusercontent.com/95032544/144069804-4770f193-6802-4f4f-baa3-f355a764ae1e.gif\" width=\"300px\" height=\"200px\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/95032544/144069981-e63dbaea-0acb-4cc1-b457-ee1bd068672f.gif\" width=\"300px\" height=\"200px\"\u003e |\n\n# How to Use\n\nSimply import environments from 'unstable_gym'. For examples, for [inverted pendulum](https://github.com/ktk1501/unstable_gym/blob/master/unstable_pendulum.py):\n\n```python\nfrom unstable_gym.unstable_pendulum import UnstablePendulumEnv\nenv = UnstablePendulumEnv(wind_type=\"sine\", max_wind=1.0)\n\nobs = env.reset()\nfor step in range(500):\n    action = env.action_space.sample()\n    nobs, reward, done, info = env.step(action)\n    env.render()\n```\nFor [cartpole](https://github.com/ktk1501/unstable_gym/blob/master/unstable_cartpole_cont.py):\n\n```python\nfrom unstable_gym.unstable_cartpole_cont import UnstableCartPoleContEnv\nenv = UnstableCartPoleContEnv(wind_type=\"sine\", max_wind=1.0)\n\nfor ep in range(10):\n    obs = env.reset()\n    for step in range(1000):\n        action = env.action_space.sample()\n        nobs, reward, done, info = env.step(action)\n        env.render()\n        if done:\n            break\n```\nThere are two options for \"wind type\":\n\n1.  **\"sine\"** : sine wave side wind\n2.  **\"random\"** : random side wind\n\nYou can also adjust the magnitude of the side wind (in [N]): \"max_wind\"\n\n# Related Works\n\nYou can test the robustness of [MPPI](https://github.com/UM-ARM-Lab/pytorch_mppi) and [Smooth_MPPI](https://github.com/ktk1501/smooth-mppi-pytorch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkkim-robot%2Funstable_gym","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkkim-robot%2Funstable_gym","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkkim-robot%2Funstable_gym/lists"}