-
Notifications
You must be signed in to change notification settings - Fork 7
2 new algorithems about manipulation #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
elyasafko
wants to merge
24
commits into
voting-tools:main
Choose a base branch
from
elyasafko:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Implemented algorithms for strategic voting decision-making, including single-voter and coalitional manipulation. Added unit tests to validate functionality. Initialized project settings and Git integration with configuration files.
This commit introduces a new `.idea/misc.xml` file to the repository. It specifies project settings, including the use of Python 3.12 as the SDK. This helps ensure consistent development environment configurations.
Replaced print statements with logging for better traceability and debugging. Adjusted log levels for message clarity and transitioned to outputting warnings for critical checks. Removed outdated comments and redundant documentation for improved code readability."
Enhanced existing docstrings with examples to clarify usage and behavior of functions like `_pos`, `_top_i`, `_compute_Hi`, and `check_validation`. This improvement aids in understanding and testing the code more effectively.
Added a detailed module docstring describing strategic voting algorithms based on recent research. Updated project configuration to use Python 3.12 SDK, ensuring compatibility and standardization.
git merge upstream/main update git
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.
This PR adds two new manipulation algorithms for negotiating-team scenarios, based on “Strategic Voting in the Context of Negotiating Teams” (Schmerler & Hazon, 2021):
C-MaNego (algorithm1_single_voter): Single-voter constructive manipulation under any positional scoring rule.
CC-MaNego (algorithm2_coalitional): Coalitional manipulation for x-approval rules.
added:
New module - strategic_voting_algorithms.py
algorithm1_single_voter(F, team_profile, opponent_order, preferred)
algorithm2_coalitional(F, team_profile, opponent_order, preferred, k)
Helpers: _explode_profile, borda, make_x_approval, _rc_result, _compute_Hi, check_validation, etc.
Tests test_algorithms.py
Coverage for both algorithms, including paper’s examples, edge cases (empty input, threshold guards), randomized guards, output-shape invariants, and Profile-based inputs.
References
Paper:
"Strategic Voting in the Context of Negotiating Teams",
Leora Schmerler & Noam Hazon (2021) – https://arxiv.org/abs/2107.14097