public Hypothesis probabilisticSelect(int sumFitness)
    {
        boolean found = false;
        int cIndex = 0;
        Hypothesis h = null;
        while (!found)
        {
            double prob = (double)fitnessValues[cIndex] / (double)sumFitness;
            double rnd = Math.random();
            
            if (rnd <= prob)
            {
                //Found one
                found = true;
                h = population.get(cIndex);
                
                if (debug) System.out.println(rnd + "<" + prob + ": " + h.toString());
            }
            
            cIndex++;
            if (cIndex >= populationSize) cIndex = 0;
        }
        
        return h;
    }