question: public GammaFitnessFunction ( int genomeLength , double alpha , double beta , int stateSize , boolean randomFittest ) { GammaDistribution gamma = new GammaDistribution ( beta , alpha ) ; fitness = new double [ genomeLength ] [ stateSize ] ; fittest = new byte [ genomeLength ] ; int fitpos = 0 ; for ( int i = 0 ; i < genomeLength ; i ++ ) { if ( randomFittest ) { fitpos = MathUtils . nextInt ( stateSize ) ; } fitness [ i ] [ fitpos ] = 1.0 ; fittest [ i ] = ( byte ) fitpos ; for ( int j = 0 ; j < stateSize ; j ++ ) { if ( j != fitpos ) { double prob = Math . round ( MathUtils . nextDouble ( ) * 1000.0 ) / 1000.0 ; while ( ( prob <= 0.0 ) || ( prob >= 1.0 ) ) { prob = Math . round ( MathUtils . nextDouble ( ) * 1000.0 ) / 1000.0 ; } fitness [ i ] [ j ] = Math . max ( 0.0 , 1.0 - gamma . quantile ( prob ) ) ; } } } }
target:  selection coefficients are gamma distributed with parameters alpha and beta