Thursday, November 10, 2016

MarI/O - Machine Learning for Video Games

For everybody who want's to get started with the concepts of machine learning in a fun way... As far as I get it, the basic idea to mimic evolutionary or learning based on experience.

A computer player in this scenario basically needs:

  1. Senses like sight: Abstracting the actual screen to individual items like save ground, blocks/walls, gaps, enemies. Fortunately platforming games like Mario support abstraction really well as sprites can be though of as blocks of the above mentioned types
  2. The ability to push buttons on the controller: Well there are APIs for that, right ;-)
  3. Knowing what success means: e.g. advancing to the right side of the level without getting killed in the shortest amount of time
  4. Patience, Endurance or the ability to massively parallelize the process of trying, trying, trying... as you are basically brute forcing every combination of button presses. But fortunately when you are failing you will have a sense of how successful you were based on how far you got in the level and how quickly you got there. Then you can take that as a starting point for further tries... or the next generation when shifting to evolutionary terms...
Worth a read is this paper which explains it much better than I tried (maybe my children will be more successful in explaining ;-)

And while we are at it... here goes Mario Kart