-
Notifications
You must be signed in to change notification settings - Fork 54
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
Better rating logs #367
Better rating logs #367
Conversation
Hmm, I see some issues with this. |
We wouldn't rerate all matches. The mix task is just there for testing and making sure the rating function hasn't broken. We would not run the mix task in production. So the use case is say Marek creates a new balance algorithm and it is then deployed to production. Someone uses it and gets a weird result. Or even someone uses split_one_chevs and gets a weird a result. To understand what went wrong I need the data at the time. So I would ask them to give me the url corresponding to the match e.g. then I would go to the balance tab and select the appropriate balance algorithm so I can inspect what happened. This would pull information from past data so it runs exactly how it would have run in the past. My balance algorithm looks at rank. So I need to know what was your rank in the past. We currently don't store that information. At minimum I want to store rank for my own balance algorithm and examine if I get weird results. I could remove playtime, spectime from the logs since I don't use it. As an example say I want to check how my balance algo worked in the past I see below. Note that if there was a player who was one chev in the past but is now three chev, I don't get the correct information since their rank was not stored and I just pull their current rank. Ideally the "Based on data at the time" section pulls past data. |
Ah I see. So this would only be useful for future matches? |
Yes just future matches. |
Context
The purpose of this PR is to add more information into rating logs (
teiserver_game_rating_logs
) so that we can run balance algorithms using past information. Currently we store the following information in rating logs:My split_one_chevs algo also looks at rank, and Marek's algo looks at playtime.
https://discord.com/channels/549281623154229250/1262186207673192530/1263880002563346463
When we run a balance algorithm on a past match, it should ideally pull information from the rating logs table to get data at the time of the match.
Improvements
This PR will add the following information to rating logs whenever a match is rated
Testing locally
Run the following task replacing with the username of a user.
This will re-rate all the matches of a single user.
Open up some sort of database viewer and check that the rating logs have new information (replace 'spadsbot' with the name of the user you want to look at)
Check that the value column has new fields (rank, play_hours, spectator_hours) e.g.
Login to the website and select a match. View the balance tab. Change the dropdown to split_one_chevs and ensure it doesn't crash. It will pull past data from the
teiserver_game_rating_logs
table if possible