reset DinoSampling to advanced Every Visit

This commit is contained in:
Jan Löwenstrom 2020-04-02 18:45:36 +02:00
parent b0ca634b64
commit 3bdcbb39bc
2 changed files with 6 additions and 6 deletions

View File

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -4,7 +4,7 @@ import core.RNG;
import core.algo.Method;
import core.controller.RLController;
import evironment.jumpingDino.DinoAction;
import evironment.jumpingDino.DinoWorld;
import evironment.jumpingDino.DinoWorldAdvanced;
import java.io.File;
import java.io.IOException;
@ -14,7 +14,7 @@ import java.nio.file.StandardOpenOption;
public class DinoSampling {
public static final float f =0.05f;
public static final String FILE_NAME = "convergence.txt";
public static final String FILE_NAME = "advancedEveryVisit.txt";
public static void main(String[] args) {
File file = new File(FILE_NAME);
try {
@ -22,18 +22,18 @@ public class DinoSampling {
} catch (IOException e) {
e.printStackTrace();
}
for(float f = 0.06f; f <= 1.003; f += 0.05f) {
for(float f = 0.05f; f <= 1.003; f += 0.05f) {
try {
Files.writeString(Path.of(file.getPath()), f + ",", StandardOpenOption.APPEND);
} catch (IOException e) {
e.printStackTrace();
}
for(int i = 1; i <= 10; i++) {
for(int i = 1; i <= 100; i++) {
System.out.println("seed: " + i * 13);
RNG.setSeed(i * 17);
RNG.setSeed(i * 13);
RLController<DinoAction> rl = new RLController<>(
new DinoWorld(),
new DinoWorldAdvanced(),
Method.MC_CONTROL_EVERY_VISIT,
DinoAction.values());
rl.setDelay(0);