Farama-Foundation / Arcade-Learning-Environment

The Arcade Learning Environment (ALE) -- a platform for AI research.
GNU General Public License v2.0
2.12k stars 420 forks source link

ALE Namespace wrapper for emucore #445

Closed tuero closed 2 years ago

tuero commented 2 years ago

The emucore code has naked class definitions such as Device, which makes it difficult to link with other libraries. One example of this is libtorch C++. This pull request wraps the code in emucore inside the ale namespace. The resulting effect is that this change allows to link against libtorch (which also defined a Device) without any linking errors.

tuero commented 2 years ago

@JesseFarebro Thanks for the suggestion! I've updated emucore to be under the ale::stella namespace. As a result, all references to any classes in emucore also need to reference the stella namespace (everything is already under ale but not stella).

Unfortunately, although these changes are minor, a lot of files are touched as a result. I've broken it up into several commits grouped so that the pull request review is easier to follow. Since all commits are needed without breaking anything, I would suggest squashing them before this pull request gets merged

JesseFarebro commented 2 years ago

@tuero sorry for the delay, I will be getting around to this. Thanks for making these changes, I just need to dedicate some time to look everything over before the next release. This will coincide with the release of Gym 0.22.

JesseFarebro commented 2 years ago

Thanks for the contribution @tuero!