group3.c
void g3_computeWeightedProbs(double *probabilities, g3_proportion *scores, int t) {
    double numerators[NUM_COLS];
    double denominator = 0;

    int i;
    for (i = 0; i < NUM_COLS; i++) {
        numerators[i] = g3_UCB(scores[i].w_i, scores[i].n_i, t);
        denominator += numerators[i];
    }

    for(i = 0; i < NUM_COLS; i++)
        probabilities[i] = numerators[i] / denominator;
}
// Weight paths based on some function of their score
// Returns a probability distribution
Weight paths based on some function of their score
Returns a probability distribution
Weight paths based on some function of their score Returns a probability distribution
void g3_computeWeightedProbs(double *probabilities, g3_proportion *scores, int t) {
    double numerators[NUM_COLS];
    double denominator = 0;
    int i;
    for (i = 0; i < NUM_COLS; i++) {
        numerators[i] = g3_UCB(scores[i].w_i, scores[i].n_i, t);
        denominator += numerators[i];
    }
    for(i = 0; i < NUM_COLS; i++)
        probabilities[i] = numerators[i] / denominator;
}
void g3_computeWeightedProbs ( double * probabilities , g3_proportion * scores , int t ) { double numerators [ NUM_COLS ] ; double denominator = 0 ; int i ; for ( i = 0 ; i < NUM_COLS ; i ++ ) { numerators [ i ] = g3_UCB ( scores [ i ] . w_i , scores [ i ] . n_i , t ) ; denominator += numerators [ i ] ; } for ( i = 0 ; i < NUM_COLS ; i ++ ) probabilities [ i ] = numerators [ i ] / denominator ; }
Weight paths based on some function of their score
Returns a probability distribution
Weight paths based on some function of their score Returns a probability distribution