Q Learning with the Frozen Lake Environment in Android

Q Learning is a Reinforcement Learning algorithm in which an agent performs a specific action and gets a reward for it. The goal of the agent is to maximize the reward. Most of us would have tried Q Learning with OpenAI’s Gym, a Python package which provides various environments for training RL agents.

Trying a different approach, I have implemented Q Learning in Kotlin ( which can be used in an Android app ) where our agent is trained in an environment identical to OpenAI Gym’s Frozen Lake Environment. The FrokenLakeEnv.kt class provides methods similar to OpenAI Gym, like step(), reset() and actionSpaceSample(). One can see the agent’s progress trying to reach its goal.

The detailed discussion on the project and also on some basics of Q Learning is included in the story,

https://heartbeat.fritz.ai/q-learning-with-the-frozen-lake-environment-in-android-937cf48dcc52

The GitHub project,

As a ML + Android developer, I consistently try to bring ML models into languages like Kotlin and Java so that edge devices can make use of them efficiently.

1 Like