Using RL4J for Reinforcement Learning

Reinforcement learning is a goal-oriented machine learning algorithm that trains an agent to make a sequence of decisions. In the case of deep learning models, we train them on existing data and apply the learning on new or unseen data. Reinforcement learning exhibits dynamic learning by adjusting its own actions based on continuous feedback in order to maximize the reward. We can introduce deep learning into a reinforcement learning system, which is known as deep reinforcement learning.

RL4J is a reinforcement learning framework integrated with DL4J. RL4J supports two reinforcement algorithms: deep Q-learning and A3C (short for Asynchronous Actor-Critic Agents). Q-learning is an off-policy reinforcement learning algorithm that seeks the best action for the given state. It learns from actions outside the ones mentioned in the current policy by taking random actions. In deep Q-learning, we use a deep neural network to find the optimal Q-value rather than value iteration in regular Q-learning. In this chapter, we will set up a gaming environment powered by reinforcement learning using Project Malmo. Project Malmo is a platform for reinforcement learning experiments built on top of Minecraft.

In this chapter, we will cover the following recipes:

  • Setting up the Malmo environment and respective dependencies
  • Setting up the data requirements
  • Configuring and training a Deep Q-Network (DQN) agent
  • Evaluating a Malmo agent

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset