Class GKMonteCarloStrategist

  • All Implemented Interfaces:
    GKStrategist, NSObject

    public class GKMonteCarloStrategist
    extends NSObject
    implements GKStrategist
    The Monte Carlo Strategist is a generic AI that selects a game model update for a given player that results in the highest likelihood for that player to eventually win the game. It does this by sampling the updates available to the player in question. In doing this it will select the update it knows to produce the best result so far, expanding on this selection, simulating the rest of the game from that expansion, and then propogating the results (win or loss) upwards. It will do this until the budget has been reached, then returning the choice it has deemed best suited for the player in question.
    • Constructor Detail

      • GKMonteCarloStrategist

        protected GKMonteCarloStrategist​(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()
      • version_static

        public static long version_static()
      • budget

        public long budget()
        The maximum number of samples that will be processed when searching for a move.
      • explorationParameter

        public long explorationParameter()
        A weight that encourages exploration of less visited updates versus the continued exploitation of previously visited updates.
      • randomSource

        public GKRandom randomSource()
        Description copied from interface: GKStrategist
        A random source to use when breaking ties between equally-strong moves when calling bestMoveForPlayer or when selecting a random move when randomMoveForPlayer is called. If set to nil, bestMoveForPlayer and randomMoveForPlayer will simply return the first best move available.
        Specified by:
        randomSource in interface GKStrategist
      • setBudget

        public void setBudget​(long value)
        The maximum number of samples that will be processed when searching for a move.
      • setExplorationParameter

        public void setExplorationParameter​(long value)
        A weight that encourages exploration of less visited updates versus the continued exploitation of previously visited updates.
      • setRandomSource

        public void setRandomSource​(GKRandom value)
        Description copied from interface: GKStrategist
        A random source to use when breaking ties between equally-strong moves when calling bestMoveForPlayer or when selecting a random move when randomMoveForPlayer is called. If set to nil, bestMoveForPlayer and randomMoveForPlayer will simply return the first best move available.
        Specified by:
        setRandomSource in interface GKStrategist