Inconsistent user here. So is this forum dead, orrr...?
Posts made by culi
-
RE: Opportunity to either significantly improve this forum, or just let it go peacefully into the night
-
RE: Kemeny Young example problems
For Condorcet, I would have thought Ranked Pairs and Schulze would be included. Maybe River too.
They are planned. Condorcet algorithms are complicated to implement. This is the second iteration of this project. The first one had some more, but the main goal with this is to cache parts of results for easy re-use. E.g. we shouldn't have to calculate the borda results 3 times for Borda, Black, and STAR. Same principle for pairwise matrices, etc. Instead if we cache that result we can reuse some of the calculations. So it'll take some time to implement a lot of the more complex Condorcet algorithms efficiently. The code repository has a more thorough run-down of the planned additional algorithms. It's open source so feel free to contribute or open an issue
But anyways, that's not really the point of my post. I'm just asking if someone knows of resources where I can find more test case examples instead of having to work them out by hand. Got any?
-
RE: Kemeny Young example problems
@jack-waugh Yes I have already turned that Tennessee into a test across multiple algorithms. I was looking for more examples. Perhaps a chapter in a textbook with exercises
In short, each voter voter's preference for each candidate is based on their distance in the RGB color space. Under the hood, each voter assigns each candidate a score from 0 to 100%.
We use these scores to derive all possible ballot types. Ordinal is easy to derive; for approval we say anything above 50%; for FPTP we take the highest scoring candidate, etc.
This is the first I heard of Kemeny-Young. It sounds impractical to tally without computers.
There are various ways to optimize the algorithm. And many shortcuts you can take. In practice you wouldn't actually have to fully calculate every single path's score.
-
RE: Kemeny Young example problems
All 27 methods btw are:
- plurality: fptp, veto, signed, vfa
- contingent: contingency, supplementary, sri_lanka
- runoff: irv, coombs, fab_irv
- positional: borda, nauru, eurovision, dabagh, binary_positional
- evaluative: approval, disapproval, cav, score, range
- condorcet: copeland, lull, kemeny_young
- budgetary: cumulative, fractional, quadratic, equal_even
lemme know if you want me to explain any of these in more detail, but there's a short explanation for each on the website I linked.
-
Kemeny Young example problems
Hello, I am working on a project called VoteVote which attempts to simulate a single election across (now 27) different methods all at once. I am implementing Kemeny Young currently and have been having a lot of trouble finding example problems for writing tests to ensure my implementation is sound. I've looked at numerous published papers and only found one example so far. Of course I could do it by hand, but that is error prone and not a good way to write a lot of tests.
Does anyone have a good resource (or even their own personal examples) they can share? I'm particularly interested in Kemeny Young currently, but examples from any of the other 26 methods are also welcome
-
RE: votevote.page is live
@jack-waugh At the bottom of all my projects is a "Steal This" button that takes you to the source code. It's up on GitHub:
https://github.com/tif-calin/votevote/
Though I must warn you I haven't yet cleaned it up to make it easy to contribute to (planning on it when I get some free time).
All the logic happens inside this
SuperElection
class. The main motivation behind this is making a lot of use of cacheing to optimize these calculations. I.e. why calculate the borda score twice for Borda and for STAR when you can just calculate it once and reuse it.So it's quite tangled up right now and not as documented as it should be
-
RE: A Municipality in Latvia Provides Equal Votes
Not sure about the specific implementation, but at least mathematically it's also equivalent to combined approval voting (i.e. -1, 0, 1).
-
RE: votevote.page is live
@rob said in votevote.page is live:
To be clear, I wasn't suggesting limiting to basic colors like that because that defeats the whole purpose. My suggestion would be pick the colors purely visually from a palette (a small 8x8 palette for 64 colors would be perfect), or using a color picker.
Oh gotchu. Yeah not a bad idea
Expecting people to set up a custom dataset is fine, if it's that kind of app.
Oh no, that's not actually what I meant. What I envision is that the default is to use the current color data. But there's a drop down to use other stuff.
For example, in Wikipedia there's a common example given of cities in Tennessee trying to elect a new capital. Each city's preferences are based on their X,Y coordinates and distance from each other. I could totally add this as a dataset as well (with even more cities probably)
And then at that point I think the logical next step is to make one of the drop down options "custom" where the user can enter arbitrary data. This might also actually make this toy somewhat useful. Like if someone already has votes from a scored election and is wondering how the outcome would've differed under a different scoring method, they can enter that data here simulate it all
But the default would still be color-based unless the user specifically decides they wanna go with something else.
-
RE: votevote.page is live
@rob Fair, but I still don't see why it's an issue. You can remove/add whatever candidates and/or voters you'd like. If you want to limit yourself to red/green/blue/other basic colors you totally can!
Anyways all these concerns should be resolved once I have it set up so anyone can add their own custom dataset
-
RE: votevote.page is live
@rob The color names are based on XKCD's average from their survey of thousands of people. I'd say the results are, by design, much closer to how people map color names to colors than what some paint company decides
-
RE: votevote.page is live
PS you can preview the upcoming versions here: https://dev--votevote.netlify.app/
This week's been crazy at work so I probably won't be able to implement the color space changes until next weekend, but I have some other exciting updates already in
-
RE: votevote.page is live
@paretoman Just rewatched the video. Yup my calculations do already use the geometric mean instead of the euclidean mean haha
-
RE: votevote.page is live
@paretoman Thanks for sharing. I think I've actually seen this same video before haha. I have a separate side project where I'm basically trying to recreate Bjorn Ottosson's color picker across multiple colorspaces:
https://bottosson.github.io/misc/colorpicker/
I don't really have anything original to add to this besides support for even more colorspaces. There's also some cool new CSS proposals coming in that will allow us to more easily work with some of these advanced color spaces so I'm eagerly awaiting browser adoption of those haha.
Definitely a space I'm keeping an eye on and have spent a lot of time thinking about. Hopefully that functionality will be integrated into VoteVote soon enough too
-
RE: STAR-like method ("reverse STAR"?)
Perhaps we can differentiate them like so:
star
: top two runoff based on borda score and pairwise winner for the second round
dasgupta_maskin
/one_by_one
: 1/0.5/0 copeland with borda tiebreaker
reverse_star
: 1/0/0 copeland with borda tiebreaker
black
: simple condorcet with borda tiebreaker -
RE: STAR-like method ("reverse STAR"?)
@rob Very late to this conversation but what you're describing is exactly the Dasgupta-Maskin method[1] which is just Copeland with a Borda tie breaker. This method has actually been used in figure skating competitions under the name of "one by one"[2]
There are different version of Copeland depending on how you wanna score wins, ties, and losses. Most commonly used is probably the 1/½/0 (1 point for wins, 0.5 points for ties, 0 for losses) method but Lull proposed a 1/1/0 method and 3/1/0 is commonly used in sports. But it seems like you're just using a 1/0/0 Copeland here
This system can also be compared to Black's which is essentially just Condorcet with Borda tiebreaker
[1] https://scholar.harvard.edu/files/maskin/files/voting.pdf
[2] https://sci-hub.se/10.1287/opre.2014.1269 -
RE: votevote.page is live
Upon further testing of veto and vfa, I still don't see much unexpected behavior. I think it might just be biases in the selected colors. The default candidates span the color hue pretty decently but this is very much an unlikely (though preferable) scenario to happen in the real world. I'll definitely still write those unit tests, but lemme know if you try it with different sets of candidates/voters and are still convinced there's weirdness
Also if you hover over the bars for a second you'll also see the specific score:
You can use this to quickly check that the fptp score + veto score = vfa score (it does indeed in my quick testing)
-
RE: votevote.page is live
@rob Hey rob thanks so much for the detailed feedback!
FPTP and Veto seem to produce almost exactly opposite results. [...] I suspect that you are tallying them wrong.
Thanks! You can actually confirm this yourself. You can hover over each voter on the left hand side and it'll tell you their preference scores for each candidate:
I'll write some unit tests to check if there is a flaw in the calculation, but I think what's most likely happening is that your spoiler candidate ends up making lemon very unlikely to be the most liked and also very unlikely to be the most hated
The same issue applies to VFA (for and against). Candidates that get lots of positive votes seem to also get a similar number of negative votes. That seems unlikely.
Will add tests for this as well.
Regarding colors: I think you should stick with RGB rather than mixing HLS into your distance formular.
I have a solution for this in the works. In the original prototype you are able to switch between RGB and HSL scoring systems. In a future update I'll add this ability back in as it should be pretty simple to do so. I was gonna put it off for a bit, but now that I've some feedback on it I'll prioritize it for the next release The only reason I've really been putting it off is because I wanted to make it a bit fancier than just RGB or HSL. Besides the idea of including more complex color spaces, I wanted to let users checkmark which components they wanted (i.e. some weird R+G+B+H hybrid). And yes I'm well aware of how tricky it can be to calculate distance for a component that is cyclic. I spent a lot of time trying to get that right haha
I tried creating a gray candidate, and they performed very poorly with all methods, even though you'd think they'd do well on most methods
The weird color distance formula was actually created specifically to prevent this tbh. The formula ended up weird and if you want a killer candidate try adding "leather" instead of some gray. The reason for this actually has a lot more to do with bias in the data source itself. The color names are taken from the amazing XKCD color survey in which ~140,000 people were prompted random RGB values and asked to name them. XKCD then did some averaging to map color names on to specific points. The colors here are the 954 most popular color names given. It just so happens that people seem to have a lot more names for shades or red/brown colors than most other parts of the RGB color space. I figured if the data source is already biased towards human I might as well use my own human bias in the scoring system to try to concoct something that seems fair to me.
However I agree that the best course of action is to leave this option in the hands of the user
On to a bigger issue: are you assuming the candidates are voting entirely naively?
Yup! This is supposed to be an exploration of the ways to count votes itself and not at all model real life elections. I don't really make any attempts to model voter behavior. But I'll add this to the list of future toggleable options the user can play with
Last note: The XKCD color data is just one data source. The original prototype used a different set of colors that I hand crafted. However, the way that the election calculations work is that each ballot just needs to have an assigned score for each candidate between 0 and 1. This is abstract enough that it should be very trivial to add, for example, different cities in Tennessee voting for which capital to have. This can easily be expanded to more cities than the 4 typically used as examples. The exciting part is that it should also be really simple to add arbitrary custom data as well. So anyone with a set of candidates and a set of ballots (again, ballots are just a mapping of each candidate to 0..1) can model an arbitrary election across all of these different methods. I guess this probably won't really be that useful until I add the ability to toggle more complex voter behavior however though
-
RE: votevote.page is live
I doubt anyone's really following along, but just wanted to say this project isn't dead. I got a new job so I've been spending most of my free time learning the tech stack there, but I did recently release a much needed styling update:
Still have a lot I wanna do with it eventually. Some ideas include:
- make-your-own voting system: e.g. give a custom vector to make a positional system or define a cutoff and threshold method to create a runoff system. Also can automatically compare with existing system to find which other voting system is most similar
- comparisons & analysis: e.g. which systems correlate most strongly with other systems?
- host actual votes: just what it sounds like. you'd also be able to see how the outcome would've differed if you'd chosen an alternative system
- manipulation game: try to change the outcome by either removing a candidate, adding spoiler candidates, changing your vote, changing the voting system used, etc
But the priority right now is just to optimize the existing systems (and then I can finally add more complex condorcet methods)
I also genuinely want this to be a really accessible tool so I'm learning how to use a screen reader and I'm also exploring progressive web apps (PWAs) so that this can be run offline
I'll make another thread once I have a more substantial update
PS I definitely tend to fall victim to feature creep with my project, but I hope to be able to stick to the core functionality long enough for an over-the-top roadmap to not hinder the project. I think I can build it with future features in mind without sacrificing too much. Also really hope to open this open-source project up to external contributions once the codebase is sufficiently cleaned up
-
RE: votevote.page is live
@keith-edmonds Sorry, but I don't really understand this criticism. The initial voting system blocks were Plurality (fptp the default) and Runoff (IRV the default). IMO these are the two most popular voting systems. I'm not sure if you've read the "explanation" texts, but I feel like there's a very clear and natural progression for all of them. I introduced the 2 most popular methods and then slight variations on them. Yes "coombs" is much less known than "approval" but if someone has already put in the effort to understand IRV, it's really easy to say "coombs is the same thing but instead you drop the most hated candidate each round" than to introduce an entirely new voting system. After FPTP and IRV, I wrote contingency (along with some of its variations) which I'd also say is extremely popular given that the primary/general system is widely used and its an abstraction of that so it's easy to explain.
The whole pattern here is:
- introduce some popular voting system
- show them some ways you can modify it and see how that'd change the outcome
- introduce another voting system (and maybe explain what it does that the previous block didn't)
But anyways, if you MUST know why I really wrote them in the way that I did, it's actually because I've done this project twice. The first time (what I call the prototype) I did it pretty much exactly as you were saying where I started off writing only the most well known voting methods first. It eventually got to the point of 26 voting methods. One major thing I realized is that if I cached the results of other methods, I could make some massive efficiency gains. E.g. no need to calculate the Borda score twice for STAR and Borda when I could reuse the results of the calculation
So the central realization behind this new project is that I could make a really efficient "SuperSystem" that entangles all of these methods at once and calculates all of these results in one go and avoids repeat calculations as much as possible. Organizing the methods into "blocks" makes sense not just as an educational toy, but for the sake of developing this SuperSystem in a way that similar blocks of logic are grouped together.
Anyways, other than STAR, I feel like the latest update includes all the "canonical" popular voting methods so I hope your concerns are alleviated. I'd definitely like to implement STAR and some more Condorcet methods soon though