summaryrefslogtreecommitdiff
path: root/lib/scoring_algorithms/ScoringAlgorithms.rb
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-22 01:46:13 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-22 01:46:13 -0400
commitaa8437947b28dda73bcfaf3caccb738e5e2f48b3 (patch)
tree8d1a4994bb3fab9b4e89712ab43b416cdfeef3ed /lib/scoring_algorithms/ScoringAlgorithms.rb
parentd3bee0f1ce0c5dc3fa741338bc6d9914e9e92787 (diff)
Made Scoring Algorithm files use the statistics interface and accept matches for a more general approach.
Diffstat (limited to 'lib/scoring_algorithms/ScoringAlgorithms.rb')
-rw-r--r--lib/scoring_algorithms/ScoringAlgorithms.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/scoring_algorithms/ScoringAlgorithms.rb b/lib/scoring_algorithms/ScoringAlgorithms.rb
deleted file mode 100644
index 7f8ec12..0000000
--- a/lib/scoring_algorithms/ScoringAlgorithms.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-class ScoringAlgorithm
- def self.score(*args)
- end
-end
-
-class FibonacciPeerWithBlowout < ScoringAlgorithm
- def self.score(votes, win, blowout)
- fibonacci = Hash.new{ |h,k| h[k] = k < 2 ? k : h[k-1] + h[k-2] }
- fibonacci[votes+3] + (win ? blowout ? 12 : 10 : blowout ? 5 : 7)
- end
-end
-
-class WinnerTakesAll < ScoringAlgorithm
- def self.score(win)
- win.nil? ? 0.5 : win ? 1 : 0
- end
-end
-
-class MarginalPeer < ScoringAlgorithm
- def self.score(rating)
- rating
- end
-end
-
-
-#puts Recommended.score(4, true, false)
-#puts WinnerTakesAll.score(nil)
-#puts WinnerTakesAll.score(true)