tycho-solver
Version:
Evolutionary computation and optimization library
7 lines • 340 B
JavaScript
export const TieBreakerOperator = ({ currentSolution, neighbor, currentCost, neighborCost, maximizeCost, children }) => {
const isCostImprovement = (maximizeCost ?? false)
? neighborCost > currentCost
: neighborCost < currentCost;
return children(isCostImprovement);
};
//# sourceMappingURL=TieBreakerOperator.js.map