Implement Instant Runoff voting for polls [paid code]

How, what and why to code in BYOND.
Post Reply
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Implement Instant Runoff voting for polls [paid code]

Post by oranges » #191419

So lets try this again

I need an instant runoff voting implementation built into our poll system:
https://en.wikipedia.org/wiki/Instant-runoff_voting

Implementation
Randomly sort ballot per user to avoid the people who just rank things in order out of lazyness

User ranks each item from 1 - N where N is the max

results should be hidden until an appropriately ranked user allows calculation

votes from accounts with connections less than y and account age less than x should be ignored

x and y should of course be config options

Comment if you're interested in

oh also payment is 200usd, via paypal or some other means (amazon voucher?)
Last edited by oranges on Thu Jun 30, 2016 12:17 am, edited 1 time in total.
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Implement Instant Runoff voting for polls [paid code]

Post by oranges » #191422

just to clarify how the voting mechanic should work

tally all voters first choice - if no one has majority (configurable, maybe 85%?) eliminate the lowest ranked candidate
tally voters choices using second choice for voters who's first choice candidate was chosen
if no majority eliminate someone again

repeat until someone has majority.
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Implement Instant Runoff voting for polls [paid code]

Post by oranges » #191424

it's arguable but I think we should let people leave some entries blank, if all their ranked choices are gone then their vote will just be discounted.
Incoming
Github User
Joined: Tue Apr 15, 2014 11:41 pm
Byond Username: Incoming
Github Username: Incoming5643

Re: Implement Instant Runoff voting for polls [paid code]

Post by Incoming » #191432

Well expecting people to rank a field of 30 is a bit much, people would just give up.
Developer - Datum Antags: Feburary 2016

Poly the Parrot - All Seeing Bird Transcends Universe, Joins Twitter.

Kofi - Make A Poor Life Choice

Good ideas backed by cruddy code since 2012!
User avatar
oranges
Code Maintainer
Joined: Tue Apr 15, 2014 9:16 pm
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Implement Instant Runoff voting for polls [paid code]

Post by oranges » #191448

https://github.com/RemieRichards/-tg-st ... db1da6ab90

remie was kind enough to implement the basics of the system and then wouldn't implement any more so you can build on that.
User avatar
Jordie0608
Site Admin
Joined: Tue Apr 15, 2014 1:33 pm
Byond Username: Jordie0608
Github Username: Jordie0608
Location: Spiderland, Australia

Re: Implement Instant Runoff voting for polls [paid code]

Post by Jordie0608 » #191503

I'm going to try and finish this, however I won't be doing much until after the 2nd, so it won't be ready by the time our elections start (not that I'd do it in a day anyway).
Forum Admin
Send me a PM if you have any issues, concerns or praise of fishfood to express about the forums.
User avatar
MrStonedOne
Host
Joined: Mon Apr 14, 2014 10:56 pm
Byond Username: MrStonedOne
Github Username: MrStonedOne

Re: Implement Instant Runoff voting for polls [paid code]

Post by MrStonedOne » #193092

I'll have something up for this by the end of the day.
Forum/Wiki Administrator, Server host, Database King, Master Coder
MrStonedOne on digg(banned), Steam, IRC, Skype Discord. (!vAKvpFcksg)
Image
User avatar
MrStonedOne
Host
Joined: Mon Apr 14, 2014 10:56 pm
Byond Username: MrStonedOne
Github Username: MrStonedOne

Re: Implement Instant Runoff voting for polls [paid code]

Post by MrStonedOne » #193243

https://github.com/tgstation/tgstation/pull/19153


This adds the game code to track the votes.

The code to calculate it will be done later, and most likely in php. I'll release it into the site repo once its coded.
Forum/Wiki Administrator, Server host, Database King, Master Coder
MrStonedOne on digg(banned), Steam, IRC, Skype Discord. (!vAKvpFcksg)
Image
Post Reply

Who is online

Users browsing this forum: No registered users