congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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