Right, the donbot module I've started makes it so you don't have to know how to automate operations on the forum in order to do it - you just import the module and start using its API. A detailed guide on how to do that is here:
https://github.com/MafiaScum-Unofficial ... demo.ipynb
The module is definitely incomplete (I already want to change some things about getPosts() and probably need to add an editPost() function), but the tutorial covers everything donbot currently does. Please let me know if it's not straightforward to read!
***
I haven't set up any perfect testing environment anywhere for donbot. There's a test post thread in the Help! subforum, this thread is pretty friendly, and I've already tested a lot of these functions myself, but if you want a clean thread to test your own inventions at, you're on your own at the moment.
***
more on what's coming soon:
The votecounter I developed was written a long time ago and wasn't written especially well, so I'm rewriting it to some extent. It's elaborate in the bad sense of the word, and I don't remember how some parts of it work.
But with so many votecounters already going around, what should be of most interest to a lot of people here is the votecounter tester. The gist of it is that it tests how reliably your votecount can correctly figure out who got lynched D1 across a range of 300 Mini Normal games drawn from this archive here:
viewtopic.php?f=53&t=29549 .
an initial idea of I expect the final product to work is like this:
1) You pass to the tester a function that
takes
a player slot list and a post dictionary variable (much like an element of what is output from Donbot's getPosts() function) as parameters and
returns
a list comprising the sequence of slots from the input slot list it believe were voted for in the input post.
2) the tester applies the function to each successive post in a game, maintaining a simple votecount as it iterates. Once the votecount shows that a slot is being voted by a majority of players (or once every post in the thread has been cycled through), that slot is treated as the Day's lynch.
3) if who your votecounter says is the Day's lynch matches what the archive says is the Day's lynch, then your votecounter has succeeded for that thread. Otherwise, it has failed.
4) the votecount tester returns the success rate of your votecounter as well as information about how your votecounter processed each thread, including:
- whether the votecounter succeeded or failed for that thread
- what the votecounter's final votecount was
- the sequence of votes that the votecounter detected in that thread until it found a lynch, including the post# of each vote and who voted for whom
That should be enough to help you understand where your votecounter succeeds and fails so you can make changes.
The set of games that'll be looped through and its associated archive have been thoroughly cleaned and processed already to only include games where someone got lynched D1 and you can infer who got lynched D1 by counting votes this way. Obviously, to discern if a no lynched happened, or if someone's a doublevoter, or if someone died N0, you need more just than a votecounter to figure out how D1 ended (eg something that understands mod posts).
but hopefully i'll wait until my workweek is over before moving forward on this