Weber vote-for-or-against-k: best k + Monte Carlo CAV strategy#54
Draft
endolith wants to merge 3 commits into
Draft
Weber vote-for-or-against-k: best k + Monte Carlo CAV strategy#54endolith wants to merge 3 commits into
endolith wants to merge 3 commits into
Conversation
…ess table - Maximize eff_vote_for_or_against_k over integer k in 1..floor(m/2) instead of rounding alpha*m (differs e.g. at m=91). - effectiveness_table: add Best Vote-for-or-against-k from closed form; document that Merrill-style Monte Carlo does not apply to that column. - Fix weber_1977_expressions __main__ table construction and infinity row. Co-authored-by: endolith <endolith@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #54 +/- ##
==========================================
+ Coverage 96.31% 96.41% +0.09%
==========================================
Files 19 19
Lines 489 502 +13
==========================================
+ Hits 471 484 +13
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Implement vote_for_or_against_k as +1 on each voter's k best utilities and -1 on their k worst (disjoint when k <= n//2), matching Monte Carlo SUE to Weber's effectiveness integrals. Wire weber_1977_effectiveness_table to combined_approval with best k; add regression checks in test_cases and test_strategies. Co-authored-by: endolith <endolith@gmail.com>
Implement literal type draw (uniform k-subset, then +1 on S or -1 on S), independent of utilities; remove incorrect simultaneous top/bottom rule and MC-vs-theory asserts. Document possible gap vs dashed eff_* in effectiveness table. Co-authored-by: endolith <endolith@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vote_for_or_against_know follows Weber’s text (Cowles DP 498): for each voter, draw a uniform cardinality-ksubsetS, then with probability 1/2 vote forS(+1on those candidates) or vote againstS(-1on the sameS) — XOR on one set, not simultaneous +top / −bottom. Types are drawn independently of the utility matrix (utilities only fix ballot shape / RNG).eff_vote_for_or_against_kunder that wrong rule.weber_1977_effectiveness_table.pydocstring now states explicitly that Merrill-style IC + this literal type draw can diverge from the dashedeff_*curve; that gap is treated as an informative outcome.Tests
python3 -m pytest tests/ -qPYTHONPATH=. python3 examples/weber_1977_expressions.py