OpenAI Gym Mountain Car Continuous Sample
A car is on a one-dimensional track, positioned between two "mountains". The goal is to drive up the mountain on the right; however, the car's engine is not strong enough to scale the mountain in a single pass. Therefore, the only way to succeed is to drive back and forth to build up momentum. Here, the reward is greater if you spend less energy to reach the goal.
If you're using the web interface, please follow the quick start guide.
LOCAL (CLI) GUIDE
- Install the Bonsai CLI by following our detailed CLI installation guide
CREATE YOUR BRAIN
- Setup your BRAIN's local project folder.
bonsai create <your_brain>
- Run this command to install additional requirements for training your BRAIN.
pip install -r requirements.txt
HOW TO TRAIN YOUR BRAIN
- Upload Inkling and simulation files to the Bonsai server with one command.
- Run this command to start training mode for your BRAIN.
bonsai train startIf you want to run this remotely on the Bonsai server use the
bonsai train start --remote
- Connect the OpenAI Gym simulator for training. Use the
--headlessoption to hide the graphical output.
python mountaincar_continuous_simulator.py --headless
- When training has hit a sufficient accuracy for prediction, about 90 for at least 100 episodes, stop training your BRAIN.
bonsai train stop
- Run the simulator using predictions from your BRAIN. You can now see AI playing the game!
python mountaincar_continuous_simulator.py --predict