Tabnine Logo
MCState
Code IndexAdd Tabnine to your IDE (free)

How to use
MCState
in
burlap.domain.singleagent.mountaincar

Best Java code snippets using burlap.domain.singleagent.mountaincar.MCState (Showing top 6 results out of 315)

origin: jmacglashan/burlap

@Override
public State copy() {
  return new MCState(x, v);
}
origin: jmacglashan/burlap

@Override
public State generateState() {
  
  double rx = this.rand.nextDouble() * (this.xmax - this.xmin) + this.xmin;
  double rv = this.rand.nextDouble() * (this.vmax - this.vmin) + this.vmin;
  
  MCState s = new MCState(rx, rv);
  
  return s;
}
origin: jmacglashan/burlap

public MCState valleyState(){
  return new MCState(this.valleyPos(), 0.);
}
origin: jmacglashan/burlap_examples

public static void main(String[] args) {
  MountainCar mcGen = new MountainCar();
  SADomain domain = mcGen.generateDomain();
  StateGenerator rStateGen = new MCRandomStateGenerator(mcGen.physParams);
  SARSCollector collector = new SARSCollector.UniformRandomSARSCollector(domain);
  SARSData dataset = collector.collectNInstances(rStateGen, domain.getModel(), 5000, 20, null);
  NormalizedVariableFeatures features = new NormalizedVariableFeatures()
      .variableDomain("x", new VariableDomain(mcGen.physParams.xmin, mcGen.physParams.xmax))
      .variableDomain("v", new VariableDomain(mcGen.physParams.vmin, mcGen.physParams.vmax));
  FourierBasis fb = new FourierBasis(features, 4);
  LSPI lspi = new LSPI(domain, 0.99, new DenseCrossProductFeatures(fb, 3), dataset);
  Policy p = lspi.runPolicyIteration(30, 1e-6);
  Visualizer v = MountainCarVisualizer.getVisualizer(mcGen);
  VisualActionObserver vob = new VisualActionObserver(v);
  vob.initGUI();
  SimulatedEnvironment env = new SimulatedEnvironment(domain,
      new MCState(mcGen.physParams.valleyPos(), 0));
  EnvironmentServer envServ = new EnvironmentServer(env, vob);
  for(int i = 0; i < 100; i++){
    PolicyUtils.rollout(p, envServ);
    envServ.resetEnvironment();
  }
  System.out.println("Finished");
}
origin: jmacglashan/burlap_examples

public static void MCLSPIFB(){
  MountainCar mcGen = new MountainCar();
  SADomain domain = mcGen.generateDomain();
  StateGenerator rStateGen = new MCRandomStateGenerator(mcGen.physParams);
  SARSCollector collector = new SARSCollector.UniformRandomSARSCollector(domain);
  SARSData dataset = collector.collectNInstances(rStateGen, domain.getModel(), 5000, 20, null);
  NormalizedVariableFeatures inputFeatures = new NormalizedVariableFeatures()
      .variableDomain("x", new VariableDomain(mcGen.physParams.xmin, mcGen.physParams.xmax))
      .variableDomain("v", new VariableDomain(mcGen.physParams.vmin, mcGen.physParams.vmax));
  FourierBasis fb = new FourierBasis(inputFeatures, 4);
  LSPI lspi = new LSPI(domain, 0.99, new DenseCrossProductFeatures(fb, 3), dataset);
  Policy p = lspi.runPolicyIteration(30, 1e-6);
  Visualizer v = MountainCarVisualizer.getVisualizer(mcGen);
  VisualActionObserver vob = new VisualActionObserver(v);
  vob.initGUI();
  SimulatedEnvironment env = new SimulatedEnvironment(domain, new MCState(mcGen.physParams.valleyPos(), 0.));
  env.addObservers(vob);
  for(int i = 0; i < 5; i++){
    PolicyUtils.rollout(p, env);
    env.resetEnvironment();
  }
  System.out.println("Finished");
}
origin: jmacglashan/burlap_examples

MCState s = new MCState(mcGen.physParams.valleyPos(), 0.);
burlap.domain.singleagent.mountaincarMCState

Most used methods

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now