This repository is the official implementation of "Adaptive Contention Window Design using Deep Q-learning".
To install requirements:
docker pull pytorch/pytorch
📋 (Optional) Install NS3 to generate new simulation dataset. Dataset used in the paper for training is provided in the Dataset directory.
To train the model(s) in the paper, run this command:
python trainRL.py --n 10 --ps 1 --transitionModel Markovian --history 0
n: wireless network size; {5,10,20}
ps: transition probability of stochastic process; {0.75,0.9,1}
transitionModel: stochastic model followed by other nodes; {'Markovian', 'NonMarkovian'} (Here 'NonMarkovian' corresponds to the 'complex' process in the paper.)
history: number of previous time steps from which observations are used as input; {0,1,2,3}
To evaluate the model, run:
python eval.py --n 10 --ps 1 --transitionModel Markovian --history 0
📋 Pretrained models are present in modelRL directory.