reset DinoSampling to advanced Every Visit
This commit is contained in:
parent
b0ca634b64
commit
3bdcbb39bc
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
@ -4,7 +4,7 @@ import core.RNG;
|
||||||
import core.algo.Method;
|
import core.algo.Method;
|
||||||
import core.controller.RLController;
|
import core.controller.RLController;
|
||||||
import evironment.jumpingDino.DinoAction;
|
import evironment.jumpingDino.DinoAction;
|
||||||
import evironment.jumpingDino.DinoWorld;
|
import evironment.jumpingDino.DinoWorldAdvanced;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -14,7 +14,7 @@ import java.nio.file.StandardOpenOption;
|
||||||
|
|
||||||
public class DinoSampling {
|
public class DinoSampling {
|
||||||
public static final float f =0.05f;
|
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) {
|
public static void main(String[] args) {
|
||||||
File file = new File(FILE_NAME);
|
File file = new File(FILE_NAME);
|
||||||
try {
|
try {
|
||||||
|
@ -22,18 +22,18 @@ public class DinoSampling {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
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 {
|
try {
|
||||||
Files.writeString(Path.of(file.getPath()), f + ",", StandardOpenOption.APPEND);
|
Files.writeString(Path.of(file.getPath()), f + ",", StandardOpenOption.APPEND);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
for(int i = 1; i <= 10; i++) {
|
for(int i = 1; i <= 100; i++) {
|
||||||
System.out.println("seed: " + i * 13);
|
System.out.println("seed: " + i * 13);
|
||||||
RNG.setSeed(i * 17);
|
RNG.setSeed(i * 13);
|
||||||
|
|
||||||
RLController<DinoAction> rl = new RLController<>(
|
RLController<DinoAction> rl = new RLController<>(
|
||||||
new DinoWorld(),
|
new DinoWorldAdvanced(),
|
||||||
Method.MC_CONTROL_EVERY_VISIT,
|
Method.MC_CONTROL_EVERY_VISIT,
|
||||||
DinoAction.values());
|
DinoAction.values());
|
||||||
rl.setDelay(0);
|
rl.setDelay(0);
|
||||||
|
|
Loading…
Reference in New Issue