Algorithm 1.
GeneticAlgorithm()
| 1 | begin |
| 2 | Generate initial population of policies; |
| 3 | while stopping criteria not met do |
| 4 | foreach policy Ki do |
| 5 | Use Rinott method to determine sample size, Ni, for desired P(CS); |
| 6 | Simulate policy using determined sample size; |
| 7 | Record J(Ki); |
| 8 | end |
| 9 | BestPolicy ← policy with greatest expected QALYs; |
| 10 | Jmax ← J(BestPolicy); |
| 11 | foreach policy Ki do |
| 12 | if J(Ki) ≠ Jmax then |
| 13 | Parent1 ← TournamentSelect(); |
| 14 | Parent2 ← TournamentSelect(); |
| 15 | NewPolicy ← Crossover(Parent1, Parent2); |
| 16 | NewPolicy ← Mutate(NewPolicy); |
| 17 | Di ← NewPolicy; |
| 18 | end |
| 19 | end |
| 20 | end |
| 21 | return BestPolicy; |
| 21 | end |