Skip to main content
. 2023 Nov 4;8(7):525. doi: 10.3390/biomimetics8070525
Algorithm 5: Stochastic Peer Interaction in ETLBOCBL-CNN’s Modified Teacher Phase
Inputs: ND Poff=[X1off,,Xnoff,.,XNoff]XTeachertrainvalidSbatchεtrainRLCnum
01: Initialize clone population set as Pclone;
02: Construct Pclone by duplicating Poff and sorting the offspring learners ascendingly by referring to their fitness values of Xnclone.Err for n=1,,N;
03: Construct PT20 and PT50 by extracting the top 20% and 50% of offspring learners stored in Pclone;
04: for n=1 to N do
05:    for d=1 to D do
06:       Randomly generate rand[0,1] from uniform distribution;
07:       if 0rand<1/3 then
08:         Randomly select XpT20 and XqT20 from PT20, where pqn;
09:         Update Xnoff.Posd using Equation (14);
10:       else if 1/3rand<2/3 then
11:         Randomly select XrT50 from PT50, where rn;
12:         Update Xnoff.Posd using Equation (15);
13:        else if 2/3rand1 then
14:         Retain the original value of Xnoff.Posd;
15:         end if
16:            if d2NmaxConv+3l1 with  l=1,,NmaxConv then
17:        Xnoff.PosdRound(Xnoff.Posd);
18:         end if
19:    end for
20:   Perform fitness evaluation on the updated Xnoff.Pos to obtain new Xnoff.Err using Algorithm 2;
21:   if Xnoff.Err<XTeacher.Err then
22:      XTeacher.PosXnoff.PosXTeacher.ErrXnoff.Err;
23:    end if
24: end for
Output: Updated  Poff=[X1off,,Xnoff,.,XNoff] and XTeacher