Skip to content

Commit

Permalink
fix: revert demo changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo Uceda committed Aug 27, 2022
1 parent 76ff5a5 commit 00bd783
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions demo/optimizeCombined.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ const associations: IAssociations = {
};

const combinedObjFn: InnerObjectiveFnType = (candidate: MenuType) => {
return objectives.associations({ associations })(candidate);
return (
objectives.fitts({ frequencies })(candidate) +
0.5 * objectives.associations({ associations })(candidate)
);
};

const { bestDesign, bestScore } = optimizers.random({
iterations: 100000,
iterations: 1000,
seed: menuEntries,
objectiveFunction: combinedObjFn,
});
Expand Down

0 comments on commit 00bd783

Please sign in to comment.