RLPark 1.0.0
Reinforcement Learning Framework in Java

CreateLedRandom.java

Go to the documentation of this file.
00001 package rlpark.plugin.irobot.examples;
00002 
00003 import java.util.Random;
00004 
00005 import rlpark.plugin.irobot.robots.CreateRobot;
00006 import rlpark.plugin.irobot.robots.IRobotEnvironment;
00007 
00008 public class CreateLedRandom {
00009   public static void main(String[] args) {
00010     IRobotEnvironment environment = new CreateRobot();
00011     environment.waitNewObs();
00012     Random random = new Random(1);
00013     while (true) {
00014       environment.sendLeds(0, random.nextBoolean() ? 0 : 255, random.nextBoolean(), random.nextBoolean());
00015       try {
00016         Thread.sleep(100);
00017       } catch (InterruptedException e) {
00018         e.printStackTrace();
00019       }
00020     }
00021   }
00022 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark