using namespace std;
+#define PRIOR_MU 1500
+#define PRIOR_SIGMA 100
#define MAX_PLAYERS 4096
float mu[MAX_PLAYERS];
}
float nom = 0.0f, denom = 0.0f;
+
+ // Prior.
+ {
+ float inv_sigma2 = 1.0f / (PRIOR_SIGMA * PRIOR_SIGMA);
+ nom += PRIOR_MU * inv_sigma2;
+ denom += inv_sigma2;
+ }
+
+ // All matches.
for (unsigned i = 0; i < matches.size(); ++i) {
float sigma1 = sigma[player_num];
float sigma2 = sigma[matches[i].other_player];