Assignment 2 · MountainCar-v0
Deep Q-Network experiments
Compare DQN training choices and replay strategies. These runs use Python and are not executed in the browser.
Vanilla DQN baseline
Train a DQN agent with replay memory, a target network, and ε-greedy exploration. In MountainCar, the agent must build momentum by moving back and forth before reaching the hilltop.
python Vanilla_DQN.py --auto
Run from Q3_2_Vanilla_DQN_Implementation. The auto pipeline trains, then generates plots and videos.
Episode truncation
Compare episode limits of 200, 1,000, and 2,000 steps and inspect how truncation changes learning and completion rates.
python main.py --mode truncation
Run from the Q3_3Vanilla_DQN_Truncate folder.
Replay-factor and sensitivity studies
Run the Assignment 2 suite for replay-factor comparisons and hyperparameter sensitivity. The suite also includes prioritized experience replay (PER).
cd assignment2/Codes
python run_all.py --num_seeds 2
Use 2 seeds for a quick check; omit the flag for the full 15-seed runs.
Run Assignment 2 locally
Clone the repository, open a terminal in assignment2/Codes, create a Python environment, install requirements.txt, then run the command above. The scripts generate logs and plots locally; training can take time.
This tab is an experiment guide, not a hosted DQN runtime. The browser demo currently runs only the GridWorld policy explorer.