Modbot to Help You Run Games: Now With A Votecounter Demo!

This forum is for discussion related to the game.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #150 (ISO) » Sun May 20, 2018 3:21 pm

Post by Psyche »

there's actually so much to do i've felt overwhelmed. instead of trying to make a list i'll just go through things one step at a time.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
davesaz
davesaz
He
Survivor
User avatar
User avatar
davesaz
He
Survivor
Survivor
Posts: 12556
Joined: August 24, 2014
Pronoun: He
Location: Socially distant

Post Post #151 (ISO) » Sun May 20, 2018 4:18 pm

Post by davesaz »

Oh hey I see references to github?
Wanna play Minecraft with your ms friends? Check out the minecraft thread, or the channel on discord
User avatar
tn5421
tn5421
he/him
Mafia Scum
User avatar
User avatar
tn5421
he/him
Mafia Scum
Mafia Scum
Posts: 3000
Joined: March 30, 2014
Pronoun: he/him

Post Post #152 (ISO) » Mon May 21, 2018 12:54 am

Post by tn5421 »

In post 151, davesaz wrote:Oh hey I see references to github?
https://github.com/MafiaScum-Unofficial/modbot
WIP
User avatar
yessiree
yessiree
he
Mafia Scum
User avatar
User avatar
yessiree
he
Mafia Scum
Mafia Scum
Posts: 4349
Joined: June 6, 2013
Pronoun: he

Post Post #153 (ISO) » Mon May 21, 2018 10:57 am

Post by yessiree »

it occurred to me that we could just write batch scripts that run the python files, then WindowsTM users can download the source code with the .bat files, and simply run the batch scripts

this is much much simpler than the whole web app thing with flask

it's worth serious consideration
User avatar
davesaz
davesaz
He
Survivor
User avatar
User avatar
davesaz
He
Survivor
Survivor
Posts: 12556
Joined: August 24, 2014
Pronoun: He
Location: Socially distant

Post Post #154 (ISO) » Mon May 21, 2018 11:44 am

Post by davesaz »

I'd be in favor of easy. Took a look at the github and I can recognize it as code but have not yet grokked how it works. (my server side background is a liability on this stuff lol)

It's not a mod bot item but I'm interested in making something that pulls all the posts in a thread and catches who mentions / references / quotes whom, by post number and/or date. So pulling posts and identifying player names within posts.
Wanna play Minecraft with your ms friends? Check out the minecraft thread, or the channel on discord
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #155 (ISO) » Mon May 21, 2018 11:54 am

Post by Psyche »

it sounds like your purpose with that is for scumhunting or something?
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
davesaz
davesaz
He
Survivor
User avatar
User avatar
davesaz
He
Survivor
Survivor
Posts: 12556
Joined: August 24, 2014
Pronoun: He
Location: Socially distant

Post Post #156 (ISO) » Mon May 21, 2018 12:34 pm

Post by davesaz »

Dunno if it's useful for that, mainly to see what the result looks like. ;)
Wanna play Minecraft with your ms friends? Check out the minecraft thread, or the channel on discord
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #157 (ISO) » Mon May 21, 2018 12:48 pm

Post by Psyche »

we have stuff in the repo that would support that and i can help you figure out how to use it
my vote extractor can probably be altered to find references to users in posts in general, and there's a couple of different versions of post scrapers in the thread
but it's not something we'll likely focus on in the short term since we're focused on modding tools
eventually i'll pivot to the sorts of questions ur interested in
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
davesaz
davesaz
He
Survivor
User avatar
User avatar
davesaz
He
Survivor
Survivor
Posts: 12556
Joined: August 24, 2014
Pronoun: He
Location: Socially distant

Post Post #158 (ISO) » Mon May 21, 2018 1:03 pm

Post by davesaz »

Oh, right didn't expect you to do anything, was just commenting on what i'm thinking of doing. :)
Wanna play Minecraft with your ms friends? Check out the minecraft thread, or the channel on discord
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #159 (ISO) » Mon May 21, 2018 1:20 pm

Post by Psyche »

I'd really like to help, though! I would really like this repo and repos associated with it to help people with diverse goals related to the site.

Here's what I can give you right now:

My VoteExtracter class at the bottom of this notebook: https://github.com/MafiaScum-Unofficial ... nter.ipynb
It's currently designed to only work on stuff around vote tags (or broken vote tags), but the core of its functionality is to discern when a poster is using a mispelling, abbreviation or other reference to a user besides their username. I'll try to fix that up soon so that you have direct access to said functionality.

This notebook here: https://github.com/MafiaScum-Unofficial ... mals.ipynb
Modify start_urls to include the threads you're interested in, and it'll scrape posts super quickly, resulting in a file with all the key information about each post in that thread you'll need

once the VoteExtracter is repurposed, all you'll have to do is scan through each post in each thread you scrape (i'd recommend the threads described here: https://github.com/MafiaScum-Unofficial ... rchive.txt) and register if the repurposed function outputs a playername match or not. It'll be great...
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Flubbernugget
Flubbernugget
Survivor
User avatar
User avatar
Flubbernugget
Survivor
Survivor
Posts: 11751
Joined: June 26, 2014

Post Post #160 (ISO) » Mon May 21, 2018 2:17 pm

Post by Flubbernugget »

In post 153, yessiree wrote:it occurred to me that we could just write batch scripts that run the python files, then WindowsTM users can download the source code with the .bat files, and simply run the batch scripts

this is much much simpler than the whole web app thing with flask

it's worth serious consideration
This is a good idea. One of my big concerns with the web gui interface was that it never seemed like it would make for good UX no matter how good the UI could be done. In the scheme of trying to attract more users to what is now a bit of a "clunky" site that was a bit of an issue. Now instead of trying to spin up a server it's literally just clicking an icon.
User avatar
Flubbernugget
Flubbernugget
Survivor
User avatar
User avatar
Flubbernugget
Survivor
Survivor
Posts: 11751
Joined: June 26, 2014

Post Post #161 (ISO) » Mon May 21, 2018 2:27 pm

Post by Flubbernugget »

In post 119, Psyche wrote:push the code if you want; i have some ideas for figuring out what's wrong
Was there a resolution on this? I don't see anything on the activity overview as a github issue, but it was a bit of an upper bound anyway.
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #162 (ISO) » Mon May 21, 2018 2:56 pm

Post by Psyche »

i haven't had the chance to do as much work on the modbot project as i wanted to this weekend
i should be free for a bit after making a meeting this tuesday afternoon, and plan to focus it all on the bugs that have come up in the thread lately
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
yessiree
yessiree
he
Mafia Scum
User avatar
User avatar
yessiree
he
Mafia Scum
Mafia Scum
Posts: 4349
Joined: June 6, 2013
Pronoun: he

Post Post #163 (ISO) » Thu May 24, 2018 9:49 am

Post by yessiree »

pull requests don't age like wine
User avatar
tn5421
tn5421
he/him
Mafia Scum
User avatar
User avatar
tn5421
he/him
Mafia Scum
Mafia Scum
Posts: 3000
Joined: March 30, 2014
Pronoun: he/him

Post Post #164 (ISO) » Thu May 24, 2018 11:47 am

Post by tn5421 »

In post 163, yessiree wrote:pull requests don't age like wine
WIP
User avatar
yessiree
yessiree
he
Mafia Scum
User avatar
User avatar
yessiree
he
Mafia Scum
Mafia Scum
Posts: 4349
Joined: June 6, 2013
Pronoun: he

Post Post #165 (ISO) » Sun May 27, 2018 11:18 am

Post by yessiree »

cool. I see stuff being merged in.
In post 160, Flubbernugget wrote:
In post 153, yessiree wrote:it occurred to me that we could just write batch scripts that run the python files, then WindowsTM users can download the source code with the .bat files, and simply run the batch scripts

this is much much simpler than the whole web app thing with flask

it's worth serious consideration
This is a good idea. One of my big concerns with the web gui interface was that it never seemed like it would make for good UX no matter how good the UI could be done. In the scheme of trying to attract more users to what is now a bit of a "clunky" site that was a bit of an issue. Now instead of trying to spin up a server it's literally just clicking an icon.
i have the POC for this ready so will probably polish it then send it for review some time tomorrow
basically, as a user, you just need to:
1) download python
2) download the source code of this repo
3) change some settings in a text-based configuration file, such as thread url, username, pw, etc...
4) click on a .bat file to run a specific feature of donbot
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #166 (ISO) » Mon May 28, 2018 11:14 am

Post by Psyche »

That's a lot, though!
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #167 (ISO) » Mon May 28, 2018 11:37 am

Post by Psyche »

Ok, so let's take a step back for a moment. The UI for my flask strategy isn't good, and probably won't ever be super good. How can we make using my app an easier and more seamless experience but avoid maintaining some external server?

In my mind, and it pains me to say this, the most definite way to do this would be to translate our code base into JavaScript.
If we do that, the backend is totally taken out of the equation.
With a little extra work we can minimize the frontend too by putting everything into a much-easier-to-install browser extension that directly interacts with whatever thread a game moderator has open at the moment

I'm trying to think about an alternative product we can create for mobile users, but I'm sure we can think of something - a static network of webpages hosted on github at worst.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #168 (ISO) » Mon May 28, 2018 11:54 am

Post by Psyche »

Translating the code would be challenging, but perhaps not as challenging as you'd think.
There exists out there a variety of tools for translating Python code into Javascript code automatically, and I've found them pretty neat to use.

The big difficulty with them, though, is that in cases where we rely on Python modules to get work done, we will usually have to find an alternative Javascript library to support our work. Even in this case, we will still be able to do our coding work in Python if we want to - I believe that it's Brython that lets us write stuff in Python depending on Javascript libraries without much difficulty (but I might be wrong).

What'll happen, though, is that sometimes the js package we need either doesn't exist or outputs results in a somewhat different way than the original python module we were used to. So we'll have to modify our code to adapt to these circumstances.

The only place where I think this will be a substantial challenge is for my votecounter, as it relies in part on at least one pretty obscure module (this one: https://github.com/rfk/pyenchant/blob/m ... t/utils.py) that I probably won't find *quite* the same anywhere else. We'll have to also find something to replace our dependency on the requests and lxml packages, but some initial research suggests we have loads of options.
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
User avatar
davesaz
davesaz
He
Survivor
User avatar
User avatar
davesaz
He
Survivor
Survivor
Posts: 12556
Joined: August 24, 2014
Pronoun: He
Location: Socially distant

Post Post #169 (ISO) » Mon May 28, 2018 11:58 am

Post by davesaz »

Would it help if the "server" part was integrated right into the site?
I don't know if that's possible, just asking...
Wanna play Minecraft with your ms friends? Check out the minecraft thread, or the channel on discord
User avatar
yessiree
yessiree
he
Mafia Scum
User avatar
User avatar
yessiree
he
Mafia Scum
Mafia Scum
Posts: 4349
Joined: June 6, 2013
Pronoun: he

Post Post #170 (ISO) » Mon May 28, 2018 12:04 pm

Post by yessiree »

I foresee some limitations but JS is my main language so im for it

also
In post 51, yessiree wrote:have you considered Node.js?
if there's a python package there's most likely an NPM equivalent
User avatar
yessiree
yessiree
he
Mafia Scum
User avatar
User avatar
yessiree
he
Mafia Scum
Mafia Scum
Posts: 4349
Joined: June 6, 2013
Pronoun: he

Post Post #171 (ISO) » Mon May 28, 2018 12:09 pm

Post by yessiree »

In post 169, davesaz wrote:Would it help if the "server" part was integrated right into the site?
I don't know if that's possible, just asking...
it's definitely possible, but it wouldn't benefit the average user at all, as it would only be useful for developers. So there isn't much value for something like that, especially given they are already short on resources, and the migration is probably the highest priority anyway
User avatar
davesaz
davesaz
He
Survivor
User avatar
User avatar
davesaz
He
Survivor
Survivor
Posts: 12556
Joined: August 24, 2014
Pronoun: He
Location: Socially distant

Post Post #172 (ISO) » Mon May 28, 2018 12:19 pm

Post by davesaz »

I was under the impression that the need for switching out of python was because a user of the bot needs a server. Did I miss something?
Wanna play Minecraft with your ms friends? Check out the minecraft thread, or the channel on discord
User avatar
yessiree
yessiree
he
Mafia Scum
User avatar
User avatar
yessiree
he
Mafia Scum
Mafia Scum
Posts: 4349
Joined: June 6, 2013
Pronoun: he

Post Post #173 (ISO) » Mon May 28, 2018 12:26 pm

Post by yessiree »

I dont know what you're confused on so idk what to say
User avatar
Psyche
Psyche
he/they
Survivor
User avatar
User avatar
Psyche
he/they
Survivor
Survivor
Posts: 10052
Joined: April 28, 2011
Pronoun: he/they

Post Post #174 (ISO) » Mon May 28, 2018 12:27 pm

Post by Psyche »

I have another idea, but it's kind of weird.
There's now a google docs for iPython notebooks, you see: https://colab.research.google.com/noteb ... come.ipynb
The big sell of these is that they enable realtime collaboration on iPython notebooks across the web, but we could *potentially* also use the runtimes that come with these notebooks to eliminate the need for any backend for our apps.

Unlike the static notebooks you've seen so far from me, there's *loads* of flexilibity we have when deciding what a dynamic one will look like.
we can hide code (or replace them with forms), we can intermix python with HTML and Javascript to produce interactive interfaces, and a lot more, all triggered once a user clicks play on the relevant cell
the result is that they can get all the functionality our code offers just by going to a link much like the one above, and we have a lot more tools to make the experience of accessing all that cleaner

some other cool features:
- code you start running from the notebook will keep running even if you close your browser window
- notebooks can be used on smartphones and similar mobile devices
- much easier transition from adding functionality to Modbot to having a client-side tool for using it (your notebook literally is the app!)

one thing currently kills this idea, though:
the virtual machine that get assigned to you when you start this notebook has a maximum lifetime enforced by the system (i'm not sure exactly how long it is - maybe a few hours?)
this means bots that are supposed to just work for hours and hours in the background will eventually be stopped after a certain amount of time running
i think this issue can be resolved with a simple chrome extension (one i believe already exists in the chrome store) that automatically restarts the server when this happens and resumes operation
an alternative is to have users interested in immortal bots set up their own local runtimes that will never expire. This creates the same ugly situation we have with my flask app, though.
finally, we can measure the maximum lifetime a runtime can have, and have our notebooks send reminders to users about their pending deaths to hurry and save them.
but i think a chrome extension would work!

there are other challenges of course
- connecting to a google cloud runtime and setting up a virtual server to run our app would take time - i'm not sure how long, especially if we work to keep our modules dependency-lite, but right now just connecting to the runtime seems to take ~5 seconds
- you guys don't have any experience with jupyter, i think (or frontend languages?)
youtube playlist extracter | donbot | game scraper | vca | setupsim | strategist | llm
Post Reply

Return to “Mafia Discussion”