Enum Mutation

java.lang.Object
java.lang.Enum<Mutation>
com.github.raimannma.methods.Mutation
All Implemented Interfaces:
Serializable, Comparable<Mutation>, Constable

public enum Mutation
extends Enum<Mutation>
Mutation methods.
Author:
Manuel Raimann
  • Enum Constant Details

    • ADD_NODE

      public static final Mutation ADD_NODE
      ADD NODE.

      Adds a node to the network

    • SUB_NODE

      public static final Mutation SUB_NODE
      SUB NODE.

      Removes a node from the network

    • ADD_CONN

      public static final Mutation ADD_CONN
      ADD CONN.

      Adds a connection to the network

    • SUB_CONN

      public static final Mutation SUB_CONN
      SUB CONN.

      Removes a connection from the network

    • MOD_WEIGHT

      public static final Mutation MOD_WEIGHT
      MOD WEIGHT.

      Modifies the weight of a connection

    • MOD_BIAS

      public static final Mutation MOD_BIAS
      MOD BIAS.

      Modifies the bias of a node

    • MOD_ACTIVATION

      public static final Mutation MOD_ACTIVATION
      MOD ACTIVATION.

      Modifies the activation function of a node

    • ADD_SELF_CONN

      public static final Mutation ADD_SELF_CONN
      ADD SELF CONN.

      Adds a connection to a node itself

    • SUB_SELF_CONN

      public static final Mutation SUB_SELF_CONN
      SUB SELF CONNECTION.

      Removes a connection to a node itself

    • ADD_GATE

      public static final Mutation ADD_GATE
      ADD GATE.

      Add a gate to the network

    • SUB_GATE

      public static final Mutation SUB_GATE
      SUB GATE.

      Removes a gate from the network

    • ADD_BACK_CONN

      public static final Mutation ADD_BACK_CONN
      ADD BACK CONN.

      Adds a backward pointing connection

    • SUB_BACK_CONN

      public static final Mutation SUB_BACK_CONN
      SUB BACK CONN

      Removes a backward pointing connection

    • SWAP_NODES

      public static final Mutation SWAP_NODES
      SWAP NODES

      Swaps to nodes inside a network

  • Field Details

    • ALL

      public static final Mutation[] ALL
      Contains all possible mutations.
    • FFW

      public static final Mutation[] FFW
      Contains all feedforward mutations.
    • mutateOutput

      public final boolean mutateOutput
      Should the output be mutated?
    • allowed

      public Activation[] allowed
      All allowed ActivationTypes.
    • min

      public int min
      The min bias/weight.
    • max

      public int max
      The max bias/weight.
    • keepGates

      public boolean keepGates
      Should gates be kept?
  • Method Details

    • values

      public static Mutation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Mutation valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • mutate

      public abstract void mutate​(Network network)
      Mutate a network with the enum method.
      Parameters:
      network - the network
    • setAllowed

      public void setAllowed​(Activation[] allowedActivations)
      Sets allowed activations.
      Parameters:
      allowedActivations - the allowed activations
    • setMin

      public void setMin​(int min)
      Sets min bias/weight.
      Parameters:
      min - the min bias/weight
    • setMax

      public void setMax​(int max)
      Sets max bias/weight.
      Parameters:
      max - the max bias/weight
    • setKeepGates

      public void setKeepGates​(boolean keepGates)
      Sets keep gates.
      Parameters:
      keepGates - the keep gates