-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add match making and improve match interactions #18
base: master
Are you sure you want to change the base?
Conversation
For getting the team that won, the server could save the team that won for 5-10 mins after the game ends so that once people click gg in fang, it can make a request for the outcome of the game. I dont know how the server can find out who won the made I know @Acoliver102 was talking to me about it in dms. |
I might also add the ability for fang to take in a file that just has the winnings and loosing built into them so we don't have to start from scratch. We could make it so that each line looks like this (the player tag would be discord snowflake of each person)
It could just take the first half of the players, count them as the winning and make the rest the loosing. |
It also looks like servers can tell who won by running this regex |
I also cant get dotnet working on my device so I wont be able to add a way for the server to check for who won. I believe BigBoot/GiganticEmu/GiganticEmu.Agent/ServerManager.cs#L25 is a way to access the logs so there would just have to be some function that applys the above regex to it. If @Acoliver102 want to try and implement that you can, then I could add the way for fang to actually ask the server for that info. The way for fang to ask for the data should be like a result endpoint or something that returns an object / class. This is because there could be some other info that we might want to send to fang for logging reasons. |
I have also gotten the results of ~400 games from october/november to early may. I have converted it to 285 games. I will get a local version of fang to run the numbers and see if the teams it comes with are actually usable or give something playable. |
Just played 2 games with the teams that the bot gave and they were pretty good. I think this could actually work and make match making better. |
Hi, first of all thanks for you continuous efforts, even though I've been mostly unavailable, would you be interested in collaborator access to the repo so you can get your changes in faster? As for this MR the general directions already looks great, here's some of my thoughs:
I don't think it will be that easy, I haven't been able to redirect the stdout/stderr of the game while keeping the window hidden back then (and I don't have access to a windows machine currently where I could test this). That's why I read the log file in the ye olden days. But even there the game behaves weirdly and only write the log changes when it detects another program opening the file so I had to keep reopening the file in a loop, which then led to e.g. svens infamous feet problems 😆 I'm not sure what the best course of action would be here though. 🤔
I'm not sure why it shouldn't work, dotnet should be available basically everywhere I think, you just need to make sure you're installing the correct version (dotnet 6) including the aspnet runtime |
Hello, hope you are doing good!
Since you still hosting fang, I don't know if much would change as you would still have to manually update fang. If you setup some script on the hosting device to automatically pull the changes from the GitHub then it could be beneficial. With all of the points you said, I do agree with them and will try and get those working in the end.
Since the way I am thinking of currently implementing this where fang is only going to send one request to the server. We wont need to continuously reopen the file. We should only have to read the log once. If we are going to have to read the log manually then we could also use the built in timestamp at the end of the log. That should make it so that if the game does not actually go through it wont count the game as the most previous log would be too old.
I don't know if you have ran into this issue, but I use a custom built Linux kernel and dotnet really has no idea what to do. It tries and download the version that my system needs, but because it does not recognize what I am it tries and downloads the default (the windows version). @Acoliver102 can build the agent and they might try and do the changes. I dont know how much time they will have to work on it, but I do have a windows VM if it takes him a while. |
#16 might not be needed because of this, but I am just going to keep it there just in case. |
I believe everything that bigboot said should be implemented is implemented. The only one I did not explicitly code is |
Some new players got confused in testing becaues they had to go to team 2 but there was only a ?team=0 and ?team=1
Sense I am not a collaborator on |
Also for record keeping, tldr Bigboot feels that these changes should be handled in gig emu and it will use the GiganticEmu.Launcher to know the players then GiganticEmu.Web to handle the actual ratings. If you got it fully right fang is going to send something to tell the servers that the game was ranked or not then the servers will report to GiganticEmu.Web to with the scores. |
I am changing the scope of this pr to add ratings and just make the matchmaking system better all around. |
This is my current checklist
|
Maybe a ready check is not needed in the bot, its not done that often. |
@BigBoot This is the way I think this should work as it wont require people to link your mistforge account with discord. It will allow people to create swaps and request for a fill allowing for pretty much every way that the teams could change. |
This is a work in progress pull request to try and implement some sort of match making. This is also in the works with @Acoliver102
Currently the plan is to use
Glicko2
to get the rating of user.Once the rating of a user is in the database we will use a version of the knapsack-problem to create the teams. There is a minimal function to create these teams to try and be as balanced as possible at https://pl.kotl.in/Cij84blms. For 10 players the amount of lists that will have to be made is
600
((n/2)!*n/2
). This should be fast to compute and will give us the closest the teams can be skill wise.The plan is to try and have some way for servers to know what team won and will report back to fang what team won. Fang will store the teams it made internally allowing for fang to automatically update the scores of users without anyone having to run a command. There might also be a command telling fang to not update the scores for the current game because teams will be played that are are not the fang recommended teams.