thu-ml / tianshou

An elegant PyTorch deep reinforcement learning library.
https://tianshou.org
MIT License
7.76k stars 1.12k forks source link

Documentation for multi-agent needs fixing #1163

Open destin-v opened 2 months ago

destin-v commented 2 months ago

Description

The current documentation on the tic tac toe example found in the documentation does not work. This was tested on tianshou==1.0.0 and pettingzoo==1.24.3 which are the latest as of Jun 2024.

🐛 Errors

Some issues are related to the fact that the class names have changed or the arguments have changed. But even after fixing the names, it still throws errors.

self.train_collector.reset_stat()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'int' object has no attribute 'reset_stat'

🐛 PettingZoo Examples Broken

The Tianshou examples on PettingZoo also seem to be broken here, here, and here. These are likely related and should be fixed.

MischaPanch commented 1 month ago

Yes, some examples are quite outdated - they're the only part of the code that is still untested in CI. Thanks for reporting!

The plan for the next weeks is to introduce an script that runs all examples and reproduces the benchmark results that are now reported in the docs. Then all problematic scripts will be adjusted. Fortunately, with @maxhuettenrauch's last contributions we got rliable-style evaluations in tianshou, now we just need to adjust the example scripts.

However, I want to already mention that all MARL topics are deprioritized atm, so some examples might actually be dropped or marked as incomplete