Getting ready

As a prerequisite, we will need to persist the agent policies and reload them back during evaluation.

The final policy (policy to make movements in Malmo space) used by the agent after training can be saved as shown here:

DQNPolicy<MalmoBox> pol = dql.getPolicy();
pol.save("cliffwalk_pixel.policy");

dql refers to the DQN model. We retrieve the final policies and store them as a DQNPolicy. A DQN policy provides actions that have the highest Q-value estimated by the model. 

It can be restored later for evaluation/inference:

DQNPolicy<MalmoBox> pol = DQNPolicy.load("cliffwalk_pixel.policy");
..................Content has been hidden....................

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