add dino jumping environment, deterministic/reproducable behaviour and save-and-load feature
- add feature to save and load learning progress (Q-Table) and current episode count - episode end is now purely decided by environment instead of monte carlo algo capping it on 10 actions - using linkedHashMap on all locations to ensure deterministic behaviour - fixed major RNG issue to reproduce algorithmic behaviour - clearing rewardHistory, to only save the last 10k rewards - added google dino jump environment
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package example;
|
||||
|
||||
import core.RNG;
|
||||
import core.algo.Method;
|
||||
import core.controller.RLController;
|
||||
import evironment.jumpingDino.DinoAction;
|
||||
import evironment.jumpingDino.DinoWorld;
|
||||
|
||||
public class JumpingDino {
|
||||
public static void main(String[] args) {
|
||||
RNG.setSeed(55);
|
||||
|
||||
RLController<DinoAction> rl = new RLController<DinoAction>()
|
||||
.setEnvironment(new DinoWorld())
|
||||
.setAllowedActions(DinoAction.values())
|
||||
.setMethod(Method.MC_ONPOLICY_EGREEDY)
|
||||
.setDiscountFactor(1f)
|
||||
.setEpsilon(0.15f)
|
||||
.setDelay(200)
|
||||
.setEpisodes(100000);
|
||||
rl.start();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user