Class VariantAGP.Settings
java.lang.Object
gametree.VariantAGP.Settings
- Enclosing class:
VariantAGP
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
FieldsModifier and TypeFieldDescriptionfinal booleanWhether or not this tree is an adversarial game tree.final Generator.BoundsDistribution of node bounds, returned array should have length of at least1containing a lower and upper bound for the node of which the information is given in theVariantAGP.NodeInfoobject (bounds are determined by taking the minimum and maximum values from the returned array).final doubleParameter r, relevance chance, only relevant when the growth factorgis greater than 1.final doubleParameter 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 longInitial range R at the root node of this tree.final longThe pseudo-random number generator seed of the first node in the tree (S₀).final intMaximum 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.final Generator.WidthDistribution 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
ConstructorsConstructorDescriptionSettings(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 TypeMethodDescriptiongetTree()Creates a newVariantAGPobject representing a unique tree defined by the parameters set in thisVariantAGP.Settingsobject.toString()
-
Field Details
-
adversarial
public final boolean adversarialWhether or not this tree is an adversarial game tree. Iftrue, nodes alternate between maximising and minimising nodes (starting at maximising). Iffalse, 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_seedThe 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 maxWidthMaximum 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
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_rangeInitial range R at the root node of this tree. The root node will start with lower- and upper-bounds0andinitial_range. Has to be greater than0for the tree to be non-trivial. -
distribution
Distribution of node bounds, returned array should have length of at least1containing a lower and upper bound for the node of which the information is given in theVariantAGP.NodeInfoobject (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 is1, to signify a terminal node position. -
growth_factor
public final double growth_factorParameter 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|. Forg=1, all children values are bound by the optimistic and pessimistic values of their parents. Forg>1children may have bounds greater than their parents. Forg < 1children bounds are always smaller than their parents' bounds. -
force_relevance_chance
public final double force_relevance_chanceParameter r, relevance chance, only relevant when the growth factorgis greater than 1. Enforces that, for a fractionrof 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 notinitial_seed-initial_seed, denotes a unique tree generation sequencemaxWidth-maxWidth, maximum branching factor of the tree, has to be greater than or equal to 2width-width, a generator for providing the number of children at each nodeinitial_range-initial_range, has to be greater than 0distribution-distribution, a generator providing the bounds of children at each nodegrowth_factor-growth_factor, has to be greater than 0force_relevance_chance-force_relevance_chance, has to be greater than or equal to 0 and smaller than or equal to 1
-
-
Method Details
-
getTree
Creates a newVariantAGPobject representing a unique tree defined by the parameters set in thisVariantAGP.Settingsobject.- Returns:
- A new artificial game tree based on the parameters of this object.
-
toString
-