-
Notifications
You must be signed in to change notification settings - Fork 1
/
solver.run
41 lines (31 loc) · 1.83 KB
/
solver.run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
solve;
printf '#################################\n\n';
printf 'Starting money: %.2f\n', money_avail;
printf 'Money used: %.2f\n\n', sum {b in BOOKIES, m in MATCHES, o in OUTCOMES} money[b, m, o];
printf '############### FIRST BET ###############\n';
printf {m in MATCHES: chosen_match_1[m] > 0}: 'Best match for round 1: %s\n', m;
for {m in MATCHES, o in OUTCOMES: sum {b in BOOKIES} money[b, m, o] > 0}{
printf 'Bookies on %s:\n', o;
printf {b in BOOKIES: money[b, m, o] > 0}: '%s ', b;
printf '\n\n';
}
printf {b in BOOKIES, m in MATCHES, o in OUTCOMES: money[b, m, o] > 0}: 'Money on %10s for %2s: \t%6.2fe | Profit: %7.2fe (%7.2fe are freebets)\n', b, o, money[b, m, o], profit_1[b, m, o], money[b, m, o] * freebets_multiplier[b];
printf {m in MATCHES, o in OUTCOMES: sum{b in BOOKIES} chosen_1[b, m, o] > 0}:
'Potential on %2s = %.2fe\n', o, sum{b in BOOKIES} profit_1[b, m, o];
printf '\n\n';
printf '############### SECOND BET ###############\n';
printf {m in MATCHES: chosen_match_2[m] > 0}: 'Best match for round 2: %s\n', m;
for {m in MATCHES, o in OUTCOMES: sum {b in BOOKIES} rebet_allocation[b, m, o] > 0}{
printf 'Bookies on %s:\n', o;
printf {b in BOOKIES: rebet_allocation[b, m, o] > 0}: '%s ', b;
printf '\n\n';
}
printf {b in BOOKIES, m in MATCHES, o in OUTCOMES: rebet_allocation[b, m, o] > 0}:
'Rebet on %10s for %2s: \t%7.2fe | Profit: %7.2fe\n', b, o, rebet_allocation[b, m, o], profit_2[b, m, o];
printf '\n';
printf {m in MATCHES, o in OUTCOMES: sum {b in BOOKIES} profit_2[b, m, o] > 0}:
'Potential on %2s = %.2fe\n', o, sum {b in BOOKIES} profit_2[b, m, o];
printf '\n';
#printf 'Profit on average:\t%7.2f\n', sum {b in BOOKIES, m in MATCHES, o in OUTCOMES} profit_2[b, m, o] / sum {m in MATCHES: chosen_match_2[m] > 0} ;
# printf 'Worst case profit:\t%7.2f\n',
# printf 'Best case profit:\t%7.2f\n',