Thursday, December 17, 2009

Automatic vote counter

Blognomicbot is finally getting new features. I’ve added an automatic vote counter to it (it knows all the core rules to do with voting, e.g. self-kills, CoV, deferential, etc):

<CallForJudgement> !votes fiat_lux
<blognomicbot> SELF-KILLED! FOR: Oze, Darknight, Bucky, Scaramouche, Ienpw III, Josh, NoOneImportant, SingularByte, Kevan; AGAINST: ais523, Darth Cliche, Hix, spikebrennan; (unresolved) DEFERENTIAL: Wakukee, digibomber [9-4-2]. Uncounted votes: ais523 (for), Darth Cliche (for), spikebrennan (for).
<CallForJudgement> !votes timeframe_fix
<blognomicbot> FOR: Nausved, Darth Cliche, Wakukee, Qwazukee, Darknight, Apathetic Lizardman, Ienpw III, NoOneImportant, Josh, SingularByte, Ornithopter, spikebrennan, alethiophile, TrumanCapote + (deferential) Kevan; AGAINST: Oze [15-1].

So if you need a quick vote summary, just get on IRC!

Some notes:

  • The vote count listed is FOR-AGAINST (or FOR-AGAINST-unresolved DEFERENTIAL).
  • Deferential votes are marked according to what the Djinn voted; if the Djinn himself voted deferential, all deferential votes (including his own) become unresolved.
  • Deferential votes are moved into the FOR or AGAINST section as required, but are marked separately from definite votes.
  • A vetoed or self-killed proposal will be marked as vetoed or self-killed, but the bot will then go on to count the votes anyway.
  • Uncounted votes are listed as well as counted votes, but at the end; a vote might be uncounted because a voter changed his vote, or because the author’s implicit FOR was overriden by an explicit FOR, or because a voter repeated a vote and only one counts.
  • The author’s implicit FOR is listed exactly the same way an explicit FOR would be; it isn’t marked separately like deferentials are.
  • The name you must give to the bot is the URL title of the proposal (what’s entered into the “URL title” box in BlogNomic); you can find this out by hovering a link to the proposal and looking in the status bar, or by looking at the address bar when on the proposal page.

Comments

Klisz:

17-12-2009 19:19:41 UTC

for  for  for  for  for  for  for  for  for  for  for  for  for  for  for  for  EPIC WIN

NoOneImportant:

17-12-2009 19:54:52 UTC

“I am detecting high amounts of win in this sector”

Bucky:

17-12-2009 20:38:30 UTC

Do you need to change the Djinn’s identity manually at the end of the dynasty, or does it do that automatically too?

ais523:

17-12-2009 20:40:04 UTC

Manually atm; it shouldn’t happen often enough to be a burden. (Note that it can’t retroactively calculate proposals in previous dynasties with the correct Djinn; instead, it’ll use the current one.)

spikebrennan:

17-12-2009 20:41:02 UTC

for  imperial  against

spikebrennan:

17-12-2009 21:01:55 UTC

As long as you’re coding, another potentially interesting project:

A database could be constructed of all dynasties in the Modern Era (that is, dynasties where the proposals are still accessible).  It would, then, in theory, be possible to track a given Blognomic participant’s voting record on proposals posted by another given Blognomic participant.  One could say: “of all proposals ever made by X, how many passed/how many failed (including how many self-killed)/how many were vetoed”, and “of all proposals ever made by X in which player Y voted, what proportion of the time did Y vote “for” vs. “against”.

Ornithopter:

17-12-2009 23:43:52 UTC

Yaaaaaay!

TrumanCapote:

18-12-2009 01:39:37 UTC

for

Hix:

18-12-2009 21:04:31 UTC

Bot assumes that everyone who commented is currently active.

Kevan: he/him

19-12-2009 23:57:16 UTC

Aha, nice work ais.

ais523:

23-12-2009 11:17:24 UTC

Hix: Ah, well noticed. That may be fixable, but not right now; I’ve been offline for a few days and a backlog of stuff to do has accumulated in the meantime.