Skip to content

Commit

Permalink
changed strategy names to single letters.
Browse files Browse the repository at this point in the history
NO -> O
N
F
BF -> B
NwF -> W
  • Loading branch information
paretoman committed Aug 8, 2017
1 parent 719f883 commit 6732518
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions play/election12.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
system: "IRV",
candidates: 3,
voters: 1,
voterStrategies: ["no strategy. judge on an absolute scale.","normalize frontrunners only","normalize frontrunners only"],
voterStrategies: ["zero strategy. judge on an absolute scale.","normalize frontrunners only","normalize frontrunners only"],
voterPercentStrategy: ["100",100,100],
frontrunnerSet: new Set(["square","triangle","hexagon"]),
featurelist: ["systems"],
sandboxsave: false,
hidegearconfig: false,
description: "",
snowman: false,
unstrategic: "no strategy. judge on an absolute scale.",
unstrategic: "zero strategy. judge on an absolute scale.",
keyyee: "off",
features: undefined,
doPercentFirst: undefined,
Expand Down
6 changes: 3 additions & 3 deletions play/election8.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
voters: 2,
voterPositions: [[100,150],[300-100,150]],
voterStrategies: ["normalize","no strategy. judge on an absolute scale."],
voterStrategies: ["normalize","zero strategy. judge on an absolute scale."],
frontrunnerSet: new Set(["square","hexagon"])
*/

Expand All @@ -46,15 +46,15 @@
system: "Score",
candidates: 2,
voters: 2,
voterStrategies: ["normalize","normalize","no strategy. judge on an absolute scale."],
voterStrategies: ["normalize","normalize","zero strategy. judge on an absolute scale."],
frontrunnerSet: new Set(["square","hexagon"]),
featurelist: ["percentstrategy"],
sandboxsave: false,
hidegearconfig: false,
description: "",
voterPercentStrategy: ["70","49",0],
snowman: false,
unstrategic: "no strategy. judge on an absolute scale.",
unstrategic: "zero strategy. judge on an absolute scale.",
keyyee: "off",
features: undefined,
doPercentFirst: undefined,
Expand Down
4 changes: 2 additions & 2 deletions play/js/Voters.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function dostrategy(x,y,minscore,maxscore,rangescore,strategy,lastwinner,frontru
}}}


}// otherwise, there is no strategy strategy == "no strategy. judge on an absolute scale."
}// otherwise, there is no strategy strategy == "zero strategy. judge on an absolute scale."

// Scooooooore
var scoresfirstlast = {scores:scores, radiusFirst:radiusFirst , radiusLast:radiusLast, dottedCircle:dottedCircle}
Expand Down Expand Up @@ -751,7 +751,7 @@ function GaussianVoters(config){ // this config comes from addVoters in main_san
if (r1 < self.percentStrategy) {
var strategy = self.strategy // yes
} else {
var strategy = self.unstrategic; // no e.g. "no strategy. judge on an absolute scale."
var strategy = self.unstrategic; // no e.g. "zero strategy. judge on an absolute scale."
}

var ballot = self.type.getBallot(x, y, strategy, config);
Expand Down
8 changes: 4 additions & 4 deletions play/js/main_ballot.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ window.ONLY_ONCE = false;
function main(config){

ballotType = config.system;
config.strategy = config.strategy || "no strategy. judge on an absolute scale.";
config.strategy = config.strategy || "zero strategy. judge on an absolute scale.";
config.frontrunnerSet = config.frontrunnerSet || new Set(["square"]);
config.showChoiceOfStrategy = config.showChoiceOfStrategy || false
config.showChoiceOfFrontrunners = config.showChoiceOfFrontrunners || false
Expand Down Expand Up @@ -53,11 +53,11 @@ function main(config){
if(config.showChoiceOfStrategy) {

var strategyOn = [
{name:"NO", realname:"no strategy. judge on an absolute scale.", margin:4},
{name:"O", realname:"zero strategy. judge on an absolute scale.", margin:4},
{name:"N", realname:"normalize", margin:4},
{name:"F", realname:"normalize frontrunners only", margin:4},
{name:"BF", realname:"best frontrunner", margin:4},
{name:"NwF", realname:"not the worst frontrunner"}
{name:"B", realname:"best frontrunner", margin:4},
{name:"W", realname:"not the worst frontrunner"}
];
// old ones
// {name:"FL", realname:"justfirstandlast", margin:4},
Expand Down
16 changes: 8 additions & 8 deletions play/js/main_sandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ function main(config){
config.voterStrategies = config.voterStrategies || []
config.description = config.description || ""
for (i in [0,1,2]) {
config.voterStrategies[i] = config.voterStrategies[i] || "no strategy. judge on an absolute scale."
config.voterStrategies[i] = config.voterStrategies[i] || "zero strategy. judge on an absolute scale."
}
config.voterPercentStrategy = config.voterPercentStrategy || []
for (i in [0,1,2]) {
config.voterPercentStrategy[i] = config.voterPercentStrategy[i] || 0
}
config.snowman = config.snowman || false;

config.unstrategic = config.unstrategic || "no strategy. judge on an absolute scale.";
config.unstrategic = config.unstrategic || "zero strategy. judge on an absolute scale.";
config.keyyee = config.keyyee || "off";
config.afrontrunnerArray = Array.from(config.frontrunnerSet)// stringify a set is not good
var initialConfig = JSON.parse(JSON.stringify(config));
Expand Down Expand Up @@ -316,11 +316,11 @@ function main(config){
// strategy

var strategyOn = [
{name:"NO", realname:"no strategy. judge on an absolute scale.", margin:5},
{name:"O", realname:"zero strategy. judge on an absolute scale.", margin:5},
{name:"N", realname:"normalize", margin:5},
{name:"F", realname:"normalize frontrunners only", margin:5},
{name:"BF", realname:"best frontrunner", margin:5},
{name:"NwF", realname:"not the worst frontrunner"}
{name:"B", realname:"best frontrunner", margin:5},
{name:"W", realname:"not the worst frontrunner"}
];
// old ones
// {name:"FL", realname:"justfirstandlast", margin:5},
Expand Down Expand Up @@ -430,11 +430,11 @@ function main(config){
// unstrategic

var strategyOff = [
{name:"NO", realname:"no strategy. judge on an absolute scale.", margin:5},
{name:"O", realname:"zero strategy. judge on an absolute scale.", margin:5},
{name:"N", realname:"normalize", margin:5},
{name:"F", realname:"normalize frontrunners only", margin:5},
{name:"BF", realname:"best frontrunner", margin:5},
{name:"NwF", realname:"not the worst frontrunner"}
{name:"B", realname:"best frontrunner", margin:5},
{name:"W", realname:"not the worst frontrunner"}
];
// old ones
// {name:"FL", realname:"justfirstandlast", margin:5},
Expand Down

0 comments on commit 6732518

Please sign in to comment.