src/core/reinforcement/function/AbstractFunctionEstimator.java
public int argmax(Matrix stateValues, HashSet<Integer> availableActions) {
        int maxAction = -1;
        double maxValue = Double.NEGATIVE_INFINITY;
        for (int action : availableActions) {
            double actionValue = stateValues.getValue(getAction(action), 0);
            if (maxValue == Double.NEGATIVE_INFINITY || maxValue < actionValue) {
                maxValue = actionValue;
                maxAction = action;
            }
        }
        return maxAction;
    }
/**
     * Returns action with maximum state value given available actions.
     *
     * @param stateValues state values.
     * @param availableActions actions available in state.
     * @return action with maximum state value.
     */
Returns action with maximum state value given available actions.

@param stateValues state values.
@param availableActions actions available in state.
@return action with maximum state value.
Returns action with maximum state value given available actions . @param stateValues state values . @param availableActions actions available in state . @return action with maximum state value .
public int argmax(Matrix stateValues, HashSet<Integer> availableActions) {
        int maxAction = -1;
        double maxValue = Double.NEGATIVE_INFINITY;
        for (int action : availableActions) {
            double actionValue = stateValues.getValue(getAction(action), 0);
            if (maxValue == Double.NEGATIVE_INFINITY || maxValue < actionValue) {
                maxValue = actionValue;
                maxAction = action;
            }
        }
        return maxAction;
    }
public int argmax ( Matrix stateValues , HashSet < Integer > availableActions ) { int maxAction = - 1 ; double maxValue = Double . NEGATIVE_INFINITY ; for ( int action : availableActions ) { double actionValue = stateValues . getValue ( getAction ( action ) , 0 ) ; if ( maxValue == Double . NEGATIVE_INFINITY || maxValue < actionValue ) { maxValue = actionValue ; maxAction = action ; } } return maxAction ; }
Returns action with maximum state value given available actions.
Returns action with maximum state value given available actions .