#! python import trueskill from trueskill import Rating, rate_1vs1 mu = 1000 sigma = mu/3 beta = sigma/2 tau = sigma/100 print('mu: %.3f, sigma: %.3f, beta: %.3f, tau: %.3f' % (mu, sigma, beta, tau)) trueskill.setup(mu, sigma, beta, tau) justin,james,garth = Rating(), Rating(), Rating() print('Initial ratings: Justin: (%.3f %.3f), James: (%.3f %.3f), Garth: (%.3f %.3f)' % (justin.mu, justin.sigma, james.mu, james.sigma, garth.mu, garth.sigma)) # Justin vs. James - W:9, D:9, L:2 justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james, drawn=True) james,justin = rate_1vs1(james, justin) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james, drawn=True) james,justin = rate_1vs1(james, justin) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james, drawn=True) justin,james = rate_1vs1(justin, james) # Justin vs. Garth - W:4, D:12, L:4 justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth, drawn=True) garth,justin = rate_1vs1(garth, justin) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth) justin,garth = rate_1vs1(justin, garth, drawn=True) garth,justin = rate_1vs1(garth, justin) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth) garth,justin = rate_1vs1(garth, justin) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth) justin,garth = rate_1vs1(justin, garth, drawn=True) garth,justin = rate_1vs1(garth, justin) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth, drawn=True) justin,garth = rate_1vs1(justin, garth) # James vs. Garth - W:3, D:7, L:10 garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) james,garth = rate_1vs1(james, garth, drawn=True) james,garth = rate_1vs1(james, garth) james,garth = rate_1vs1(james, garth, drawn=True) garth,james = rate_1vs1(garth,james) garth,james = rate_1vs1(garth,james) james,garth = rate_1vs1(james, garth) james,garth = rate_1vs1(james, garth) james,garth = rate_1vs1(james, garth, drawn=True) james,garth = rate_1vs1(james, garth, drawn=True) james,garth = rate_1vs1(james, garth, drawn=True) garth,james = rate_1vs1(garth,james) james,garth = rate_1vs1(james, garth, drawn=True) james,garth = rate_1vs1(james, garth, drawn=True) print('Final ratings: Justin: (%.3f %.3f), James: (%.3f %.3f), Garth: (%.3f %.3f)' % (justin.mu, justin.sigma, james.mu, james.sigma, garth.mu, garth.sigma))