static IterableIterator findBest_Audio_TwoWordAnalyzer1(final LPair images) { replace A with Audio_TwoWordAnalyzer1. final LS words = uniquify(pairsA(images)); final new Best best; final new AIStrategy_RandomWithVariation strategy; strategy.random = func -> A { random_Audio_TwoWordAnalyzer1(first(words), second(words)) }; // todo: variation strategy.submit = func(final A a) -> double { new Scorer scorer; for (Pair img : images) scorer.add(eqic(img.a, a.analyze(img.b))); if (best.put(a, scorer!)) print(scorer + " / " + struct(a)); ret scorer!; }; // rest of function should be same as: ret strategyIterator(best, strategy, optimumValue := 100.0); ret iff(func { if (best.score() == 100) ret endMarker(); A lastBest = best!; strategy.go(); A a = best! == lastBest ? null : best!; lastBest = best!; ret a; }); }