Class ArtificialGamePosition.Settings

java.lang.Object
gametree.ArtificialGamePosition.Settings
All Implemented Interfaces:
Serializable
Enclosing class:
ArtificialGamePosition

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

    Fields
    Modifier and Type
    Field
    Description
    final boolean
    Whether or not this tree is an adversarial game tree.
    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 boolean
    Not a tree generation parameter, but an implementation-specific one.
    final int
    Parameter k, number of values, >=2, denotes the number of values k that are generated to build the upper and lower bounds of each child node.
    final int
    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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Settings(boolean adversarial, long initial_seed, int width, long initial_range, int num_alts, double growth_factor, double force_relevance_chance)
    Initialises the artificial game tree settings with the provided parameter values.
    Settings(boolean adversarial, long initial_seed, int width, long initial_range, int num_alts, double growth_factor, double force_relevance_chance, boolean memory_saver)
    Initialises the artificial game tree settings with the provided parameter values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new ArtificialGamePosition object representing a unique tree defined by the parameters set in this ArtificialGamePosition.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.
    • width

      public final int width
      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.
    • 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.
    • num_alts

      public final int num_alts
      Parameter k, number of values, >=2, denotes the number of values k that are generated to build the upper and lower bounds of each child node. To generate children bounds, we randomly sample k values from a uniform distribution between some outer bound determined by the parent and the growth factor. The upper bound is taken to be the maximum of these k values, whereas the lower bound is the minimum.
    • 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.
    • memory_saver

      public final boolean memory_saver
      Not a tree generation parameter, but an implementation-specific one. If true, only the last 64 bits of the names of nodes are stored. This has no effect on the regular functions of the tree, nor on its distribution. But it disables random access for this tree, as well as losing information of node heritage after only a short number of ancestors (depending on the branching factor width). The benefit is significantly reduced memory usage, especially for very deep trees. If false, nodes are stored as usual.
  • Constructor Details

    • Settings

      public Settings(boolean adversarial, long initial_seed, int width, long initial_range, int num_alts, double growth_factor, double force_relevance_chance, boolean memory_saver)
      Initialises the artificial game tree settings with the provided parameter values.
      Parameters:
      adversarial - adversarial, denotes whether this tree is an adversarial tree or not
      initial_seed - initial_seed, denotes a unique tree generation sequence
      width - width, has to be greater than or equal to 2
      initial_range - initial_range, has to be greater than 0
      num_alts - num_alts, has to be greater than or equal to 2
      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
      memory_saver - memory_saver, denotes whether the implementation-specific memory saver is used
    • Settings

      public Settings(boolean adversarial, long initial_seed, int width, long initial_range, int num_alts, double growth_factor, double force_relevance_chance)
      Initialises the artificial game tree settings with the provided parameter values.

      This constructor uses a default value of true for the memory_saver parameter.

      Parameters:
      adversarial -
      initial_seed -
      width -
      initial_range -
      num_alts -
      growth_factor -
      force_relevance_chance -
  • Method Details