This repository contains the code to reproduce the experiments of the paper "Time-Constrained Recommendations: Reinforcement Learning Strategies for E-Commerce".
To create a virtual environment before installing, you can use the command:
conda create -n rl_env python=3.11
conda activate rl_env
pip install -r requirements.txtDownload the datasets using the instructions given in this link and copy the dataset files to the data directory.
For running the experiments, navigate to the src directory.
cd srcTo run the training and evaluation of baseline Personalized Re-Ranking model on Alibaba's Re-Ranking dataset, use the following command:
python main.pyMake sure to set the correct hyper-parameters in the Config class in main.py file.
Reinforcement Learning based simulations (SARSA and Q-Learning) can be done by using the following command:
python simulation.pyMake sure to set the correct hyper-parameters and initial parameter ranges for the experiments in simulation.py file.
If you use this codebase in academic work, please cite:
@misc{chakrabarty2025timeconstrainedrecommendationsreinforcementlearning,
title={Time-Constrained Recommendations: Reinforcement Learning Strategies for E-Commerce},
author={Sayak Chakrabarty and Souradip Pal},
year={2025},
eprint={2512.13726},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2512.13726}
}
Read the LICENSE file.