Browser Extension Vote-Counter (early demo)
-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
Had no idea that was even an option lmaoIn post 124, yessiree wrote: submitted another PR for some refactoring
one of them is using "view=print" mode when scraping posts, which should drastically speed up votecount generation since it potentially reduces the response payload size by over 90%! (from over 1 MB to ~40 kB per request)
Looked over the PR and merged it-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I am now able to work on this again with my computer fixed, I will be adding minor changes and then will be testing/compiling/releasing the new version.
Which Aureal's issues should be fixed in (thanks again yessiree <3 )-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
The new version with the fixes (and quote highlighting ig) has been compiled and can be downloaded here-
-
yessiree heMafia Scumhe
- Mafia Scum
- Mafia Scum
- Posts: 4397
- Joined: June 6, 2013
- Pronoun: he
what are we cooking next? what's on your radar atm-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
i have a suggestion!
a vca toolYou can't step in the same river twice.-
-
yessiree heMafia Scumhe
- Mafia Scum
- Mafia Scum
- Posts: 4397
- Joined: June 6, 2013
- Pronoun: he
something more tangible and less grandeur-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
well i actually think it's a natural extension of the votecounter. mvp is presumably just generating more than one votecount and assigning font colors to namesYou can't step in the same river twice.-
-
yessiree heMafia Scumhe
- Mafia Scum
- Mafia Scum
- Posts: 4397
- Joined: June 6, 2013
- Pronoun: he
would it really need to be a "votecount" though, as in a snapshot of all votes at a given time, since the underlying data would just be a collection of votes-
-
yessiree heMafia Scumhe
- Mafia Scum
- Mafia Scum
- Posts: 4397
- Joined: June 6, 2013
- Pronoun: he
i guess that begs the question actually: what data format would be best suited to run vca or any kind of analysis on voting behaviors-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
yeah its a very interesting questionYou can't step in the same river twice.-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I very rarely delve into VCA so the extent of what I'd do right now if I work on it is to have two options. One which sees votes in relation to the gamestate itself and then one slot in relation to itself.
In relation to the gamestate is to see generated votecounts with a particular frequency (either by time, amount of votes, or amount of total posts) and just colour the known alignments. Formatted in a super condensed way (as it's a pretty large chunk of data at a time).
In relation to themselves would be to see a list of their vote progression, which would show data like time between votes and coloured so you can see data in regards to a single player-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I have no idea how legible that post is-
-
Thestatusquo He/HimSheaHe/Him
- Shea
- Shea
- Posts: 14372
- Joined: July 27, 2006
- Pronoun: He/Him
- Location: Chicago!
I am pretty leery of a tool that steps over the line from just showing players information about the current game state into the realm of helping players play the game (i.e. doing data analysis.)tout comprendre c'est tout pardonner-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
It's not doing the analysis though, just making the analysis less tedious to set upIn post 138, Thestatusquo wrote: I am pretty leery of a tool that steps over the line from just showing players information about the current game state into the realm of helping players play the game (i.e. doing data analysis.)-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
feel like a tool that collects votes across a thread and puts them in one place is still the "showing players information about the current game state" space but yeah the frontier approachesYou can't step in the same river twice.-
-
Thestatusquo He/HimSheaHe/Him
- Shea
- Shea
- Posts: 14372
- Joined: July 27, 2006
- Pronoun: He/Him
- Location: Chicago!
It's a tricky line I think.In post 139, JacksonVirgo wrote:
It's not doing the analysis though, just making the analysis less tedious to set upIn post 138, Thestatusquo wrote: I am pretty leery of a tool that steps over the line from just showing players information about the current game state into the realm of helping players play the game (i.e. doing data analysis.)tout comprendre c'est tout pardonner-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
Another option is to try making the votecounter more powerful!
Have been gradually building a tight pool of test cases for votecounters based on examples from games I scraped years ago.
Wonder if your matcher can correctly match the vote in this post without manual aliasing:
Spoiler:
Here's code with the playerlist and HTML of the relevant fragment of the post:
Code: Select all
def test_match_vote_by_abbreviation(): """ Tests that a vote for a player by abbreviation is counted. Relevant phases: 1098, D1: https://forum.mafiascum.net/viewtopic.php?p=2695031#p2695031 """ players = ['EmpTyger', 'Nul', 'Substrike22', 'Llamarble', 'Pinewolf', 'Amor', 'Scott Brosius', 'Internet Stranger', 'themanhimself', 'Guderian', 'RobCapone', 'Shattered Viewpoint', 'chkflip', 'WeirdRa', 'brokenscraps', 'Kingcheese'] post_content = '<span class="bbvote" title="This is an official unvote.">UNVOTE: Amor</span><br><span class="bbvote" title="This is an official vote.">VOTE: TMHS</span>' votes = list(VoteParser(players).from_post(post_content)) assert votes[-1] == 'themanhimself'
A simple distance metric seems to prefer to match TMHS to a different slot, such as Amor.You can't step in the same river twice.-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
There’s no way tmhs is getting corrected to “themanhimself” as it currently works-
-
Random Nurse He/HimMafia ScumHe/Him
- Mafia Scum
- Mafia Scum
- Posts: 2836
- Joined: April 29, 2023
- Pronoun: He/Him
Where are we at currently with this votecounter?
Is a practical version available to be used in future game?-
-
Psyche he/theySurvivorhe/they
- Survivor
- Survivor
- Posts: 10889
- Joined: April 28, 2011
- Pronoun: he/they
Right!
A key problem with this example is that TMHS's name doesn't have punctuation one could use a shortcut to match the acronym. You need something that knows enough english to predict how people might carve a username like "themanhimself" into units for an acronym. I've found that there's just enough knowledge in a basic dictionary to pull this off most of the time.
I used a spell-checking library called enchant.
It initializes with a dictionary and returns a boolean based on whether your string appears in the dictionary.
A function I made called "english_divides" considered every possible substring of each player's username and checked whether the substring was an english word or not, and stored every possible segmentation of the player's username based on english-word boundaries.
This also allowed for nonsense strings to occur in a segmentation.
For example, a username like "pprtown" might have among its splits '["ppr", "town"]'.
I could use these segmentations to propose candidate abbreviations. For example, the above segmentation could suggest an abbreviation of "pt" or "ptown".
From there, looking for exact or near matches among abbreviations generated from the most conservative segmentations (fewest separate chunks) while also minding the possibility of ambiguous abbreviations could consistently assign a broad swath of votes like TMHS -- and even reasonable typos I wasn't even intending to cover.
All this seems just as doable in a typescript project -- if it's worth doing. Things do get messy pretty quickly when you try to account for edge cases.You can't step in the same river twice.-
-
Thestatusquo He/HimSheaHe/Him
- Shea
- Shea
- Posts: 14372
- Joined: July 27, 2006
- Pronoun: He/Him
- Location: Chicago!
Its functional right now I believe.In post 144, Random Nurse wrote: Where are we at currently with this votecounter?
Is a practical version available to be used in future game?tout comprendre c'est tout pardonner-
-
Random Nurse He/HimMafia ScumHe/Him
- Mafia Scum
- Mafia Scum
- Posts: 2836
- Joined: April 29, 2023
- Pronoun: He/Him
In post 146, Thestatusquo wrote:
Its functional right now I believe.In post 144, Random Nurse wrote: Where are we at currently with this votecounter?
Is a practical version available to be used in future game?
Nice.
So say I set up a Normal game.
Where do I go to start implementing it, please?
I'm eager to get some games going with this.-
-
yessiree heMafia Scumhe
- Mafia Scum
- Mafia Scum
- Posts: 4397
- Joined: June 6, 2013
- Pronoun: he
For votes with ambiguous targets, I lean more towards flagging them to be checked manually rather than trying to parse the intended target using NLP. Reason one is that configuration (usernames, aliases and replacements) are needed for each game anyway, reason two is that if the string parsing algo is not 100% accurate, you dataset ends up with some incorrect data, and reason three - NLP is hard!
I imagine the process would be like
- configure basic settings (usernames, replacements, common aliases, etc) for games from which to collect data
- collect votes -> get a list of votes + a list of flagged votes
- go through the flagged votes one by one and add aliases as necessary
- repeat step 2 until you have no more flagged votes-
-
JacksonVirgo they/himSurvivorthey/him
- Survivor
- Survivor
- Posts: 13491
- Joined: October 29, 2019
- Pronoun: they/him
- Location: ɐılɐɹʇsn∀
I don’t think I do anything with the flagged names at the moment, that would be the next best thing for me to work on personally
Copyright © MafiaScum. All rights reserved.