ScumBait

This forum is for discussion related to the game.
User avatar
weilawei
weilawei
Townie
User avatar
User avatar
weilawei
Townie
Townie
Posts: 95
Joined: April 27, 2008
Location: Taxachusetts

Post Post #25 (ISO) » Fri May 09, 2008 6:04 pm

Post by weilawei »

To pass a parameter with spaces or other odd things in it, you need to put it in quotes.

Code: Select all

c:\python25\python.exe c:\code\scumbait\scumbait.py -g 7703 -m "Mr. Flay" -tflp all > c:\testaab.txt


You should get a good dump this way. Post numbers and proper names for you tomorrow. (Already in my code, but I'm headed to bed now.)
[size=67]you will birth a god and build an eternal paradise[/size]
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #26 (ISO) » Sun May 11, 2008 11:17 am

Post by Kison »

I've never touched python in my life(until today) but I think I got the post numbers part working :

Code: Select all

def id_of_post(post):
    try:
        body = post.findParent('tr').parent.find('span', 'postdetails')
        return body.contents[2].split(': ')[1].strip()
    except AttributeError:
        return '??'


Seems to work for me.
User avatar
weilawei
weilawei
Townie
User avatar
User avatar
weilawei
Townie
Townie
Posts: 95
Joined: April 27, 2008
Location: Taxachusetts

Post Post #27 (ISO) » Sun May 11, 2008 12:40 pm

Post by weilawei »

Thanks for the code! I'll add it into my source and I might as well do a quick upload since I've fixed some things and made changes.

EDIT: I've uploaded the new version (0.2.1 -- 0.3 will have things working a tad better)

Thanks to Surye for hosting and Kison for getting post IDs working. The next release will be hosted from scumbait.datamachine.net.
[size=67]you will birth a god and build an eternal paradise[/size]
User avatar
kuribo
kuribo
he/him
Fire and Brimstone
User avatar
User avatar
kuribo
he/him
Fire and Brimstone
Fire and Brimstone
Posts: 15467
Joined: August 21, 2007
Pronoun: he/him
Location: the beach, probably

Post Post #28 (ISO) » Mon May 12, 2008 1:19 am

Post by kuribo »

What we need is a Greasemonkey addon!
Join me on my quest to play every NES game! Some of them are awful.

Kuribo's read is foolproof: one night he was high on NyQuil, and he's ancestors reveiled Aureal's alignment to him. - Dessew
User avatar
Max
Max
Mafia Scum
User avatar
User avatar
Max
Mafia Scum
Mafia Scum
Posts: 2280
Joined: April 11, 2006

Post Post #29 (ISO) » Wed Oct 01, 2008 7:20 am

Post by Max »

I presume this is dead in the water?
User avatar
pacman281292
pacman281292
Mafia Scum
User avatar
User avatar
pacman281292
Mafia Scum
Mafia Scum
Posts: 1823
Joined: July 14, 2008
Location: Always V/LA

Post Post #30 (ISO) » Wed Oct 01, 2008 2:59 pm

Post by pacman281292 »

hmm... 4 1/2 months...
*cough*
Show
Current statistics (not counting games previous to June 2010):
Align: W/L/O
Town: 0/1/0
Scum: 1/0/0
Other: 0/0/0
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #31 (ISO) » Wed Oct 01, 2008 4:33 pm

Post by Kison »

I was actually planning on bumping this. Weilawei hasn't been on the site since June and it looks like the original file has expired from flyupload. Luckily(for anyone who cares), I still have it. You can grab it from here.

Not really sure how complete this is anymore as I've not messed with it in a while. I'm not exactly a Python pro, either, but I can try adding to this if people so desire.

Love,

Random Guy.
Last edited by Kison on Thu Oct 02, 2008 4:11 am, edited 1 time in total.
User avatar
Tomato
Tomato
Goon
User avatar
User avatar
Tomato
Goon
Goon
Posts: 425
Joined: April 18, 2008
Location: Israel

Post Post #32 (ISO) » Wed Oct 01, 2008 10:58 pm

Post by Tomato »

weilawei still shows up in IRC fairly often. I'll ask him next time I see him.
MafiascumZuFaul (11:27:19 PM): what is the difference between chuck norris and god?
weedragonaut (11:27:39 PM): one is an overused meme on the internet and the other is an overused meme in real life?
User avatar
weilawei
weilawei
Townie
User avatar
User avatar
weilawei
Townie
Townie
Posts: 95
Joined: April 27, 2008
Location: Taxachusetts

Post Post #33 (ISO) » Fri Oct 03, 2008 12:30 am

Post by weilawei »

I guess I'll start working on this again. I've just been really busy with life, new job, etc. The new version will probably be something close to a rewrite. Don't look for it this weekend though, because I won't be home or have time. I'll try to get something done on Monday.
[size=67]you will birth a god and build an eternal paradise[/size]
User avatar
weilawei
weilawei
Townie
User avatar
User avatar
weilawei
Townie
Townie
Posts: 95
Joined: April 27, 2008
Location: Taxachusetts

Post Post #34 (ISO) » Mon Oct 06, 2008 7:00 am

Post by weilawei »

So, here's a bit of my planning doc, excluding a bit of the more technical details. Feel free to suggest changes or features that would be extensively useful to you. Remember--a lot of advanced things can be built from a combination of querying and formatting output, so anything suggested should go a -long- way.

Code: Select all

ScumBait 1.0 (rewrite)
----------------------

    - read game via backend (forum, irc)
        - backend establishes game as a series of important "bites,"
          which are potentially valuable excerpts for intelligence gathering

    - collect actions
        - mark as "direct"
            a. vote
            b. unvote
            c. nolynch
            c. nightkill
            d. lynch
            e. daykill

        - mark as "claimed"
            a. protected
            b. investigated

        - actions are tagged with
            a. timestamp
            b. direct/claimed
            c. author
            d. target
            e. game id (by database)
            f. move id (by database)

    - save actions to database
        - add in all ID #s and counts (e.g., game, move, post #)

    - accept queries
        - action type (direct, speculative, both)
        - date/time range
            - both real-world time
            - and game time

    - output via frontend templates (html, text, etc.)
[size=67]you will birth a god and build an eternal paradise[/size]
idea
idea
Goon
idea
Goon
Goon
Posts: 177
Joined: October 10, 2008

Post Post #35 (ISO) » Tue Oct 14, 2008 3:57 am

Post by idea »

shaft.ed wrote:Side note, why no Asian chess champs? I thought they were smart or sumtin.
the current world champion is Indian (Viswanathan Anand)

far eastern countries have their own chess variants (shogi, Chinese chess etc)

in China, Japan and Korea the game of choice is go (aka wei qi, igo, baduk), which some claim to be the oldest and most widely played board game in the world
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #36 (ISO) » Thu Nov 06, 2008 11:53 am

Post by Kison »

I have no idea if this is still being worked on as I had vanished right around the time Weilawei posted again, but one of the things that'd have to be looked into is accounting for other moderators taking over a game. Otherwise, things can get a little whacked. Examples: I recall Adel taking over Mafia 78 and Mr. Flay taking over Mafia VS. Wolves Redux despite being players who had perished.

This likely ties into accounting for player deaths. If you can have the script conclude that player X is dead, then seeing player X post again should likely be ignored as far as activity & votes are concerned(with the exception being resurrections, which was the case for MrBuddyLee in Pirates VS Ninjas, and I think a ton of players in Adel's Nightmare game?).

Reason for needing to identify the moderator: I was playing around with this the other day and had plugged in game 8222 and noticed that Mr. Stoofer, the moderator, had a ton of votes spit out in the results. The reason was that every vote count he made was titled
Vote Count
, so the script was seeing this as an actual vote.

For moderators, might be necessary to require the user to input all the mods who have at some point taken over a game. This method would be an issue with the two examples I gave above. The only solution would be to identify the moderators and at which point they became moderators, which would be a bit tedious for those who don't remember.

So,

1) Determine the moderators and at which point they are moderating.
2) Determine when a player dies/resurrects.
3) Link replaced players with their predecessors.

If those three issues could be taken care of, I think this would be a much handier tool.

In another thread there was someone who was worried about not being able to set this up on their system. I made a dinky little page where this can be run: http://scumbait.mine.nu/. Ignore the ads.
User avatar
dahill1
dahill1
bagel
User avatar
User avatar
dahill1
bagel
bagel
Posts: 2798
Joined: March 4, 2008

Post Post #37 (ISO) » Thu Nov 06, 2008 12:54 pm

Post by dahill1 »

Kison wrote:In another thread there was someone who was worried about not being able to set this up on their system. I made a dinky little page where this can be run: http://scumbait.mine.nu/. Ignore the ads.
that is extremely awesome
i see a few tiny errors such as it listing the mod as voting for people, but i think this depends on how the mod setups up the first post/does vote counts. otherwise, :bravo:
User avatar
Vi
Vi
Professor Paragon
User avatar
User avatar
Vi
Professor Paragon
Professor Paragon
Posts: 11768
Joined: June 29, 2008
Location: GMT-5

Post Post #38 (ISO) » Thu Nov 06, 2008 1:00 pm

Post by Vi »

I'm disappointed in the apparent need for players to be able to spell correctly and precisely...
User avatar
xyzzy
xyzzy
they/them
comical third option
User avatar
User avatar
xyzzy
they/them
comical third option
comical third option
Posts: 4970
Joined: April 19, 2007
Pronoun: they/them
Location: northern VA

Post Post #39 (ISO) » Thu Nov 06, 2008 1:14 pm

Post by xyzzy »

Vo

Bi

Vee

Vuy

Vee

Vahee

vhi

IT'S SO HARD
User avatar
Vi
Vi
Professor Paragon
User avatar
User avatar
Vi
Professor Paragon
Professor Paragon
Posts: 11768
Joined: June 29, 2008
Location: GMT-5

Post Post #40 (ISO) » Thu Nov 06, 2008 1:17 pm

Post by Vi »

ogml

ohgodmylife

OhGdMyLife

omgl

Wizardcat

wizcat

wc

Wizrdcat

hasdgfas

hazjasdfa

cow

hascow

etc.

ect.

etc

ectomancer
User avatar
xyzzy
xyzzy
they/them
comical third option
User avatar
User avatar
xyzzy
they/them
comical third option
comical third option
Posts: 4970
Joined: April 19, 2007
Pronoun: they/them
Location: northern VA

Post Post #41 (ISO) » Thu Nov 06, 2008 1:19 pm

Post by xyzzy »

Eh, so the mod has to spend 20 seconds reading the votecount. I don't really see the problem.
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #42 (ISO) » Fri Nov 07, 2008 12:22 pm

Post by Kison »

Weilawei's code is still a bit confusing to me, but I managed to do a few things:

- Fixed(more like sloppily patched) a bug that made players with weird letters like Kaleidoscope break the script. It'll act as if the unidentifiable letters don't exist.
- The 'total activity' for each player summary wasn't displaying proper posts-per-player / total posts. So far they're matching up after I made some changes, though.
- Added a new line that displays how many words a player has posted as well as their average word count per post. Example:
Player Summary for Kison
------------------------
3.4% of total activity (39/1154)
Total words posted: 4646. Average per post: 119.13
--------------------------------------------------
Player Summary for Jitsu
------------------------
8.1% of total activity (93/1154)
Total words posted: 20697. Average per post: 222.55
---------------------------------------------------
Someone earlier in the thread had a graph using word counts. Not sure if I can do that, but I can try sometime later.
User avatar
Mr. Flay
Mr. Flay
Metatron
User avatar
User avatar
Mr. Flay
Metatron
Metatron
Posts: 24969
Joined: March 12, 2004
Location: Gormenghast

Post Post #43 (ISO) » Sat Nov 08, 2008 3:32 am

Post by Mr. Flay »

Surely there's a way to 'escape' the non-ASCII characters? I don't know the language this is written in, but usually additional quotes do the trick.

Having to go hunt down and retype K's name would detract significantly from the usefulness of this...
Retired as of October 2014.
User avatar
Elmo
Elmo
Mafia Scum
User avatar
User avatar
Elmo
Mafia Scum
Mafia Scum
Posts: 3047
Joined: September 7, 2007
Location: happy

Post Post #44 (ISO) » Sat Nov 08, 2008 4:24 am

Post by Elmo »

I keep not bothering to work on this because I rolled my own, but not bothering to finish my own. Joy. If you actually want something done on this, ask me nicely, and I'll procrastinate about it for six months.

I strongly disapprove of the apparent lack of caching on Kison's site. That could be bad if this becomes widely used. (I could be totally wrong about this, but I don't recall any facility for caching when I looked at the code 10541769 years ago.)
Succinctness is pro-town.

Passion is inversely proportional to the amount of real information available. ~ Gregory Benford
User avatar
Kison
Kison
.GIFted
User avatar
User avatar
Kison
.GIFted
.GIFted
Posts: 6714
Joined: January 22, 2007

Post Post #45 (ISO) » Sat Nov 08, 2008 6:03 am

Post by Kison »

Mr. Flay wrote:Surely there's a way to 'escape' the non-ASCII characters? I don't know the language this is written in, but usually additional quotes do the trick.
I've done some more research and found a way to perform different types of conversion(backslash escaping, XML, replace, and ignore). The last two are more along the lines of what I was doing to prevent the script from crashing. When I use the XML conversion method, and run the script on the page, KaleiÃ

Return to “Mafia Discussion”