Exemplo n.º 1
0
  public double getBinScore(Wave w, Point2D.Double targetLocation) {
    double binScore = 0;

    GuessFactorWindowSet gfWindow = w.guessFactorWindow(targetLocation);
    int lowIndex = w.guessFactorIndex(gfWindow.guessFactorLow);
    int highIndex = w.guessFactorIndex(gfWindow.guessFactorHigh);

    binScore +=
        _highStatBuffers.getWindowScore(
            w.targetScan, w.targetScan.getInverseScan(), w.bulletPower, BINS, lowIndex, highIndex);
    binScore +=
        _lowStatBuffers.getWindowScore(
            w.targetScan, w.targetScan.getInverseScan(), w.bulletPower, BINS, lowIndex, highIndex);

    if (_flattenerEnabled) {
      binScore +=
          _extraFlatStatBuffers.getWindowScore(
              w.targetScan,
              w.targetScan.getInverseScan(),
              w.bulletPower,
              BINS,
              lowIndex,
              highIndex);
    }

    return binScore;
  }
Exemplo n.º 2
0
  public void disableFlattener() {
    _flattenerEnabled = false;

    _waveRegisters.remove(_highStatBuffers);
    _waveRegisters.remove(_lowStatBuffers);

    if (_robot.getRoundNum() >= 3 && normalizedEnemyHitPercentage() < 4) {
      _highStatBuffers.setBulletHitWeight(0.2);
      _lowStatBuffers.setBulletHitWeight(0.2);
    } else {
      _highStatBuffers.setBulletHitWeight(1.0);
      _lowStatBuffers.setBulletHitWeight(1.0);
    }

    System.out.println("Curve Flattening disabled.");
  }
Exemplo n.º 3
0
 public int getBestBin(BotScan scan, BotScan enemyScan, double bulletPower, int bins) {
   return _statBuffers.getBestBin(scan, enemyScan, bulletPower, bins, _lowBin, _highBin);
 }
Exemplo n.º 4
0
 public void restore(AdvancedRobot robot, String enemyName) {
   _statBuffers.restore(robot, enemyName);
 }
Exemplo n.º 5
0
 public void save(AdvancedRobot robot, String enemyName) {
   _statBuffers.save(robot, enemyName);
 }