Page 1 of 1

Ant Tag Weighting workshop thread

Posted: Sat Mar 18, 2023 7:56 pm
by BatElite
This might get mathsy

So the weighted antag picker has been out of commission since mid 2020 (technically, it's around but set to roll "pick random player" 100% of the time)

But randomness is a fickle mistress and frankly I don't like it much. I barely trust the RNG to make a decent mining level, let alone distribute antag rounds in a way that feels fair.
I'm looking at the code and while I don't know how the API stuff works, here's how the picker works:

Code: Select all

For a single antag role and a pool of ckeys with the role enabled,
the picker calculates the percentage of antag picks versus rounds
connected to the lobby ("rounds_seen", not "rounds_participated")
The ckey's weight is that + some more math that I think is the same for all?
It'll add each ckey into a list sorted by those weights, descending
Players that have never been selected but are eligible get top priority

Then, for however many antags of that role need filling, it'll take
the first/next ckey in the sorted list and roll a chance to pick randomly
(currently 100%, but 10% prior to disabling)
if it doesn't pick randomly, it'll add the ckey it took instead.

Mixed will repeat this process for every antag type it's determined randomly.
A note: as best as I can tell antag picking occurs before jobs are distributed, so jobs that can't roll an antag shouldn't factor into the above

The (potential) problems are as follows (thanks in part to past pali on the PR disabling it):
-Because the system picks the first (highest) n ckeys sorted by weights, all that matters is whether you're at the top of the list. The only randomness involved was the 10% fuck you chance.
-Just making it to the lobby is enough to count?? The hell??
-The system doesn't account for how many rounds the player was actually eligible. Turning off antag roles for a while will count rounds towards your totals, so then turning them on again will land you several picks in a row. I've experienced this effect firsthand.
-As someone plays more rounds, the influence of one antag pick has less effect on their percentage


So the question is, do we want antag picking to accomplish?

-Some folks are going to play more rounds than others, and naturally they'll get more antag rounds as a result. Do we want to compensate for this at all?
-Do we want to cap the amount of antag rolls someone can get in a row?
-How far into the past do we want to care? Total history looks to be flawed, but do we just care about rounds since last pick or should we look farther back than that?
-Do we want round performance to influence future weights? Like completing objectives gives you a tiny nudge up in the future. (this is probably a great or a terrible idea, no in between)
-I can't tell if the database records picks per antag type or if the selected/seen percentage is based on all rounds and antags, but would we want to track those separately?
-Should some game modes affect your ongoing weights differently than others?

Re: Ant Tag Weighting workshop thread

Posted: Mon Mar 20, 2023 5:41 am
by BatElite
Sudden thought but what if antag weighing involved trying to spread out picks across jobs?

Feels like some jobs get fairly few traitor picks and so their job gear never really shows up (geneticist, roboticist, janitor, and in particular chef) while others get a ton by virtue of having lots of slots (engineer/scientist)

Re: Ant Tag Weighting workshop thread

Posted: Mon Mar 20, 2023 10:20 pm
by warc
BatElite wrote: Mon Mar 20, 2023 5:41 am Sudden thought but what if antag weighing involved trying to spread out picks across jobs?

Feels like some jobs get fairly few traitor picks and so their job gear never really shows up (geneticist, roboticist, janitor, and in particular chef) while others get a ton by virtue of having lots of slots (engineer/scientist)
this idea slaps actually.
I think overall we should tune for a system that feels varied and interesting over one that is "fair".
I think having the system try to pick like, "teams" of traitors and shit by putting them in the same department would be a fun addition, as well as just cycling and ensuring we get antags in a bunch of different depts round to round