Posts

OCR in Qwoppy

Reinforcement Learning Qwoppy is based on reinforcement learning. That means the agent chooses an action based on an input, and then gets some feedback to indicate whether the action was good or bad. In particular Qwoppy is a model-free agent. Qwop is an HTML5 game which means I could look at the Javascript source code and use the physics calculations to derive a model, but where's the fun in that? Qwoppy is model-free, all the agent will have as input is the current score. But how do we get the score? YouTube mad scientist Suckerpinch  whose  Mario-playing AI  inspired this project allowed his code direct access to the memory (not to make it sound like he took an easy route, since he actually runs the agent in a modified Mario NES cartridge). For this project I decided to use OCR. OCR I originally tried to avoid implementing the OCR myself because the goal of the project was to teach myself about reinforcement learning. I started using Tesseract with Python bindings but ...

Introducing Qwoppy

Introduction Qwoppy is a project I started a few months ago to teach myself about reinforcement learning, something that was missing from my data science course. For those who don't know, Qwop  is an HTML5 (formerly Flash) game in which the player controls an olympic sprinter during the 100m dash. But there's a catch - the player has to control the upper and lower half of each leg individually using the keys Q, W, O and P. Complicating matters is the fact that Qwop apparently generates enough force with each leg to perform a somersault with minimal/unintentional effort. When we played this game during lunch breaks at school, nobody could get past around 20 metres, and the only way anyone got even that far was by a "trick" involving mashing the keys W+O followed by Q+P repeatedly so that Qwop will inch forwards, dragging one knee across the racetrack. When the player manages to make him run like a real human - and I've only ever done it by fluke - a triumphant scor...