コード例 #1
0
ファイル: DookiCape.java プロジェクト: louisccc/QRobot
  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;
  }
コード例 #2
0
ファイル: DookiCape.java プロジェクト: louisccc/QRobot
  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.");
  }