private int[] getHighestProbability() throws InterruptKIException
    {
        int[] stoneCodes = new int[codeLength];

        // Checks if there are no Inputs.
        if (mastermind.getRowSize() == 0)
        {
            // if yes then guess
            for (int i = 0; i < codeLength; i++)
            {
                stoneCodes[i] = i % colorLength;
            }

            return stoneCodes;
        }
        // if not calculate every possibility for Secret-Code
        calculatePossibilities();

        // Calculate the highest probability out of the possibility's

        Integer[] setStoneCodesMax = null;
        long max = 0, buffer;
        for (Integer[] setStoneCodesBuffer : arrayList)
        {
            buffer = SetCode.getRowSize(setStoneCodesBuffer);
            if (max < buffer)
            {
                setStoneCodesMax = setStoneCodesBuffer;
                max = buffer;
            }
        }

        for (int i = 0; i < setStoneCodesMax.length; i++)
        {
            stoneCodes[i] = SetCode.getFirst(setStoneCodesMax[i]);
        }

        return stoneCodes;
    }