How do I use this repo?
- User
How do I use this repo?
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
How do I use this repo?
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
To use the openrct2_gym repository, follow these steps:
The repository provides a custom environment for training reinforcement learning (RL) agents to design roller coasters in OpenRCT2. It uses the Gymnasium framework and Stable-Baselines3's PPO algorithm for training. The environment interacts with the OpenRCT2 game by simulating UI interactions.
Before running the code, ensure you have the following setup:
pyautogui support; specifically X-server, not Wayland)Install the required Python packages by running:
pip install -r requirements.txt
Alternatively, if requirements.txt is not provided, install the dependencies directly from setup.py:
pip install gymnasium numpy pyautogui pillow stable-baselines3
⚠️ Note: The current implementation relies on fragile UI automation and is limited to the Wooden Coaster type.
To train the RL agent, run the train_rl_agent.py script. You can customize the training parameters using arguments. For example:
python train_rl_agent.py --timesteps 200000 --checkpoint-freq 10000 --eval-freq 10000
--timesteps: Total number of training timesteps (default: 200,000).--checkpoint-freq: Frequency of saving model checkpoints (default: 10,000 timesteps).--eval-freq: Frequency of evaluating the model during training (default: 10,000 timesteps).--model-path: Path to a saved model to continue training.The training process will:
OpenRCT2-v0).logs/ directory.logs/final_model.To test a trained model on the environment, use run_model.py:
python run_model.py
This script will:
ppo_openrct2).If you want to test the environment by taking random actions or using predefined actions, use test.py:
python test.py
--example: Provides a predefined ride (a small hill with a chain lift and return to start).The script will:
Here’s what the main files do:
| File | Description |
|---|---|
README.md | Provides an overview of the project and instructions for setup and running the code. |
setup.py | Defines the Python package and dependencies for the project. |
train_rl_agent.py | Script to train the RL agent using PPO. |
run_model.py | Script to load and run a trained model on the environment. |
test.py | Script to test the environment by taking random actions or using a predefined ride. |
Slow Training:
pyautogui) to interact with the game, which is fragile and slow.Game Feedback:
Future Improvements:
OpenRCT2-v0 environment is correctly registered and accessible in the openrct2_gym package.pip install -r requirements.txt
python train_rl_agent.py --timesteps 100000 --checkpoint-freq 5000 --eval-freq 5000
python run_model.py
python test.py
Let me know if you have any further questions or need clarification! 🚀