Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlenon7/cartpole_gym_env
🤸 Gym environment solving the CartPole problem using Continuous Q-Learning.
https://github.com/jlenon7/cartpole_gym_env
Last synced: 9 days ago
JSON representation
🤸 Gym environment solving the CartPole problem using Continuous Q-Learning.
- Host: GitHub
- URL: https://github.com/jlenon7/cartpole_gym_env
- Owner: jlenon7
- License: mit
- Created: 2024-06-22T18:59:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-28T13:25:25.000Z (5 months ago)
- Last Synced: 2024-12-06T07:46:55.265Z (17 days ago)
- Language: Python
- Size: 1.13 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenAI Cart Pole Gym Environment 🤸
> Gym environment solving the Cart Pole problem using Continuous Q-Learning.
## Results
> [!TIP]
> To train the model faster, comment the `env.render(mode='human')` call in `bin/agent.py` or change the `render_interval` variable as desired.### Epoch points log tracker
## TODOs
- [x] Train the agent using Continuous Q-Learning
- [ ] Train the agent using Deep Q-Learning
- [ ] Save the model to be reused with a library like [stable-baselines](https://stable-baselines3.readthedocs.io/en/master/)## Running
To run the gym environment first create a new Python environment and activate it. I'm using [Anaconda](https://www.anaconda.com/) for setting the python version that pipenv should use to set up the environment. The command bellow will automatically setup the environment with conda and pipenv:
```shell
make env
```Now install all the project dependencies:
```shell
make install-all
```To run the game to be played by a human run (use arrows <, >):
```shell
make play
```To run the game and run random actions run:
```shell
make sample
```To run the agent to complete the game task run:
```shell
make agent
```