alan-turing-institute / AIrsenal

Machine learning Fantasy Premier League team
MIT License
296 stars 86 forks source link

airsenal_make_squad --algorithm genetic failing to generate valid squads #372

Closed jack89roberts closed 3 years ago

jack89roberts commented 3 years ago
❯ airsenal_make_squad --algorithm genetic --population_size 100 --num_generations 100 --budget 100 --num_gw 1
Best score: -0.0 pts
GK Hugo Lloris TOT 5.5
GK Hugo Lloris TOT 5.5
DEF Çaglar Söyüncü LEI 5.0
DEF Jan Bednarek SOU 4.5
DEF Tyrone Mings AVL 5.0
DEF Willy Boly WOL 5.0
DEF Vladimir Coufal WHU 5.0
MID James Milner LIV 5.0
MID Curtis Jones LIV 5.0
MID Ryan Fraser NEW 5.5
MID Phil Foden MCI 8.0
MID Adam Lallana BHA 5.5
FWD Danny Ings SOU 8.0
FWD Jamie Vardy LEI 10.5
FWD Kelechi Iheanacho LEI 7.5
£0.0m in the bank
Traceback (most recent call last):
  File "/Users/jroberts/opt/anaconda3/envs/airsenalenv/bin/airsenal_make_squad", line 33, in <module>
    sys.exit(load_entry_point('airsenal', 'console_scripts', 'airsenal_make_squad')())
  File "/Users/jroberts/GitHub/AIrsenal/airsenal/scripts/squad_builder.py", line 119, in main
    points = best_squad.get_expected_points(gw_start, tag)
  File "/Users/jroberts/GitHub/AIrsenal/airsenal/framework/squad.py", line 361, in get_expected_points
    raise RuntimeError("Squad is incomplete")
RuntimeError: Squad is incomplete
jack89roberts commented 3 years ago

Just caused by me defining a budget of £10m (100) instead of £100m (1000).