Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.

JulienHansen/Car-racing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Car-racing

Repo for solving car-racing gymnasium environment through Reinforcement learning.

Question 2 : External library algorithm

Training

In order to start the training of a model presented in the report, you can use the command

python src/sb3/interface.py \   
    --model "ppo" \             # "ppo" | "ddp" | "sac"
    --timesteps 7500 \          # number of timesteps used for training
    --eval_freq 2500 \          # frequence at which the model is evaluated
    --eval_episode 20           # number of episode on which the model is evaluated

The three last parameters are optional. As for the model, the accepted values are "ppo", "ddpg" and "sac"

  • Starting PPO
python src/sb3/interface.py --model "ppo"
  • Starting DDPG
python src/sb3/interface.py --model "ddpg"
  • Starting SAC
python src/sb3/interface.py --model "sac"

Evaluation

  • Evaluating PPO
python src/interface.py --model "ppo" -sb
  • Evaluating DDPG
python src/interface.py --model "ddpg" -sb
  • Evaluating SAC
python src/interface.py --model "sac" -sb

Question 3 : Personal algorithm

Training

  • Training DDPG
python src/algo/ddpg.py --config cfg_agent/cfg_ddpg.yaml
  • Training PPO
python src/algo/ppo.py --config cfg_agent/cfg_ppo.yaml
  • Training Beta PPO
python src/algo/beta_ppo.py --config cfg_agent/cfg_ppo.yaml

Evalulation

  • Evaluating PPO
python src/interface.py --model "ppo" 
  • Evaluating PPO with beta distribution
python src/interface.py --model "beta_ppo" 
  • Evaluating DDPG
python src/interface.py --model "ddpg" 

About

Repo for solving car-racing gymnasium environment through Reinforcement learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages