Tabnine Logo
GridGame.generateDomain
Code IndexAdd Tabnine to your IDE (free)

How to use
generateDomain
method
in
burlap.domain.stochasticgames.gridgame.GridGame

Best Java code snippets using burlap.domain.stochasticgames.gridgame.GridGame.generateDomain (Showing top 6 results out of 315)

origin: jmacglashan/burlap

public static void main(String[] args) {
  GridGame gg = new GridGame();
  OOSGDomain domain = gg.generateDomain();
  State s = GridGame.getTurkeyInitialState();
  JointRewardFunction jr = new GridGame.GGJointRewardFunction(domain);
  TerminalFunction tf = new GridGame.GGTerminalFunction(domain);
  World world = new World(domain, jr, tf, new ConstantStateGenerator(s));
  DPrint.toggleCode(world.getDebugId(),false);
  SGAgent ragent1 = new RandomSGAgent();
  SGAgent ragent2 = new RandomSGAgent();
  SGAgentType type = new SGAgentType("agent", domain.getActionTypes());
  world.join(ragent1);
  world.join(ragent2);
  GameEpisode ga = world.runGame(20);
  System.out.println(ga.maxTimeStep());
  String serialized = ga.serialize();
  System.out.println(serialized);
  GameEpisode read = GameEpisode.parse(serialized);
  System.out.println(read.maxTimeStep());
  System.out.println(read.state(0).toString());
}
origin: jmacglashan/burlap_examples

public static void QLCoCoTest(){
  final OOSGDomain domain = gridGame.generateDomain();
origin: jmacglashan/burlap_examples

public static void saInterface(){
  final OOSGDomain domain = gridGame.generateDomain();
origin: jmacglashan/burlap_examples

public static void VICorrelatedTest(){
  GridGame gridGame = new GridGame();
  final OOSGDomain domain = gridGame.generateDomain();
  final HashableStateFactory hashingFactory = new SimpleHashableStateFactory();
  final State s = GridGame.getPrisonersDilemmaInitialState();
  JointRewardFunction rf = new GridGame.GGJointRewardFunction(domain, -1, 100, false);
  TerminalFunction tf = new GridGame.GGTerminalFunction(domain);
  SGAgentType at = GridGame.getStandardGridGameAgentType(domain);
  MAValueIteration vi = new MAValueIteration(domain, rf, tf, 0.99, hashingFactory, 0., new CorrelatedQ(CorrelatedEquilibriumSolver.CorrelatedEquilibriumObjective.UTILITARIAN), 0.00015, 50);
  World w = new World(domain, rf, tf, s);
  //for correlated Q, use a correlated equilibrium policy joint policy
  ECorrelatedQJointPolicy jp0 = new ECorrelatedQJointPolicy(CorrelatedEquilibriumSolver.CorrelatedEquilibriumObjective.UTILITARIAN, 0.);
  MultiAgentDPPlanningAgent a0 = new MultiAgentDPPlanningAgent(domain, vi, new PolicyFromJointPolicy(0, jp0, true), "agent0", at);
  MultiAgentDPPlanningAgent a1 = new MultiAgentDPPlanningAgent(domain, vi, new PolicyFromJointPolicy(1, jp0, true), "agent1", at);
  w.join(a0);
  w.join(a1);
  GameEpisode ga = null;
  List<GameEpisode> games = new ArrayList<GameEpisode>();
  for(int i = 0; i < 10; i++){
    ga = w.runGame();
    games.add(ga);
  }
  Visualizer v = GGVisualizer.getVisualizer(9, 9);
  new GameSequenceVisualizer(v, domain, games);
}
origin: jmacglashan/burlap

OOSGDomain d = gg.generateDomain();
origin: jmacglashan/burlap_examples

final OOSGDomain domain = gridGame.generateDomain();
burlap.domain.stochasticgames.gridgameGridGamegenerateDomain

Popular methods of GridGame

  • <init>
  • generatePFs
  • getPrisonersDilemmaInitialState
    Returns the initial state for a classic prisoner's dilemma formulated in a Grid Game.
  • getSimpleGameInitialState
    Returns the initial state for a simple game in which both players can win without interfering with o
  • getStandardGridGameAgentType
    Creates and returns a standard SGAgentType for grid games. This SGAgentTypeis assigned the type name
  • getTurkeyInitialState
  • setBoundaryWalls
    / Sets boundary walls of a domain. This method will add 4 solid walls (top left bottom right) to cre

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for WebStorm
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