School project teaches RL to recommend movies, actually ships code
A PyTorch toolkit that applies DDPG, TD3, and SAC to recommendation problems with dynamically generated embeddings.

What it does RecNN is a PyTorch 1.7 library for reinforcement learning in recommendation systems, built around the MovieLens 20M dataset. It implements actor-critic algorithms (DDPG, TD3, SAC) and a REINFORCE variant with off-policy correction, letting you train recommenders that learn from sequential user interactions rather than static ratings matrices.
The interesting bit The author treats this as a school project, which explains both the ambition and the rough edges. The genuinely unusual piece is the “dynamically generated item embeddings” pipeline: instead of pre-computed vectors, you can feed raw item metadata through BERT (or a DQN-based generator) to produce latent representations on the fly, including for items never seen during training. That’s useful when your catalog changes constantly.
Key highlights
- Modular abstraction: import full algorithms, mix-and-match networks and learners, or build from scratch
- Sequential and “frame” environment abstractions for handling user history of variable or fixed length
- State representation module with LSTM/RNN/GRU options (some marked WIP)
- Parallel data loading via Modin (Dask/Ray) with caching
- Streamlit demo where rating movies visibly shrinks the Euclidean distance between your profile and recommendations
- Colab notebooks and Medium articles walking through DDPG and REINFORCE implementations
Caveats
- Several algorithms listed (BCQ, full sequential “seq” environment, some RNN variants) are marked “to be released” or “WIP”
- PyPI package doesn’t exist yet; install from git only
- The README admits “there is no exploration, since we are working with a dataset” — this is offline RL, not truly online
Verdict Worth a look if you’re researching RL for recommender systems and want working PyTorch implementations with educational walkthroughs. Skip if you need production-grade, maintained tooling or a pip-installable package.