-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matheus joining City #630
Comments
Hi @alexanderfolstad , thanks for reporting this - very interesting! (Out of curiosity, how does the FPL webpage deal with this? Do you have something on your team page telling you that you need to transfer out one of your City players?) I can reproduce this, and it looks like the update of the PlayerAttributes isn't being saved correctly to the database when we do |
Interesting!
then run prediction and optimization as usual, hopefully it will work... I at least verified that doing
returns 'MCI'. Let us know if this helps! |
Thanks! Giving this a crack.
However, this is the team output after running optimisation: == GK == Aaron Ramsdale (ARS) == DEF == Kyle Walker (MCI) == MID == Eberechi Eze (CRY) == FWD == Julián Álvarez (MCI) === subs === Sam Johnstone (CRY) |
Ah, OK, this might involve a more complicated fix then - perhaps we look for "compulsory transfers" at the start of the optimization process. I can work on this later on today... |
No worries at all! My team ID is 1024117. |
Assuming the issue with the attributes table is now fixed, this is something that the logic in It looks like we disable the number of players per team check when getting the starting squad (I think that's the correct thing to do to get around this), but proposed transfers during the optimisation should be seen as invalid unless they fix the problem with having too many City players. Not sure why that isn't happening. |
I think the problem is that we create the initial squad setting each player's team to be the team they played for at the time the transfer was made. Maybe we should change that to be the player's team for the first gameweek of the optimisation window instead. |
The thing is that when we add players to the squad via the past transactions, we assign a "team" to the CandidatePlayer which is correct when that player was added. One could argue that it would be better for the CandidatePlayer to just have a "player" attribute, that points to a Player instance (and would therefore have all the PlayerAttributes), but I could imagine that being slower and more memory-hungry in the optimization. |
Hi @alexanderfolstad we think we have a candidate fix for this problem in the branch bugfix-630/invalid-team - do you think you could |
Hi,
Thank you so much. Ill give it a try tonight and let you know how it goes!
…On Thu, Sep 14, 2023, 18:35 nbarlowATI ***@***.***> wrote:
Hi @alexanderfolstad <https://github.com/alexanderfolstad> we think we
have a candidate fix for this problem in the branch
bugfix-630/invalid-team
<https://github.com/alan-turing-institute/AIrsenal/tree/bugfix-630/invalid-team>
- do you think you could git checkout this branch, re-run pip install .
and do all the usual steps, and see if it works? (I reckon/hope it should
tell you to remove either Kyle Walker or Nunes...)
We are still thinking about whether there may be a more elegant way of
fixing this problem, but hopefully this branch should at least work...
—
Reply to this email directly, view it on GitHub
<#630 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM7YG5Q5KLD7OEIC74UTLVLX2MW63ANCNFSM6AAAAAA4OSLTXY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Players in: Players out: Josh Cullen Matheus Luiz Nunes Perfect. Thanks so much! |
So Matheus joined City, and has changed teams in FPL. However, AIrsenal does not account for this -- he is still registered as a WOL-player, and as such, does not get traded away - even though I now have 4 City-players.
Any tips on how to resolve?
The text was updated successfully, but these errors were encountered: