Skip to content

Commit

Permalink
Merge pull request #8 from paretoman/gh-pages
Browse files Browse the repository at this point in the history
yee pretty. yee speed. side menu config. changed strategy names. added single voter html
  • Loading branch information
jamesonquinn authored Aug 8, 2017
2 parents 6904125 + 6732518 commit 7dc55a6
Show file tree
Hide file tree
Showing 30 changed files with 894 additions and 482 deletions.
53 changes: 36 additions & 17 deletions newer.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,15 +233,42 @@ <h2 class="ballot_title" style="margin-bottom: 0.15em;">Normalizing Voter</h2>
<h2 class="ballot_title" style="margin-bottom: 0.15em;">Strong Strategic Voter</h2>
<p class="ballot_caption">Almost like strategic approval.</p>

<iframe src="play/ballot8.html" width="900" height="276" scrolling="no"></iframe>
<iframe src="play/ballot8.html" width="655" height="380" scrolling="no"></iframe>

</div>
<div class="words">

<p><em>Single-voter example with 3 candidates and a voter who normalizes based on only the 2 of them.</em></p>

<p>Just as normalized voters can have more voting power than naive voters, strongly strategic voters can have more than normalized voters (as long as they are not too far off in guessing the frontrunners). This is a potential weakness of score voting.</p>

<p> Even stronger strategic voters could only choose the best of the frontrunners.</p>

</div>
<div class="sim-ballot">

<h2 class="ballot_title" style="margin-bottom: 0.15em;">Best Frontrunner</h2>
<p class="ballot_caption">And everybody you like better.</p>

<iframe src="play/ballot11.html" width="655" height="380" scrolling="no"></iframe>

</div>
<div class="words">

<p> A more risk-averse, safe strategic voter could avoid the worst frontrunner by voting for everyone better.</p>

</div>
<div class="sim-ballot">

<h2 class="ballot_title" style="margin-bottom: 0.15em;">Not the Worst Frontrunner</h2>
<p class="ballot_caption">Just everybody you like better.</p>

<iframe src="play/ballot12.html" width="655" height="380" scrolling="no"></iframe>

</div>
<div class="words">
<p> These two strategies are really just different extremes of the strong strategic voter.</p>

<p>Is approval voting immune to this kind of voting strategy? No; in fact, in the early seventies, mathematicians Gibbard and Satterthwaite both independently proved the theorem which bears their names, showing that no non-dictatorial voting method with more than 2 options is entirely immune to strategy. Unlike Arrow's theorem, which Nicky discussed, this one goes for any kind of voting method — ranked, rated, or whatever. So yes, approval voting is more resistant to strategy than score; but not immune.</p>

