Skip to content

Commit e978d95

Browse files
committed
COG 2023 RC4. Faster expansions in Robo mirror. Hopefully fixing direction of disengage formations. Restoring Opponents
1 parent c40d1d1 commit e978d95

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

src/Micro/Formation/FormationStandard.scala

+7-4
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,13 @@ final class FormationStandard(val group: FriendlyUnitGroup, var style: Formation
145145
}
146146
val apexI = Maff.minBy(goalPathTiles.indices)(i => scoreApex(i, goalPathTiles(i)))
147147
apex = apexI.map(goalPathTiles(_).center).getOrElse(goal)
148-
face = targetNear
149-
.map(_.pixel)
150-
.orElse(apexI.map(_ + 1 + Maff.div32(group.meanAttackerRange.toInt)).flatMap(goalPathTiles.drop(_).lastOption).map(_.center))
151-
.getOrElse(goal)
148+
face = targetNear.map(_.pixel).getOrElse(?(
149+
style == FormationStyleDisengage,
150+
vanguardCentroid,
151+
apexI
152+
.map(_ + 1 + Maff.div32(group.meanAttackerRange.toInt))
153+
.flatMap(goalPathTiles.drop(_).lastOption).map(_.center)
154+
.getOrElse(?(style == FormationStyleDisengage, vanguardCentroid, goal))))
152155
}
153156
}
154157

src/Micro/Matchups/MatchupAnalysis.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ case class MatchupAnalysis(me: UnitInfo) {
7676
private val _inTankRange = new Cache(() => threatsInRange.exists(Terran.SiegeTankSieged))
7777
private val _inRangeOfTank = new Cache(() => targetsInRange.exists(Terran.SiegeTankSieged))
7878
private val _withinSafetyMargin = new Cache(() => pixelsEntangled <= ?(me.flying && me.topSpeed > groupVs.maxAttackerSpeedVsAir, -64, -safetyMargin))
79-
private val _threateningMiners = new Cache(() => targets.exists(t => IsWorker(t) && t.friendly.flatMap(_.intent.toGather).orElse(t.orderTarget).exists(r => r.unitClass.isResource && r.base.exists(t.base.contains) && me.pixelDistanceEdge(r) + me.pixelDistanceEdge(t) < 160 + 2 * me.pixelRangeGround)))
79+
private val _threateningMiners = new Cache(() => targets.exists(t => IsWorker(t) && t.friendly.flatMap(_.intent.toGather).orElse(t.orderTarget).exists(r => r.unitClass.isResource && r.base.exists(t.base.contains) && me.pixelDistanceEdge(r) + me.pixelDistanceEdge(t) < 96 + 2 * me.pixelRangeGround)))
8080
private val _targetedByScarab = new Cache(() => me.battle.exists(_.scarabTargets.exists(_._2 == me)))
8181
private val _framesToLive = new Cache(() => me.likelyDoomedInFrames)
8282
private val _wantsToVolley = new Cache(() => ?( ! me.canMove, None, // If we're stationary, we're unopinionated

src/Planning/Plans/GamePlans/Protoss/PvP/PvPLateGame.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PvPLateGame extends GameplanImperative {
9393
shouldAttack ||= reaverShuttleCombo
9494
shouldAttack ||= With.fingerprints.cannonRush() || With.fingerprints.forgeFe()
9595
shouldAttack ||= dtBraveryAbroad && ! enemiesHaveComplete(Protoss.PhotonCannon)
96-
shouldAttack ||= With.geography.enemyBases.exists(_.natural.exists(With.scouting.weControl)) && employing(PvP3GateGoon, PvP4GateGoon) && ! enemyStrategy(With.fingerprints.threeGateGoon, With.fingerprints.fourGateGoon)
96+
shouldAttack ||= (With.scouting.ourMuscleOrigin.metro.exists(_.isEnemy) || With.geography.enemyBases.exists(_.natural.exists(With.scouting.weControl))) && employing(PvP3GateGoon, PvP4GateGoon) && ! enemyStrategy(With.fingerprints.threeGateGoon, With.fingerprints.fourGateGoon)
9797
shouldAttack ||= estimatedArmyDifferential > 3 * Protoss.Dragoon.skimulationValue
9898
shouldAttack &&= PvPIdeas.pvpSafeToMoveOut
9999
shouldAttack &&= ! fearDeath

src/Planning/Plans/GamePlans/Protoss/PvP/PvPOpening.scala

+1
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ class PvPOpening extends GameplanImperative {
357357
} else if (PvPRobo()) {
358358
shouldExpand = haveComplete(Protoss.Reaver)
359359
shouldExpand ||= ! getReavers && unitsComplete(IsWarrior) >= ?(enemyBases > 1, 6, 12)
360+
shouldExpand ||= enemyRobo
360361
shouldExpand &&= PvPIdeas.pvpSafeToMoveOut
361362
shouldExpand &&= ! shuttleSpeed
362363
shouldExpand &&= Protoss.DragoonRange()

src/Strategery/Selection/Opponents.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object Opponents {
1212

1313
// COG 2023
1414
val bananabrain : Opponent = add("BananaBrain", StrategySelectionGreedy())
15-
val stardust : Opponent = add("Stardust", StrategySelectionRandom) //new StrategySelectionRecommended(StrategySelectionGreedy(), PvPDT))
15+
val stardust : Opponent = add("Stardust", new StrategySelectionRecommended(StrategySelectionGreedy(), PvPDT))
1616
val mcrave : Opponent = add("McRave", StrategySelectionFixed(PvZ1BaseStargate))
1717
val microwave : Opponent = add("Microwave", new StrategySelectionRecommended(StrategySelectionGreedy(), PvZ1BaseGoonReaver))
1818
val cunybot : Opponent = add("CUNYbot", StrategySelectionFixed(PvZ1BaseSpeedlotArchon))

0 commit comments

Comments
 (0)