Flying Squirrel

One flight-prone squirrel using ramps to maximize airtime. Also, acorns. And snakes! Watch out for the snakes.

About the Game

The goal of Flying Squirrel is to utilize momentum to traverse the hills as fast as possible. In a race against the clock, each level needs to be completed before time runs out in order to advance to the next level. To start, you only have one available action—to dive—which applies a downward force to the squirrel. To move as fast as possible, you should aim to dive so that you land on the downward part of the hill, continue to dive as you move downhill, and release at the bottom of the hill so that your momentum carries you uphill for maximum airtime. As you advance through the levels, gain additional special abilities and face new challenges (eg. snakes that need to be avoided).

The game uses imitation learning to train an AI to play the game (by learning to mimic your behavior). As you play, the game records data on features that summarize the current state of the game and your action (diving or not diving) at each state. Training an AI to mimic your behavior can then be thought of as a classification problem. For this game, k-nearest neighbors is used to train the AI. At each new state, the AI finds the k previous states that are most similar to the current state from the data collected on you. Your chosen action is then checked for each of these k states, and the AI chooses the action that was most commonly chosen by you.