Metadata-Version: 2.4
Name: datenwissenschaften
Version: 2.10.11
Summary: Core library for Retro Speedlab: A high-performance RL toolkit for classic games.
License-Expression: GPL-3.0-only
License-File: LICENSE
Keywords: reinforcement-learning,retro-gaming,stable-baselines3,stable-retro,ai,gymnasium
Author: datenwissenschaften
Author-email: martin.franke@datenwissenschaften.com
Requires-Python: >=3.12,<3.13
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: gymnasium (==1.3.0)
Requires-Dist: itsdangerous (==2.2.0)
Requires-Dist: loguru (==0.7.3)
Requires-Dist: numpy (==2.5.1)
Requires-Dist: opencv-python (==4.13.0.92)
Requires-Dist: pyyaml (==6.0.3)
Requires-Dist: redis (==6.4.0)
Requires-Dist: requests (==2.34.2)
Requires-Dist: sb3-contrib (==2.9.0)
Requires-Dist: stable-baselines3 (==2.9.0)
Requires-Dist: stable-retro (==1.0.1)
Requires-Dist: torch (==2.12.1)
Project-URL: Documentation, https://speedlab.datenwissenschaften.com/getting-started
Project-URL: Homepage, https://speedlab.datenwissenschaften.com
Project-URL: Repository, https://github.com/datenwissenschaften/datenwissenschaften
Description-Content-Type: text/markdown

# Retro Speedlab Library

**Reinforcement-learning engine for training recurrent agents on classic video games.**

[![Python 3.12](https://img.shields.io/badge/Python-3.12-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE)

The reusable reinforcement-learning engine behind
[Retro Speedlab](https://github.com/datenwissenschaften/retro-speedlab).

It combines **visual observations, emulator RAM, recurrent PPO, Random Network
Distillation (RND), vectorized environments, resumable training, replay capture,
and live telemetry** in a reproducible Python training system.

### Highlights

- Recurrent **CNN-LSTM PPO** for partially observable environments
- Multi-input policies combining **RGB frames and emulator RAM**
- Adaptive **Random Network Distillation (RND)** for sparse-reward exploration
- Parallel vectorized emulator environments
- Automatic worker selection, CUDA tuning, and CPU fallback
- Atomic, resumable checkpoints including exploration state
- `.bk2` episode recording
- Live Vue-based training telemetry
- Reusable abstractions for RAM, game states, rewards, and actions

> **Looking for game runners, end-to-end examples, and user-facing
> documentation?**
> Start with [Retro Speedlab](https://github.com/datenwissenschaften/retro-speedlab).

## Architecture

A training run combines game-specific definitions with reusable environment,
model, training, persistence, and monitoring components.

```text
                         Retro Speedlab
                              │
                    ┌─────────▼─────────┐
                    │  Game Definition  │
                    │                   │
                    │ RAM · Rewards ·   │
                    │ States · Actions  │
                    └─────────┬─────────┘
                              │
                    ┌─────────▼─────────┐
                    │ Vectorized Retro  │
                    │   Environments    │
                    └─────────┬─────────┘
                              │
                 ┌────────────┴────────────┐
                 │                         │
             RGB Frames                 RAM State
                 │                         │
             CNN Encoder                 Encoder
                 │                         │
                 └────────────┬────────────┘
                              │
                             LSTM
                              │
                    ┌─────────▼─────────┐
                    │  Recurrent PPO    │
                    │      + RND        │
                    └─────────┬─────────┘
                              │
               ┌──────────────┼──────────────┐
               │              │              │
          Checkpoints      Replays       Telemetry
                                             │
                                     ┌───────▼────────┐
                                     │ Live Dashboard │
                                     └────────────────┘

