java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.controller.ai.evaluation.settings.KingfisherSettings
Record Components:
debug - whether additional debug information should be logged while the AI is evaluating
copyRandomState - whether copied battle states should preserve the current random state for deterministic simulation
search - the settings controlling search depth and terminal battle scoring
actionGeneration - the settings controlling how candidate actions are generated and filtered
evaluationWeights - weighting values applied to each registered evaluation module by id

public record KingfisherSettings(boolean debug, boolean copyRandomState, SearchSettings search, ActionGeneration actionGeneration, Map<String,Double> evaluationWeights) extends Record
Top-level configuration for the Kingfisher battle AI.

This record groups together the settings that control how Kingfisher searches possible battle states, generates candidate actions, handles randomness during simulation, and combines the individual evaluation modules into a final score.

The settings are data-driven, allowing the behaviour of the AI to be configured without changing the implementation. The search settings define how far ahead the AI looks, the action generation settings define which choices are considered, and the evaluation weights define how strongly each registered evaluator contributes to the final score.

Used by KingfisherAI
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<KingfisherSettings> CODEC
    • DEFAULT_EVALUATION_WEIGHTS

      public static final Map<String,Double> DEFAULT_EVALUATION_WEIGHTS
      Default evaluator weights used by the bundled fallback settings and tests.

      These values are not intended to be a fully tuned or authoritative Kingfisher configuration. The real implementation is data-driven, so production behaviour should be defined through the configured datapack settings. These defaults simply provide a known working baseline for tests and development.

  • Constructor Details

    • KingfisherSettings

      public KingfisherSettings(boolean debug, boolean copyRandomState, SearchSettings search, ActionGeneration actionGeneration, Map<String,Double> evaluationWeights)
      Creates an instance of a KingfisherSettings record class.
      Parameters:
      debug - the value for the debug record component
      copyRandomState - the value for the copyRandomState record component
      search - the value for the search record component
      actionGeneration - the value for the actionGeneration record component
      evaluationWeights - the value for the evaluationWeights record component
  • Method Details

    • defaultSettings

      public static KingfisherSettings defaultSettings()
      Creates the fallback Kingfisher settings used by tests and development defaults.

      This is not intended to represent the final or preferred AI balance. It exists as a simple, known working configuration for cases where no data-driven settings have been provided.

      Returns:
      a baseline Kingfisher configuration
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • debug

      public boolean debug()
      Returns the value of the debug record component.
      Returns:
      the value of the debug record component
    • copyRandomState

      public boolean copyRandomState()
      Returns the value of the copyRandomState record component.
      Returns:
      the value of the copyRandomState record component
    • search

      public SearchSettings search()
      Returns the value of the search record component.
      Returns:
      the value of the search record component
    • actionGeneration

      public ActionGeneration actionGeneration()
      Returns the value of the actionGeneration record component.
      Returns:
      the value of the actionGeneration record component
    • evaluationWeights

      public Map<String,Double> evaluationWeights()
      Returns the value of the evaluationWeights record component.
      Returns:
      the value of the evaluationWeights record component