From 4641f50b791f0dd0876b862890cb9f6458e23248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20L=C3=B6wenstrom?= Date: Thu, 5 Mar 2020 13:17:54 +0100 Subject: [PATCH] add results for convergence for advanced dino jumping --- convResAdvScale.png | Bin 0 -> 8067 bytes convResultAdv.png | Bin 0 -> 8856 bytes Rplot.png => convResultSimple.png | Bin convergenceAdv.txt | 20 +++++++++++++++ epsilonValues.R | 6 +++++ src/main/java/core/algo/EpisodicLearning.java | 2 +- .../evironment/jumpingDino/DinoWorld.java | 3 +++ .../jumpingDino/DinoWorldAdvanced.java | 23 ++++++++++++++++-- src/main/java/example/DinoSampling.java | 7 +++--- src/main/java/example/JumpingDino.java | 5 ++-- 10 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 convResAdvScale.png create mode 100644 convResultAdv.png rename Rplot.png => convResultSimple.png (100%) create mode 100644 convergenceAdv.txt create mode 100644 epsilonValues.R diff --git a/convResAdvScale.png b/convResAdvScale.png new file mode 100644 index 0000000000000000000000000000000000000000..7cce6c51d09d1e1127dff7eaf6a64420f245f168 GIT binary patch literal 8067 zcmeHscT`i^+wQSD>d2r5P(d9mNI(%mda)1zX$p}LS_C8kX+}DsSpW$tP3edt5JQy~ z5CU<)fYOUd2>}Tu(h><$LV$cH%x~s;zx(gE?mzctt-a39-urFO`@DPalSE!O*8P3g zpS+o;~ zWBOAwOF#L;0E2Pm?LihyhmM~IHpxQfA)78rg3Vq;8PIECYzHEfRe@vjQHOyOEBOC( z(AX`Z9|K`P3?qw?yU!5|oI6Mnqh-HOOt&0FHoVe@0ZrVeq`{iBz0(oDQ}mG9pMn3mPls3Uu@JHs3vJ+TmL6dN82* zfNBHyXo>|b3tFU@dOl*Qh&JsWE?8Oktayy&=*thVpg9zi9gG{}tpuxY%A-#mXQ>rh zenxfs?shj74!w8tN%C%lA=F0;_pQ?ZuC+Mu-K!HZ=reRf390G3iU5}cFqsfv&0;25 z1-MRB-Cko!ulZ;x4mfSZ32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XPGyF1%?^Oj7rV${7!d*|Eqd?St^h}h`7yVJ3!5P68F7k-?dv)qhF}5H(Hj9aIl!vP>M{1(fh6%yU zeQ#(kuq6r{7;i?wpzX>3o@z*1dKTc*j4ri@#UnAG+bS(ef~f}<_ET~e^H);YVRL*du0<@6@1fVL zu=^B4F$d3(f2%?tb7Nk2aCb<-HIO{8nc|OPNYRPR(VB<2=}oK)3h(X$@1|OsOzE_5 z_nWlu`;f^@kgV|ag3>n4o|~A!;H&1^5sO)YB0?rDKjx3ocwDk`&ql2-k4#yYpd5Hl zKei<C#-Kl>iAC9nRGgc^dpNVvIEubvKf)&u8^m21g`myof8}P&GDq zDnfuPL|^Z8GVJ>eZq_*>|N7~qu}-0jE{|K*+h^lMri3SCL-R}kj~dm7$ZRC+hHI?V zbkrDMyK{0e)HYpP%j4G=4TKCGo(3i}?oU!4OcMlXe#PYlMSRiYd%(MUmBaT;p-~ih q5;4b-uE!aQ(y{+Nk39&D_p4x^`K?!evh;+>NmKJ extends Learning imple if(timestampCurrentEpisode > 300000){ converged = true; // t - File file = new File("convergence.txt"); + File file = new File("convergenceAdv.txt"); try { Files.writeString(Path.of(file.getPath()), currentEpisode/2 + ",", StandardOpenOption.APPEND); } catch (IOException e) { diff --git a/src/main/java/evironment/jumpingDino/DinoWorld.java b/src/main/java/evironment/jumpingDino/DinoWorld.java index 9c18bd9..9d28277 100644 --- a/src/main/java/evironment/jumpingDino/DinoWorld.java +++ b/src/main/java/evironment/jumpingDino/DinoWorld.java @@ -10,6 +10,9 @@ import lombok.Getter; import javax.swing.*; import java.awt.*; +/** + * 57 states + */ @Getter public class DinoWorld implements Environment, Visualizable { protected Dino dino; diff --git a/src/main/java/evironment/jumpingDino/DinoWorldAdvanced.java b/src/main/java/evironment/jumpingDino/DinoWorldAdvanced.java index 7513ff0..8009795 100644 --- a/src/main/java/evironment/jumpingDino/DinoWorldAdvanced.java +++ b/src/main/java/evironment/jumpingDino/DinoWorldAdvanced.java @@ -1,9 +1,19 @@ package evironment.jumpingDino; +import core.RNG; import core.State; import java.awt.*; +/** + * 3580 states + * if: + * dx = -(int)((Math.random() + 0.5) * Config.OBSTACLE_SPEED); + * xSpawn = Config.FRAME_WIDTH + Config.FRAME_WIDTH + Config.OBSTACLE_SIZE; + * + * 350 states + * if 4 speed variants + */ public class DinoWorldAdvanced extends DinoWorld{ public DinoWorldAdvanced(){ super(); @@ -18,9 +28,18 @@ public class DinoWorldAdvanced extends DinoWorld{ protected void spawnNewObstacle() { int dx; int xSpawn; - dx = -(int)((Math.random() + 0.5) * Config.OBSTACLE_SPEED); + double ran = RNG.getRandom().nextDouble(); + if(ran < 0.25){ + dx = -(int)(0.7 * Config.OBSTACLE_SPEED); + }else if(ran < 0.5){ + dx = -(int)(1.3 * Config.OBSTACLE_SPEED); + }else if(ran < 0.75){ + dx = -(int)(1.6 * Config.OBSTACLE_SPEED); + } else{ + dx = -2 * Config.OBSTACLE_SPEED; + } // randomly spawning more right outside of the screen - xSpawn = (int)(Math.random() + 0.5 * Config.FRAME_WIDTH + Config.FRAME_WIDTH + Config.OBSTACLE_SIZE); + xSpawn = Config.FRAME_WIDTH + Config.FRAME_WIDTH + Config.OBSTACLE_SIZE; currentObstacle = new Obstacle(Config.OBSTACLE_SIZE, xSpawn, Config.FRAME_HEIGHT - Config.GROUND_Y - Config.OBSTACLE_SIZE, dx, 0, Color.BLACK); } } diff --git a/src/main/java/example/DinoSampling.java b/src/main/java/example/DinoSampling.java index 38c03ff..03ed20c 100644 --- a/src/main/java/example/DinoSampling.java +++ b/src/main/java/example/DinoSampling.java @@ -5,6 +5,7 @@ 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 +15,7 @@ import java.nio.file.StandardOpenOption; public class DinoSampling { public static void main(String[] args) { - File file = new File("convergence.txt"); + File file = new File("convergenceAdv.txt"); for(float f = 0.05f; f <=1.003 ; f+=0.05f){ try { Files.writeString(Path.of(file.getPath()), f + ",", StandardOpenOption.APPEND); @@ -26,14 +27,14 @@ public class DinoSampling { RNG.setSeed(i *13); RLController rl = new RLController<>( - new DinoWorld(), + new DinoWorldAdvanced(), Method.MC_CONTROL_FIRST_VISIT, DinoAction.values()); rl.setDelay(0); rl.setDiscountFactor(1f); rl.setEpsilon(f); rl.setLearningRate(1f); - rl.setNrOfEpisodes(20000); + rl.setNrOfEpisodes(100000); rl.start(); } diff --git a/src/main/java/example/JumpingDino.java b/src/main/java/example/JumpingDino.java index 3f71ca1..37934c0 100644 --- a/src/main/java/example/JumpingDino.java +++ b/src/main/java/example/JumpingDino.java @@ -6,13 +6,14 @@ import core.controller.RLController; import core.controller.RLControllerGUI; import evironment.jumpingDino.DinoAction; import evironment.jumpingDino.DinoWorld; +import evironment.jumpingDino.DinoWorldAdvanced; public class JumpingDino { public static void main(String[] args) { RNG.setSeed(55); RLController rl = new RLControllerGUI<>( - new DinoWorld(), + new DinoWorldAdvanced(), Method.MC_CONTROL_FIRST_VISIT, DinoAction.values()); @@ -20,7 +21,7 @@ public class JumpingDino { rl.setDiscountFactor(1f); rl.setEpsilon(0.15f); rl.setLearningRate(1f); - rl.setNrOfEpisodes(10000); + rl.setNrOfEpisodes(1000000); rl.start(); } }