Interface MinMaxRuleable

All Known Implementing Classes:
DeficientHROT, HROT, HROTBSFKL, HROTDeadlyEnemies, HROTExtendedGenerations, HROTGenerations, HROTHistory, HROTRegeneratingGenerations, HROTSymbiosis, INT, IntegerHROT, INTEnergetic, INTGenerations, INTHistory

public interface MinMaxRuleable
Rule families that support minimum, maximum rules implement this interface
  • Method Summary

    Modifier and Type Method Description
    boolean betweenMinMax​(RuleFamily minRule, RuleFamily maxRule)
    Checks if the current rule is between the given minimum and maximum rules A child class the implements this method is compatible with CAViewer's rule search program
    org.javatuples.Pair<RuleFamily,​RuleFamily> getMinMaxRule​(Grid[] grids)
    Returns the minimum and maximum rule of the provided evolutionary sequence.
    void randomise​(RuleFamily minRule, RuleFamily maxRule)
    Randomise the parameters of the current rule to be between minimum and maximum rules Used in CAViewer's rule search program
    boolean validMinMax​(RuleFamily minRule, RuleFamily maxRule)
    Checks if the minimum rule and maximum rules provided are valid A child class the implements this method is compatible with CAViewer's rule search program
  • Method Details

    • randomise

      void randomise​(RuleFamily minRule, RuleFamily maxRule)
      Randomise the parameters of the current rule to be between minimum and maximum rules Used in CAViewer's rule search program
      Parameters:
      minRule - The minimum rule for randomisation
      maxRule - The maximum rule for randomisation
      Throws:
      java.lang.IllegalArgumentException - Thrown if the minimum and maximum rules are invalid
      java.lang.UnsupportedOperationException - Thrown if the specific rule does not support randomisation
    • getMinMaxRule

      org.javatuples.Pair<RuleFamily,​RuleFamily> getMinMaxRule​(Grid[] grids)
      Returns the minimum and maximum rule of the provided evolutionary sequence. This is used in CAViewer's rule search program and identification. The first grid in the list is taken to be at generation 0.
      Parameters:
      grids - An array of grids representing the evolutionary sequence
      Returns:
      A pair containing the min rule as the first value and the max rule as the second value
      Throws:
      java.lang.UnsupportedOperationException - Thrown if the specific rule does not support minimum and maximum rules
    • betweenMinMax

      boolean betweenMinMax​(RuleFamily minRule, RuleFamily maxRule)
      Checks if the current rule is between the given minimum and maximum rules A child class the implements this method is compatible with CAViewer's rule search program
      Parameters:
      minRule - The minimum rule
      maxRule - The maximum rule
      Returns:
      True if the current rule is between minimum and maximum rules and false if the current rule is not between the minimum and maximum rules
      Throws:
      java.lang.IllegalArgumentException - Thrown if the minimum rule and maximum rule are invalid
      java.lang.UnsupportedOperationException - Thrown if the current rule does not support minimum and maximum rules
    • validMinMax

      boolean validMinMax​(RuleFamily minRule, RuleFamily maxRule)
      Checks if the minimum rule and maximum rules provided are valid A child class the implements this method is compatible with CAViewer's rule search program
      Parameters:
      minRule - The minimum rule to check
      maxRule - The maximum rule to check
      Returns:
      True if the minimum and maximum rules are valid and false if the minimum and maximum rules are not valid