windows : tensorflow=2.13.0
ubuntu 18.04 : tensorflow=2.13.1
First git clone
git clone https://github.com/gordanLiang/highway-environment-NN-model-training.git
cd to file
cd highway-environment-NN-model-training
Using conda environment python==3.8
conda create -n <env name> python=3.8
activate environment
conda activate <env name>
intstall requirements with
pip install -r requirements.txt
Training dqn model using
python highway_dqn_train.py
Testing dqn model using
python highway_dqn_test.py
It will give 10 score each test 10 rounds and collect reward.
Load model and generate dataset in highway environment by using
python dataset_making_each1w.py
It will generate total 50000 data for each action 10000 data
Before generating dataset, we can use it to train the NN model and test it in highway environment.
Training the NN model using
python NN_model_train.py
Testing in highway environment
python NN_model_test.py
This is the same way tesing dqn model so can compare.
DQN 10 reward
[212, 160, 229, 227, 207, 235, 227, 219, 171, 230]
average:211.7
NN model 10 reward
[229, 227, 222, 214, 189, 241, 212, 194, 222, 198]
average:214.8
highway envirenment:https://github.com/Farama-Foundation/HighwayEnv
stable baseline 3:https://github.com/DLR-RM/stable-baselines3