change RL-Controller initialization process and action space iterable
- no fake builder pattern anymore, moved needed fields into constructor - add serializeUID - action space extends iterable interface to simplify looping over all actions (and not returning the actual list)
This commit is contained in:
@@ -10,14 +10,16 @@ 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);
|
||||
RLController<DinoAction> rl = new RLController<>(
|
||||
new DinoWorld(),
|
||||
Method.MC_ONPOLICY_EGREEDY,
|
||||
DinoAction.values());
|
||||
|
||||
rl.setDelay(200);
|
||||
rl.setDiscountFactor(1f);
|
||||
rl.setEpsilon(0.15f);
|
||||
rl.setEpisodes(5000);
|
||||
|
||||
rl.start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user