Class VariantAGP.Settings

java.lang.Object
gametree.VariantAGP.Settings
Enclosing class:
VariantAGP

public static class VariantAGP.Settings extends Object
A class that stores the settings for a VariantAGP tree. All nodes in the tree hold a reference to the same VariantAGP.Settings object that was used to initialise the tree.
Version:
1.0
Author:
Pascal Anema
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final boolean
    Whether or not this tree is an adversarial game tree.
    Distribution of node bounds, returned array should have length of at least 1 containing a lower and upper bound for the node of which the information is given in the VariantAGP.NodeInfo object (bounds are determined by taking the minimum and maximum values from the returned array).
    final double
    Parameter r, relevance chance, only relevant when the growth factor g is greater than 1.
    final double
    Parameter g, growth factor, always > 0, typically >= 1, dictates how much child bounds may maximally diverge from their parents' bounds in a single generation, as a factor of the parent's range: |Upper - Lower|.
    final long
    Initial range R at the root node of this tree.
    final long
    The pseudo-random number generator seed of the first node in the tree (S₀).
    final int
    Maximum of parameter b, the branching factor or width of the tree, >=2, denotes the number of children nodes that each non-terminal node in the game-tree has.
    Distribution of parameter b, the branching factor or width of the tree, >=1, denotes the number of children nodes that each non-terminal node in the game-tree has.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Settings(boolean adversarial, long initial_seed, int maxWidth, Generator.Width width, long initial_range, Generator.Bounds distribution, double growth_factor, double force_relevance_chance)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new VariantAGP object representing a unique tree defined by the parameters set in this VariantAGP.Settings object.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • adversarial

      public final boolean adversarial
      Whether or not this tree is an adversarial game tree. If true, nodes alternate between maximising and minimising nodes (starting at maximising). If false, all nodes are maximising nodes. Adversarial game trees depict games with two opposing players. Non-adversarial game trees depict games with only one player (or multiple co-operating players).
    • initial_seed

      public final long initial_seed
      The pseudo-random number generator seed of the first node in the tree (S₀). Dictates the unique generation of the entire tree. A tree with the same settings, including the same initial seed, will always have the same structure no matter the order of expansion/exploration.
    • maxWidth

      public final int maxWidth
      Maximum of parameter b, the branching factor or width of the tree, >=2, denotes the number of children nodes that each non-terminal node in the game-tree has.
    • width

      public final Generator.Width width
      Distribution of parameter b, the branching factor or width of the tree, >=1, denotes the number of children nodes that each non-terminal node in the game-tree has.
    • initial_range

      public final long initial_range
      Initial range R at the root node of this tree. The root node will start with lower- and upper-bounds 0 and initial_range. Has to be greater than 0 for the tree to be non-trivial.
    • distribution

      public final Generator.Bounds distribution
      Distribution of node bounds, returned array should have length of at least 1 containing a lower and upper bound for the node of which the information is given in the VariantAGP.NodeInfo object (bounds are determined by taking the minimum and maximum values from the returned array). Can be a point-value, where the upper and lower bounds are the same value and/or the length of the array is 1, to signify a terminal node position.
    • growth_factor

      public final double growth_factor
      Parameter g, growth factor, always > 0, typically >= 1, dictates how much child bounds may maximally diverge from their parents' bounds in a single generation, as a factor of the parent's range: |Upper - Lower|. For g=1, all children values are bound by the optimistic and pessimistic values of their parents. For g>1 children may have bounds greater than their parents. For g < 1 children bounds are always smaller than their parents' bounds.
    • force_relevance_chance

      public final double force_relevance_chance
      Parameter r, relevance chance, only relevant when the growth factor g is greater than 1. Enforces that, for a fraction r of child nodes of each parent, the child bound overlaps with the parent bound. Such that either the upper or lower bound is forced to be generated within the parent bound, depending on whether the node is minimising or maximising respectively.
  • Constructor Details

    • Settings

      public Settings(boolean adversarial, long initial_seed, int maxWidth, Generator.Width width, long initial_range, Generator.Bounds distribution, double growth_factor, double force_relevance_chance)
      Parameters:
      adversarial - adversarial, denotes whether this tree is an adversarial tree or not
      initial_seed - initial_seed, denotes a unique tree generation sequence
      maxWidth - maxWidth, maximum branching factor of the tree, has to be greater than or equal to 2
      width - width, a generator for providing the number of children at each node
      initial_range - initial_range, has to be greater than 0
      distribution - distribution, a generator providing the bounds of children at each node
      growth_factor - growth_factor, has to be greater than 0
      force_relevance_chance - force_relevance_chance, has to be greater than or equal to 0 and smaller than or equal to 1
  • Method Details

    • getTree

      public VariantAGP getTree()
      Creates a new VariantAGP object representing a unique tree defined by the parameters set in this VariantAGP.Settings object.
      Returns:
      A new artificial game tree based on the parameters of this object.
    • toString

      public String toString()
      Overrides:
      toString in class Object