<p>(Note: advocates for IRV sometimes garble this point by saying that in approval voting the best strategy is to "bullet vote" for only your favorite candidate, and that this would lead it to devolve back to FPTP. That's just wrong; if voters are strategically voting for somebody other than their favorite in FPTP, then there's no way it would make sense for them to bullet vote in approval. Approval voting isn't perfect, but it simply does <strong>not</strong> break down to FPTP.)</p>
Expand All @@ -251,21 +278,13 @@ <h2 class="ballot_title" style="margin-bottom: 0.15em;">Strong Strategic Voter</
<p>Here's that scenario in sandbox form. The slider on the right controls the percent of the smallest group that is strongly strategic between triangle and square; all the rest of the voters use normalized strategy (that is, approve any candidate better than the average of their favorite and least-favorite).</p>


</div>
<div class="sim-test">

<p class="caption-test">
Also, here's a score example<br>
</p>
<iframe src="play/election9.html" width="800" height="1000" scrolling="no"></iframe>

</div>
<div class="sim-test">

<p class="caption-test">
Playing Chicken<br>
</p>
<iframe src="play/election10.html" width="800" height="1000" scrolling="no"></iframe>
<iframe src="play/election10.html" width="800" height="380" scrolling="no"></iframe>

</div>
<div class="words">
Expand All @@ -283,15 +302,15 @@ <h2 class="ballot_title" style="margin-bottom: 0.15em;">Strong Strategic Voter</
<p class="caption-test">
Playing Chicken with Different Methods<br>
</p>
<iframe src="play/election11.html" width="800" height="800" scrolling="no"></iframe>
<iframe src="play/election11.html" width="800" height="380" scrolling="no"></iframe>

</div>
<div class="sim-test">

<p class="caption-test">
Center Squeeze<br>
</p>
<iframe src="play/election12.html" width="800" height="500" scrolling="no"></iframe>
<iframe src="play/election12.html" width="800" height="380" scrolling="no"></iframe>

</div>
<div class="words">
Expand All @@ -310,7 +329,7 @@ <h1>Star voting</h1>
<h2 class="ballot_title" style="margin-bottom: 0.15em;">Star Strong</h2>
<p class="ballot_caption">Keeps a space for the best.</p>

<iframe src="play/ballot9.html" width="900" height="276" scrolling="no"></iframe>
<iframe src="play/ballot9.html" width="655" height="380" scrolling="no"></iframe>

</div>
<div class="words">
Expand All @@ -325,7 +344,7 @@ <h2 class="ballot_title" style="margin-bottom: 0.15em;">Star Strong</h2>
<p class="caption-test">
Chicken Star<br>
</p>
<iframe src="play/election13.html" width="800" height="500" scrolling="no"></iframe>
<iframe src="play/election13.html" width="800" height="380" scrolling="no"></iframe>

</div>
<div class="words">
Expand All @@ -342,7 +361,7 @@ <h1>3-2-1 voting</h1>
<h2 class="ballot_title" style="margin-bottom: 0.15em;">321 Strategic</h2>
<p class="ballot_caption">Approval with an extra level.</p>

<iframe src="play/ballot10.html" width="900" height="276" scrolling="no"></iframe>
<iframe src="play/ballot10.html" width="655" height="380" scrolling="no"></iframe>

</div>
<div class="words">
Expand All @@ -357,7 +376,7 @@ <h2 class="ballot_title" style="margin-bottom: 0.15em;">321 Strategic</h2>
<p class="caption-test">
321 Chicken<br>
</p>
<iframe src="play/election14.html" width="800" height="440" scrolling="no"></iframe>
<iframe src="play/election14.html" width="800" height="380" scrolling="no"></iframe>

</div>
<div class="words">
Expand All @@ -378,7 +397,7 @@ <h2 class="ballot_title" style="margin-bottom: 0.15em;">321 Strategic</h2>
<div id="sandbox">
<div class="sim-sandbox">
<h1 class="caption-test" style="margin: 30px 0 15px 0;">SANDBOX MODE! <a href="sandbox">(link to <em>just</em> this)</a></h1>
<iframe src="sandbox/sandbox.html" width="802" height="1100" scrolling="no"></iframe>
<iframe src="sandbox/sandbox.html" width="802" height="800" scrolling="no"></iframe>
</div>
<div class="words">
<p>
Expand Down
5 changes: 2 additions & 3 deletions play/ballot10.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<script>main({
system: "Three",
strategy: "starnormfrontrunners",
frontrunnerSet: new Set(["square","hexagon"]),
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
frontrunnerSet: new Set(["square","triangle"]),
showChoiceOfFrontrunners: true
});</script>
31 changes: 31 additions & 0 deletions play/ballot11.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/model.css">
<link rel="stylesheet" type="text/css" href="css/election.css">
<link rel="stylesheet" type="text/css" href="css/ballot.css">
</head>
<body></body>
</html>

<script src="js/helpers.js"></script>
<script src="js/minpubsub.js"></script>
<script src="js/Loader.js"></script>
<script src="js/Mouse.js"></script>
<script src="js/Draggable.js"></script>
<script src="js/Model.js"></script>
<script src="js/Candidate.js"></script>
<script src="js/Voters.js"></script>
<script src="js/Election.js"></script>
<script src="js/Buttons.js"></script>
<script src="js/Ballot.js"></script>

<script src="js/main_ballot.js"></script>
<script>main({
system: "Score",
strategy: "best frontrunner",
frontrunnerSet: new Set(["square","triangle"]),
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
});</script>
31 changes: 31 additions & 0 deletions play/ballot12.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/model.css">
<link rel="stylesheet" type="text/css" href="css/election.css">
<link rel="stylesheet" type="text/css" href="css/ballot.css">
</head>
<body></body>
</html>

<script src="js/helpers.js"></script>
<script src="js/minpubsub.js"></script>
<script src="js/Loader.js"></script>
<script src="js/Mouse.js"></script>
<script src="js/Draggable.js"></script>
<script src="js/Model.js"></script>
<script src="js/Candidate.js"></script>
<script src="js/Voters.js"></script>
<script src="js/Election.js"></script>
<script src="js/Buttons.js"></script>
<script src="js/Ballot.js"></script>

<script src="js/main_ballot.js"></script>
<script>main({
system: "Score",
strategy: "not the worst frontrunner",
frontrunnerSet: new Set(["square","triangle"]),
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
});</script>
2 changes: 1 addition & 1 deletion play/ballot5.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
<script src="js/main_ballot.js"></script>
<script>main({
system: "Score",
strategy: "normalized"
strategy: "normalize"
});</script>
4 changes: 2 additions & 2 deletions play/ballot6.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<script src="js/main_ballot.js"></script>
<script>main({
system: "Score",
strategy: "thresholdfrontrunners",
frontrunnerSet: new Set(["square","hexagon"]),
strategy: "best frontrunner",
frontrunnerSet: new Set(["square","triangle"]),
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
});</script>
3 changes: 1 addition & 2 deletions play/ballot7.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@
<script>main({
system: "Score",
strategy: "threshold",
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
showChoiceOfFrontrunners: true
});</script>
4 changes: 2 additions & 2 deletions play/ballot8.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<script src="js/main_ballot.js"></script>
<script>main({
system: "Score",
strategy: "normfrontrunners",
frontrunnerSet: new Set(["square","hexagon"]),
strategy: "normalize frontrunners only",
frontrunnerSet: new Set(["square","triangle"]),
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
});</script>
7 changes: 3 additions & 4 deletions play/ballot9.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
<script src="js/main_ballot.js"></script>
<script>main({
system: "Score",
strategy: "starnormfrontrunners",
frontrunnerSet: new Set(["square","hexagon"]),
showChoiceOfFrontrunners: true,
showChoiceOfStrategy: true
strategy: "starnormfrontrunners", // for now we are using an "off-menu" option. We should make versions of each of hte strategies for star.
frontrunnerSet: new Set(["square","triangle"]),
showChoiceOfFrontrunners: true
});</script>
18 changes: 18 additions & 0 deletions play/css/ballot.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ BALLOT DESIGN
width: 375px;
height: 250px;
margin-left: 20px;
margin-bottom: 10px;

overflow: hidden;
float:left;
Expand All @@ -18,9 +19,26 @@ BALLOT DESIGN
border: 2px solid #fff;

position: relative;


}
#ballot .ballot_sprite{
position: absolute;
background-size: 100% auto;
}

