ShangtongZhang / reinforcement-learning-an-introduction

Python Implementation of Reinforcement Learning: An Introduction
MIT License
13.54k stars 4.82k forks source link

Generalization to abstract classes for Environment/Agents? #141

Closed chicotobi closed 3 years ago

chicotobi commented 3 years ago

Hey, I just did the Coursera-Courses from Adam and Martha White. The code examples there made use of an abstract generic environment/agent framework. I have been thinking of replicating the figures (and exercises) from the book using such framework.

The advantage would be not only to accompany the examples from the book, but easily comparing algorithms across the chapters on several examples.

I know that there are other packages, e.g. gym, that already provide such abstraction, but I think there could still be some benefit for other students, especially because your package is referenced on Sutton's homepage.

What do you think? I guess you maybe already considered this?

ShangtongZhang commented 3 years ago

The principle when I wrote this repo is to make the script as simple as possible, e.g., each .py file should be self-contained.

chicotobi commented 3 years ago

Hey thanks for the answer, yeah, I can see where you come from, I am doing it now on my own.