Title: My Building Autonomous Agents With gym-retro talk
Slug: my-building-autonomous-agents-with-gym-retro-talk
Date: 2018-11-06 20:15:00
Author: Kartones
Lang: en
Tags: Development, Python, AI & ML, Game Dev
og_image: https://images.kartones.net/slides/028/cover.jpg
Description: My talk on building autonomous agents with gym-retro, presented at the 10th edition of The MindCamp event, including the source code and demos.


Few weeks ago the 10th edition of [The MindCamp event](http://www.themindcamp.net/) took place. With 20 attendants (a third less than past editions, as the date was chosen with not much margin and some people couldn't assist), as usual the talks were great, the people better and we spent a nice weekend at a rural house talking, eating and even doing some coding.

As almost every edition, I prepared a talk, but this year I wanted something different, if possible related with videogames. I was thinking on talking about [Microsoft's TextWorld](https://www.microsoft.com/en-us/research/project/textworld/), but instead tried something cooler, [gym-retro](https://blog.openai.com/gym-retro/), and decided to give an introductory talk to reinforced learning.

The whole talk is uploaded here: [https://slides.kartones.net/028.html](https://slides.kartones.net/028.html) but what's more interesting is that I uploaded to [my GitHub](https://github.com/Kartones/mindcamp-x-gym-retro) all the source code of the agents and miscellaneous instructions and tips I gathered while preparing the talk and the demos. Initially I planned to write all the details in this blog post, but then decided to improve instead the GH repository's README (not too much, but some quick tips to get started).

Don't expect anything incredible as I didn't used Deep Learning, so the agents are quite dumb, but the concept of the [JERK agent](https://github.com/openai/retro-baselines/blob/master/agents/jerk_agent.py) is still interesting enough and adapting it from the Sonic videogame to Golden Axe (including the LUA script) was a fun mini-experiment.

Here are some animated GIFs of some of the agents, if you feel curious check the slides and the code, it's not rocket science :)

![Alleway Gameboy](https://images.kartones.net/posts/screenshots/rl_alleway_optimized.gif)


![Smash TV NES](https://images.kartones.net/posts/screenshots/rl_smashtv_optimized.gif)


![Golden Axe MegaDrive/Genesis](https://images.kartones.net/posts/screenshots/rl_golden_axe_optimized.gif)
