Algorithm 2.
1: // input: sequence, target structure, matrix of pair probabilities and the design template |
2: mutation ← False |
3: while mutation = = False do |
4: i ← randomly_select_unpaired_position(τ) |
5: if t[i] is not “o” then |
6: continue |
7: end if |
8: random_number ← random_float(0, 1) |
9: probability_of_mutation ← 1−Pi, n+1 |
10: if random_number < probability_of_mutation then |
11: ϕ′ ← mutate_at_position(position = i, ϕ) //replace ϕi with A,G,U or C |
12: if ϕ′ is not ϕ then |
13: ϕ ← ϕ′ |
14: mutation ← True |
15: end if |
16: end if |
17: end while |
18: Return ϕ |