@Override
    public double actionAcceptanceScore(Action action, ClusterModelSnapshot cluster) {
        if (!GoalUtils.isValidAction(action, cluster)) {
            return NOT_ACCEPTABLE;
        }
        BrokerUpdater.Broker srcBrokerBefore = cluster.broker(action.getSrcBrokerId());
        BrokerUpdater.Broker destBrokerBefore = cluster.broker(action.getDestBrokerId());

        if (!(isEligibleBroker(srcBrokerBefore) && isEligibleBroker(destBrokerBefore))) {
            return POSITIVE_ACTION_SCORE_THRESHOLD;
        }

        BrokerUpdater.Broker srcBrokerAfter = srcBrokerBefore.copy();
        BrokerUpdater.Broker destBrokerAfter = destBrokerBefore.copy();

        if (!moveReplica(action, cluster, srcBrokerAfter, destBrokerAfter)) {
            return NOT_ACCEPTABLE;
        }

        return calculateAcceptanceScore(srcBrokerBefore, destBrokerBefore, srcBrokerAfter, destBrokerAfter);
    }
Get the acceptable action with the highest score.

@param candidateActionScores candidate actions with scores
@return the acceptable action with the highest score
core/src/main/java/kafka/autobalancer/goals/AbstractGoal.java