Class GKDecisionTree

    • Constructor Detail

      • GKDecisionTree

        protected GKDecisionTree​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • findActionForAnswers

        public NSObject findActionForAnswers​(NSDictionary<?,​?> answers)
        Will branch down from the root node to find the correct action attribute for the given collection of results and their respective attributes
        Parameters:
        answers - The dictionary of attributes (keys) and their answers (values)
        Returns:
        The attribute found by traversing the tree given the provided answers
      • initWithAttribute

        public GKDecisionTree initWithAttribute​(NSObject attribute)
        Initializes the decision tree with a root node containing the provided attribute
        Parameters:
        attribute - The attribute to be contained at the root of the tree
        Returns:
        GKDecisionTree with the set root
      • initWithExamplesActionsAttributes

        public GKDecisionTree initWithExamplesActionsAttributes​(NSArray<? extends NSArray<?>> examples,
                                                                NSArray<?> actions,
                                                                NSArray<?> attributes)
        Initializes and constructs a decision tree by learning from the provided examples & attributes
        Parameters:
        examples - Must be an array of examples (with each example being a collection of the various attributes at a given state)
        actions - An array of the corresponding actions for each example. Ordered such that the first action matches with the first example in examples.
        attributes - The list of attributes. Ordered such that the first attribute matches with the first result in each example. So if we have two attributes: [distance, jump height], and two examples: [[20, 8], [15, 14]], and the resulting actions here: [Roll, Jump], we can think of this as a matrix: distance| height <- Attributes _______|_______ | | | | 20 | 8 | jump |-------|-------|------- <- Results | 15 | 14 | roll |_______|_______| ^ | Examples
        Returns:
        GKDecisionTree created by learning from the provided examples for the provided attributes
      • randomSource

        public GKRandomSource randomSource()
        The random source used by the decision tree when descending on a random branch This must be set before creating any weighted branches
        See Also:
        GKDecisionNode
      • rootNode

        public GKDecisionNode rootNode()
        The node for the decision tree that all other nodes descend from
      • setRandomSource

        public void setRandomSource​(GKRandomSource value)
        The random source used by the decision tree when descending on a random branch This must be set before creating any weighted branches
        See Also:
        GKDecisionNode
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • exportToURLError

        public boolean exportToURLError​(NSURL url,
                                        NSError error)
        Exports a decision tree to the given URL
        Parameters:
        url - The URL to which the contents will be exported
        Returns:
        The response indicating the status of the decision tree being successfully exported
      • initWithURLError

        public GKDecisionTree initWithURLError​(NSURL url,
                                               NSError error)
        Initializes a decision tree from the contents of a file
        Parameters:
        url - The URL from which the contents will be loaded
        Returns:
        The instance of the decision tree constructed