Exemplo n.º 1
0
 def stdDevPredictedScoreForAlliance(self, alliance):
     alliance = map(self.su.replaceWithAverageIfNecessary, alliance)
     fuelPts = self.getStandardDevShotPointsForAlliance(alliance)
     liftoffPts = utils.sumStdDevs(
         map(lambda t: (t.calculatedData.sdLiftoffAbility or 0), alliance))
     gearPts = self.getStdDevGearPointsForAlliance(alliance)
     return utils.sumStdDevs([fuelPts, liftoffPts, gearPts])
Exemplo n.º 2
0
 def getStandardDevShotPointsForTeam(self, team):
     return utils.sumStdDevs([
         (team.calculatedData.sdHighShotsTele or 0) / 3.0,
         (team.calculatedData.sdLowShotsTele or 0) / 9.0,
         (team.calculatedData.sdHighShotsAuto or 0),
         (team.calculatedData.sdLowShotsAuto or 0) / 3.0
     ])
Exemplo n.º 3
0
 def getStdDevGearPointsForAlliance(self, alliance):
     totalGearsAuto = sum(map(lambda t: t.calculatedData.avgGearsPlacedAuto or 0, alliance))
     totalGears = self.getTotalAverageGearsForAlliance(alliance)
     sdGearsAuto = self.standardDeviationForRetrievalFunctionForAlliance(lambda t: t.calculatedData.sdGearsPlacedAuto, alliance)
     sdGearsTele = self.standardDeviationForRetrievalFunctionForAlliance(lambda t: t.calculatedData.sdGearsPlacedTele, alliance)
     autoInd = self.getRotorForIncrementForGears(sdGearsAuto, self.autoGearIncrements)
     autoRotors = self.monteCarloForMeanForStDevForValueFunction(totalGearsAuto, sdGearsAuto, lambda g: self.getRotorForIncrementForGears(g, self.autoGearIncrements))
     teleRotors = self.monteCarloForMeanForStDevForValueFunction(totalGears, utils.sumStdDevs([sdGearsAuto, sdGearsTele]), lambda g: self.getRotorForIncrementForGears(g, self.teleGearIncrements[autoInd:]))
     return autoRotors * 60 + teleRotors * 40
Exemplo n.º 4
0
 def standardDeviationForRetrievalFunctionForAlliance(
         self, retrievalFunction, alliance):
     return utils.sumStdDevs(map(retrievalFunction, alliance))