Closed jack89roberts closed 2 months ago
Currently seems to hang at the end of optimisation - probably count_expected_outputs
is wrong somehow.
I think I've fixed one bug with counting the baseline strategy, but it still hangs. The optimisation seems to be running strategies that should be excluded because they take too many hits (0-3-3, 3-0-3) for a test run allowing 3 transfers/8pts hits. If I set max hit to a large value so it doesn't impact things it terminates successfully.
Updates the optimisation code so that:
Up to 5 free transfers can be saved in the logic around computing points hits and dropping strategies that leave transfers unused.
Adds
max_opt_transfers
andmax_free_transfers
to various optimisation functions:max_free_transfers
is the maximum allowable free transfers in the game rules (now 5).max_opt_transfers
is the maximum number of transfers to allow the optimisation to make each week. This still defaults to 2. At the command line the value of--max_transfers
is passed tomax_opt_transfers
.If optimising more than 2 transfers, calls
make_random_transfers
, which uses the value ofnum_iterations
to decide the number of attempts. For the current AIrsenal squad I didn't manage to get anything that beats the brute force 2 transfer optimisation.Fixes a bug in computing free transfers & hit so far for the next strategies in the optimisation tree: See commit https://github.com/alan-turing-institute/AIrsenal/pull/680/commits/be3d6d9da5ab41a692e053ee60c004f6cef452de. I've not fully got my head around this but I believe this is a long-standing bug in AIrsenal that has slipped by unnoticed as it was less likely to cause issues when limited to making 2 transfers. However, I think it could have made AIrsenal under-estimate points hits and therefore more likely to suggest making 2 transfers.
optimize
for updating the tree/next strategies:but
next_week_transfers
itself already callscalc_free_transfers
, so you could incorrectly end up with an extra free transfer available in the strategy.