viewof round_by_naive_search = notebook({
teams,
rank_matchups,
matchups,
matchups_do_conflict
})`
eventual_matchup_count = teams.length / 2;
viewof generations = rank_matchups({ matchups: matchups })
matchups_with_scores = _.last(generations.result);
results = {
let selected_matchups = [];
for (let matchup of matchups_with_scores.map(([teams, score]) => teams)) {
if (selected_matchups.length >= eventual_matchup_count) {
break;
}
if (selected_matchups.some(x => matchups_do_conflict(x, matchup))) {
continue;
}
selected_matchups.push(matchup);
}
return selected_matchups;
}
`('round_by_naive_search')