.button-group{
margin-left: 0px;
float:left;
clear:both;
}

#reset {
top: 270px;
left: 275px
}

.model {
height:260px;
margin-bottom: 10px;
}
2 changes: 2 additions & 0 deletions play/css/election.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ Election/Sandbox design:
#left{
width:220px;
padding-right: 20px;
height: 371px;
}
#center{
width:320px;
height: 370px;
}
#right{
width:220px;
Expand Down
24 changes: 22 additions & 2 deletions play/election10.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script src="js/main_sandbox.js"></script>
<script>
main({

/*
features:3,
doPercentFirst:true,
system: "Approval",
Expand All @@ -41,10 +41,30 @@
voterPositions: [[150,150-70],
[150,150+10],
[150,150+90]],
voterStrategies: ["normfrontrunners","normfrontrunners","normfrontrunners"],
voterStrategies: ["normalize frontrunners only","normalize frontrunners only","normalize frontrunners only"],
voterPercentStrategy: [100,100,100],
frontrunnerSet: new Set(['square','triangle','hexagon']),
doFullStrategyConfig: true
*/

candidatePositions: [[121,149],[118,170],[194,159]],
voterPositions: [[116,121],[116,184],[195,155]],
system: "Approval",
candidates: 3,
voters: 3,
voterStrategies: ["best frontrunner","best frontrunner","best frontrunner"],
voterPercentStrategy: ["100","100",100],
frontrunnerSet: new Set(["square","triangle","hexagon"]),
featurelist: ["percentstrategy"],
sandboxsave: false,
hidegearconfig: false,
description: "",
snowman: true,
unstrategic: "normalize",
keyyee: "off",
kindayee: "off",
features: undefined,
doPercentFirst: undefined,
doFullStrategyConfig: undefined
});
</script>
26 changes: 23 additions & 3 deletions play/election11.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script src="js/main_sandbox.js"></script>
<script>
main({

/*
features:1,
doPercentFirst:true,
system: "Approval",
Expand All @@ -41,11 +41,31 @@
voterPositions: [[150,150-70],
[150,150+10],
[150,150+90]],
voterStrategies: ["thresholdfrontrunners","thresholdfrontrunners","thresholdfrontrunners"],
voterStrategies: ["best frontrunner","best frontrunner","best frontrunner"],
voterPercentStrategy: [0,100,100],
frontrunnerSet: new Set(['square','triangle','hexagon']),
doFullStrategyConfig: true,
unstrategic: "normalized"
unstrategic: "normalize"
*/

candidatePositions: [[121,149],[118,170],[194,159]],
voterPositions: [[116,121],[116,184],[195,155]],
system: "Approval",
candidates: 3,
voters: 3,
voterStrategies: ["best frontrunner","best frontrunner","best frontrunner"],
voterPercentStrategy: ["100","100",100],
frontrunnerSet: new Set(["square","triangle","hexagon"]),
featurelist: ["percentstrategy"],
sandboxsave: false,
hidegearconfig: false,
description: "",
snowman: true,
unstrategic: "normalize",
keyyee: "off",
kindayee: "off",
features: undefined,
doPercentFirst: undefined,
doFullStrategyConfig: undefined
});
</script>
Loading

0 comments on commit 7dc55a6

Please sign in to comment.