Using libRetro as a learning enviroment

Hi Everyone,

Proceeding work done by Google DeepMind, in which an algorithm has learned how to play Atari games by trial and error, I’m trying to expand the learning environment such that the algorithm may experiment in games from other platforms.

Currently I’m mainly focusing on the SNES, when I came across libRetro it seems perfect for this goal. More specifically, I’m trying to take the Arcade Learning environment, remove Stella (Atari emulator) from it, and replace it with libRetro.

Going through the documentation and API, I’m still not sure where to begin doing so. Do I need to implement the function in the API, or do I simply call them as they are implemented in the cores?

Thanks in Advance for your help, Nadav

I’m far from the best guy to talk to about this, but the way it works is that libretro sits between the frontend (in your case, it’s going to be the Arcade Learning Environment) and the emulator’s own internal API. So, using libretro-stella as a sort of rosetta stone, you should be able to see which libretro API functions were hooked up to which Stella functions and then replace them in the ALE.

For better, more specific info, hop on Freenode IRC and come to #libretro and/or #retroarch.

Thanks for you help.

Is there anywhere an example of how to use the API from the front end developer side? Diving into the RetroArc code is rather difficult and a bit of an overkill for figuring out how to use the API.

Perhaps a simpler frontend develiped previously?

There are a few frontends available. Alcaro’s Minir, letoram’s ArcanFE, Unity-based EmuVR and EMUNITY, the as-yet-unreleased “Phoenix”, maybe some others I’m not remembering offhand.

You might also try looking waaaaay back in RetroArch’s git history (sometime in 2012, maybe…? v0.9.x should be tagged in github). Everything still functioned the same back then but it was much more barebones.