Skip to main content
. 2018 Sep 7;20(9):684. doi: 10.3390/e20090684
Algorithm 5 Initialize population.
Require:p>0 {Number of categorical input attributes}
Require: v1,,vp, vj>1, j=1,,p {Number of categories for the input attributes}
Require: w>1, {Number of classes for the output attribute}
Require: δ>0 {Number of crossing operators}
Require: ϵ>0 {Number of mutation operators}
Require: Mmaxw {Maximum number of rules}
Require: N>1 {Number of individuals in the population}
  •  1:

    P

  •  2:

    fork=1 to N do

  •  3:

    I new Individual

  •  4:

    if kMmaxw+1 then

  •  5:

      MIk+w1

  •  6:

    else

  •  7:

      MI Int Random(w,Mmax)

  •  8:

    end if

  •  9:

     {Random rule RiI}

  • 10:

    for i=1 to MI do

  • 11:

      {Random integer values associated with the antecedents}

  • 12:

      for j=1 to p do

  • 13:

       bijIRandom(1,vj)

  • 14:

      end for

  • 15:

      {Random integer value associated with the consequent}

  • 16:

      if i<w then

  • 17:

       ciI=j

  • 18:

      else

  • 19:

       ciIRandom(1,w)

  • 20:

      end if

  • 21:

    end for

  • 22:

     {Random integer values for adaptive variation}

  • 23:

    dIRandom(0,δ)

  • 24:

    eIRandom(0,ϵ)

  • 25:

    PPI

  • 26:

    end for

  • 27:

    returnP