Skip to content

A pytorch implementation of A Model-Based Reinforcement Learning with Adversarial Training for Online Recommendation.

Notifications You must be signed in to change notification settings

XueyingBai/Model-Based-Reinforcement-Learning-for-Online-Recommendation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 

Repository files navigation

Model-Based-Reinforcement-Learning-for-Online-Recommendation

A pytorch implementation of Model-Based Reinforcement Learning with Adversarial Training for Online Recommendation (https://arxiv.org/pdf/1911.03845.pdf).

Usage:

In the directory of IRecGAN, type command:

python main.py --click ../simulation_task1/gen_click.txt --reward ../simulation_task1/gen_reward.txt --action ../simulation_task1/gen_action.txt --model LSTM --nhid 128 --n_layers_usr 2 --optim_nll adam --optim_adv adam --batch_size 128

The variable 'interact' in main.py enables online training and evaluation with the environment in ./simulation_task1. However, many routes in ./simulation_task1 have to be changed.

./simulation_task1 contains a simulated environment(different from paper) and offline data can be generated by:

python Generate_data.py

Pytorch version: 1.1.0

Notice: write for fun and double-checking. Not the implementation in the paper. Please refer to the link in the paper for its implementation.

About

A pytorch implementation of A Model-Based Reinforcement Learning with Adversarial Training for Online Recommendation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages