Last Man Standing Competition 3 Round 5

Nobody has picked 2 teams to win as yet so all those with 1 winning team are still in going in tomorrow's games.
 
No mate you can pick from the games left tomorrow.

Sunday 19th September

England Premiership


Brighton v Leicester 14:00
West Ham v Man Utd 14:00
Spurs v Chelsea 16:30

Scotland Premiership


Dundee Utd v Dundee 12:00
Livingston v Celtic
Rangers v Motherwell
Chelsea for me then, thanks.
 
I’ll be very pleased if wazza1 is my only one left this time tomorrow, along with 13 others odd. Might be getting banned if I win off wazza2 tomorrow.
Think you better look out your Celtic scarf just in case mate :))
 
Fucking Fulham.

Yet another reason to hate Jimmy Hill!

(And Hibs but I don't need any more reasons to hate them)
 
0 out of 2 in this, City let me down in another competition. Couldn’t pick my own arse this weekend, shamble.
 
Should I be expecting an Old Firm double next weekend? I think you are favourite here going off who we have picked so far.
Lol...
You're subliminally trying to push me away from Southampton and West Ham :)

Celtic...I don't really want to pick those manky bassas if I can help it. Every pound would taste dirty if I won in the back of them..

Just had a peek at your line....
Oh my god, your gonna need to bet on Blackpool or some chunt :)

I don't know what I'm betting. I generally just let my computer program pick. I must have made a mistake this week and ran the program before you had selected Chelsea or I've misinterpreted your multiple lines. I should have been the only selection who used Chelsea.

Program;
def metropolis_sample(X, teams, burn_in, start_perm, beta):
"""
Returns a Metropolis-sampled permutation after `burn_in` steps, starting from `start_perm`.
Acceptance probability ratio is winning probability ratio, beta is inverse temperature.
"""
## Check dims of X, start_perm ok
num_weeks = X.shape[0]
num_teams = X.shape[1]
if (num_teams != len(teams)):
raise(ValueError("X needs to have %d rows, has %d." % (num_teams, X.shape[1])))
if( not (sorted(start_perm) == list(range(len(start_perm))))):
raise(ValueError("start_perm doesn't contain all integers from 0 to %d" % (len(start_perm) -1 )))

out_perm = start_perm[:]
out_val = evaluate_perm(out_perm, X)
for t in range(burn_in):
idx1, idx2 = np.random.choice(len(teams), 2, replace=False)
candidate_perm = out_perm[:]
candidate_perm[idx1], candidate_perm[idx2] = candidate_perm[idx2], candidate_perm[idx1]
candidate_val = evaluate_perm(candidate_perm, X)
ratio = np.exp(candidate_val) / np.exp(out_val) # evaluate_perm() is log of winnning probability

accept = False
if (ratio >= 1):
accept = True
else:
accept = np.random.rand() <= np.exp(- beta * ratio)

if (accept):
# print("accept", t, candidate_val, out_val, (np.exp(candidate_val) / np.exp(out_val)), out_perm)
out_perm = candidate_perm[:]
out_val = candidate_val

return out_perm, out_val
def simulated_anneal_sample(X, teams, burn_in, start_perm, beta_i, beta_f, alpha):
"""
Return a permutation sample according to the simulated annealing algorithm,
starting at inverse temperature `beta_i` and stopping at `beta_f`. Beta geometrically
increases, by a factor `alpha` at each step, `burn_in` runs at each temperature.
"""
current_perm = start_perm
beta = beta_i
while (beta <= beta_f):
beta = alpha * beta
out_perm, out_val = metropolis_sample(X, teams, burn_in, current_perm, beta)
current_perm = out_perm[:]
return out_perm, out_val
def simulated_anneal_sample_strategy(X, teams, burn_in, start_perm, beta_i, beta_f, alpha, num_runs):
"""
Return the permutation giving the maximum winning probability after `num_samples`
SA samples.
"""
optimal_perm = start_perm[:]
optimal_val = evaluate_perm(optimal_perm, X)
for t in range(num_runs):
if (t % 5 == 0):
print("Run %d of %d. Current optimal value is %.4f." \
% (t + 1, num_runs, optimal_val))
sample_perm, sample_val = simulated_anneal_sample(X, teams, burn_in, start_perm, beta_i, beta_f, alpha)
if (sample_val > optimal_val):
optimal_val = sample_val
optimal_perm = sample_perm[:]
return optimal_perm, optimal_val
 
Last edited:
Lol...
You're subliminally trying to push me away from Southampton and West Ham :)

Celtic...I don't really want to pick those manky bassas if I can help it. Every pound would taste dirty if I won in the back of them..

Just had a peek at your line....
Oh my god, your gonna need to bet on Blackpool or some chunt :)

I don't know what I'm betting. I generally just let my computer program pick. I must have made a mistake this week and ran the program before you had selected Chelsea or I've misinterpreted your multiple lines. I should have been the only selection who used Chelsea.

Program;
def metropolis_sample(X, teams, burn_in, start_perm, beta):
"""
Returns a Metropolis-sampled permutation after `burn_in` steps, starting from `start_perm`.
Acceptance probability ratio is winning probability ratio, beta is inverse temperature.
"""
## Check dims of X, start_perm ok
num_weeks = X.shape[0]
num_teams = X.shape[1]
if (num_teams != len(teams)):
raise(ValueError("X needs to have %d rows, has %d." % (num_teams, X.shape[1])))
if( not (sorted(start_perm) == list(range(len(start_perm))))):
raise(ValueError("start_perm doesn't contain all integers from 0 to %d" % (len(start_perm) -1 )))

out_perm = start_perm[:]
out_val = evaluate_perm(out_perm, X)
for t in range(burn_in):
idx1, idx2 = np.random.choice(len(teams), 2, replace=False)
candidate_perm = out_perm[:]
candidate_perm[idx1], candidate_perm[idx2] = candidate_perm[idx2], candidate_perm[idx1]
candidate_val = evaluate_perm(candidate_perm, X)
ratio = np.exp(candidate_val) / np.exp(out_val) # evaluate_perm() is log of winnning probability

accept = False
if (ratio >= 1):
accept = True
else:
accept = np.random.rand() <= np.exp(- beta * ratio)

if (accept):
# print("accept", t, candidate_val, out_val, (np.exp(candidate_val) / np.exp(out_val)), out_perm)
out_perm = candidate_perm[:]
out_val = candidate_val

return out_perm, out_val
def simulated_anneal_sample(X, teams, burn_in, start_perm, beta_i, beta_f, alpha):
"""
Return a permutation sample according to the simulated annealing algorithm,
starting at inverse temperature `beta_i` and stopping at `beta_f`. Beta geometrically
increases, by a factor `alpha` at each step, `burn_in` runs at each temperature.
"""
current_perm = start_perm
beta = beta_i
while (beta <= beta_f):
beta = alpha * beta
out_perm, out_val = metropolis_sample(X, teams, burn_in, current_perm, beta)
current_perm = out_perm[:]
return out_perm, out_val
def simulated_anneal_sample_strategy(X, teams, burn_in, start_perm, beta_i, beta_f, alpha, num_runs):
"""
Return the permutation giving the maximum winning probability after `num_samples`
SA samples.
"""
optimal_perm = start_perm[:]
optimal_val = evaluate_perm(optimal_perm, X)
for t in range(num_runs):
if (t % 5 == 0):
print("Run %d of %d. Current optimal value is %.4f." \
% (t + 1, num_runs, optimal_val))
sample_perm, sample_val = simulated_anneal_sample(X, teams, burn_in, start_perm, beta_i, beta_f, alpha)
if (sample_val > optimal_val):
optimal_val = sample_val
optimal_perm = sample_perm[:]
return optimal_perm, optimal_val
Pardon?!
 
Back
Top