Skip to content

Weber vote-for-or-against-k: best k + Monte Carlo CAV strategy#54

Draft
endolith wants to merge 3 commits into
masterfrom
cursor/weber-vote-for-or-against-k-c297
Draft

Weber vote-for-or-against-k: best k + Monte Carlo CAV strategy#54
endolith wants to merge 3 commits into
masterfrom
cursor/weber-vote-for-or-against-k-c297

Conversation

@endolith
Copy link
Copy Markdown
Owner

@endolith endolith commented May 11, 2026

Summary

  • vote_for_or_against_k now follows Weber’s text (Cowles DP 498): for each voter, draw a uniform cardinality-k subset S, then with probability 1/2 vote for S (+1 on those candidates) or vote against S (-1 on the same S) — XOR on one set, not simultaneous +top / −bottom. Types are drawn independently of the utility matrix (utilities only fix ballot shape / RNG).
  • Removed the incorrect earlier claim and the Monte Carlo assertions that forced agreement with eff_vote_for_or_against_k under that wrong rule.
  • weber_1977_effectiveness_table.py docstring now states explicitly that Merrill-style IC + this literal type draw can diverge from the dashed eff_* curve; that gap is treated as an informative outcome.

Tests

  • python3 -m pytest tests/ -q
  • PYTHONPATH=. python3 examples/weber_1977_expressions.py
Open in Web Open in Cursor 

…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
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.41%. Comparing base (8a7213f) to head (c310630).

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              
Flag Coverage Δ
no-numba 95.61% <100.00%> (+0.11%) ⬆️
numba 89.44% <100.00%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@cursor cursor Bot changed the title Weber: best vote-for-or-against-k and effectiveness table column Weber vote-for-or-against-k: best k + Monte Carlo CAV strategy May 11, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants