bayesian-battle
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -1,2 +0,2 @@ | ||
// Generated by CoffeeScript 1.7.1 | ||
// Generated by CoffeeScript 1.10.0 | ||
var BayesianBattle, _; | ||
@@ -38,22 +38,22 @@ | ||
BayesianBattle.prototype.updatePlayerSkills = function(playerAndScoreObjectsArray) { | ||
var chanceOfPlayerOneBeatingPlayerTwo, chanceOfPlayerTwoBeatingPlayerOne, meanStrengthChangePartial, meanStrengthChangePartialSum, meanStrengthChangePartials, pairwiseGameOutcomeValue, pairwisePerformanceUncertainty, player, playerOne, playerTwo, returnArray, squaredDeviationChangePartial, squaredStandardDeviationChangePartialSum, squaredStandardDeviationChangePartials, _i, _j, _len, _len1, _ref; | ||
var chanceOfPlayerOneBeatingPlayerTwo, chanceOfPlayerTwoBeatingPlayerOne, i, j, len, len1, meanStrengthChangePartial, meanStrengthChangePartialSum, meanStrengthChangePartials, pairwiseGameOutcomeValue, pairwisePerformanceUncertainty, player, playerOne, playerTwo, ref, returnArray, squaredDeviationChangePartial, squaredStandardDeviationChangePartialSum, squaredStandardDeviationChangePartials; | ||
this.validateInputArray(playerAndScoreObjectsArray); | ||
returnArray = _.cloneDeep(playerAndScoreObjectsArray); | ||
for (_i = 0, _len = returnArray.length; _i < _len; _i++) { | ||
playerOne = returnArray[_i]; | ||
for (i = 0, len = returnArray.length; i < len; i++) { | ||
playerOne = returnArray[i]; | ||
meanStrengthChangePartials = []; | ||
squaredStandardDeviationChangePartials = []; | ||
_ref = (function() { | ||
var _k, _len1, _results; | ||
_results = []; | ||
for (_k = 0, _len1 = returnArray.length; _k < _len1; _k++) { | ||
player = returnArray[_k]; | ||
ref = (function() { | ||
var l, len1, results; | ||
results = []; | ||
for (l = 0, len1 = returnArray.length; l < len1; l++) { | ||
player = returnArray[l]; | ||
if (player !== playerOne) { | ||
_results.push(player); | ||
results.push(player); | ||
} | ||
} | ||
return _results; | ||
return results; | ||
})(); | ||
for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { | ||
playerTwo = _ref[_j]; | ||
for (j = 0, len1 = ref.length; j < len1; j++) { | ||
playerTwo = ref[j]; | ||
pairwisePerformanceUncertainty = this.calculateTotalPerformanceUncertainty(playerOne.standardDeviation, playerTwo.standardDeviation); | ||
@@ -80,6 +80,6 @@ chanceOfPlayerOneBeatingPlayerTwo = this.calculateChanceOfPlayerOneBeatingPlayerTwo(playerOne.meanStrength, playerTwo.meanStrength, pairwisePerformanceUncertainty); | ||
BayesianBattle.prototype.validateInputArray = function(playerAndScoreObjectsArray) { | ||
var playerAndScoreObject, _i, _len; | ||
var i, len, playerAndScoreObject; | ||
this.validatePlayerArrayLength(playerAndScoreObjectsArray); | ||
for (_i = 0, _len = playerAndScoreObjectsArray.length; _i < _len; _i++) { | ||
playerAndScoreObject = playerAndScoreObjectsArray[_i]; | ||
for (i = 0, len = playerAndScoreObjectsArray.length; i < len; i++) { | ||
playerAndScoreObject = playerAndScoreObjectsArray[i]; | ||
this.validateRequiredProperties(playerAndScoreObject); | ||
@@ -86,0 +86,0 @@ this.validatePlayerObjectValues(playerAndScoreObject, playerAndScoreObjectsArray.length); |
{ | ||
"name": "bayesian-battle", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"author": "Michael Schmatz <michael@codecombat.com> (http://github.com/schmatz)", | ||
@@ -14,3 +14,3 @@ "description":"An implementation of a Bayesian-approximation based game ranking system described by Weng and Lin and used by HackerRank.", | ||
"dependencies": { | ||
"lodash":"" | ||
"lodash":"~3.10.1" | ||
}, | ||
@@ -17,0 +17,0 @@ "main":"lib/bayesian-battle/bayesianBattle", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
1
15885
1
+ Addedlodash@3.10.1(transitive)
- Removedlodash@4.17.21(transitive)
Updatedlodash@~3.10.1