Technical requirements

The source code for this chapter can be found here:
https://github.com/PacktPublishing/Java-Deep-Learning-Cookbook/blob/master/09_Using_RL4J_for_Reinforcement%20learning/sourceCode/cookbookapp/src/main/java/MalmoExample.java.

After cloning our GitHub repository, navigate to the Java-Deep-Learning-Cookbook/09_Using_RL4J_for_Reinforcement learning/sourceCode directory. Then, import the cookbookapp project as a Maven project by importing pom.xml.

You need to set up a Malmo client to run the source code. First, download the latest Project Malmo release as per your OS (https://github.com/Microsoft/malmo/releases):

To launch the Minecraft client, navigate to the Minecraft directory and run the client script:

  • Double-click on launchClient.bat (on Windows).
  • Run ./launchClient.sh on the console (either on Linux or macOS). 

If you're in Windows and are facing issues while launching the client, you can download the dependency walker here: https://lucasg.github.io/Dependencies/.

Then, follow these steps:

  1. Extract and run DependenciesGui.exe.
  2. Select MalmoJava.dll in the Java_Examples directory to see the missing dependencies like the ones shown here:

In the case of any issues, the missing dependencies will be marked on the list. You will need to add the missing dependencies in order to relaunch the client successfully. Any missing libraries/files should be present in the PATH environment variable.

You may refer to OS-specific build instructions here:

If everything goes well, you should see something like this:

Additionally, you need to create a mission schema to build blocks for the gaming window. The complete mission schema can be found in this chapter's project directory at https://github.com/PacktPublishing/Java-Deep-Learning-Cookbook/blob/master/09_Using_RL4J_for_Reinforcement%20learning/sourceCode/cookbookapp/src/main/resources/cliff_walking_rl4j.xml.

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

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