Exemplo n.º 1
0
    def __init__(self, orders: List[Union[ActBase, List[ActBase]]]):
        """
        Build order package that replaces normal build order for Zerg with one that builds mutalisks to destroy terran
        flying buildings.
        Add any PlanDistributeWorkers acts with orders
        """
        cover_list = SequentialList([
            PlanDistributeWorkers(),
            AutoOverLord(),
            Step(None, ZergUnit(UnitTypeId.DRONE, 20), skip=Supply(198)),
            StepBuildGas(4, None),
            MorphLair(),
            ActBuilding(UnitTypeId.SPIRE, 1),
            Step(
                None,
                DefensiveBuilding(UnitTypeId.SPORECRAWLER,
                                  DefensePosition.BehindMineralLineCenter),
                skip_until=Supply(199),
            ),
            Step(
                None,
                DefensiveBuilding(UnitTypeId.SPINECRAWLER,
                                  DefensePosition.Entrance),
                skip_until=Supply(199),
            ),
            ZergUnit(UnitTypeId.MUTALISK, 10),
        ])

        new_build_order = [
            Step(None, cover_list, skip_until=self.should_build_mutalisks),
            Step(None, BuildOrder(orders), skip=self.should_build_mutalisks),
        ]
        super().__init__(new_build_order)
Exemplo n.º 2
0
 async def create_plan(self) -> BuildOrder:
     flying_buildings = lambda k: self._bot.enemy_structures.flying.exists and self._bot.supply_used > 30
     in_case_of_air = [
         Step(flying_buildings, StepBuildGas(2)),
         ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 20),
         MorphLair(),
         ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 30),
         StepBuildGas(4),
         ActBuilding(UnitTypeId.SPIRE),
         ZergUnit(UnitTypeId.MUTALISK, 10, priority=True)
     ]
     return BuildOrder([
         SequentialList([
             ActBuilding(UnitTypeId.SPAWNINGPOOL, 1),
             ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 14),
             StepBuildGas(1),
             ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 14),
             ActUnit(UnitTypeId.OVERLORD, UnitTypeId.LARVA, 2),
             ActBuilding(UnitTypeId.ROACHWARREN, 1),
             ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 14),
             ActUnit(UnitTypeId.QUEEN, UnitTypeId.HATCHERY, 1),
             ActUnit(UnitTypeId.ROACH, UnitTypeId.LARVA, 100),
         ]), in_case_of_air,
         SequentialList([
             DistributeWorkers(),
             Step(None, SpeedMining(), lambda ai: ai.client.game_step > 5),
             PlanZoneDefense(),
             AutoOverLord(),
             InjectLarva(),
             PlanZoneGather(),
             Step(UnitExists(UnitTypeId.ROACH, 7), PlanZoneAttackAllIn(1)),
             PlanFinishEnemy(),
         ])
     ])
Exemplo n.º 3
0
 async def create_plan(self) -> BuildOrder:
     flying_buildings = lambda k: self._bot.enemy_structures.flying.exists and self._bot.supply_used > 30
     in_case_of_air = [
         Step(flying_buildings, StepBuildGas(2)),
         ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 20),
         MorphLair(),
         ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 30),
         StepBuildGas(4),
         ActBuilding(UnitTypeId.SPIRE),
         ZergUnit(UnitTypeId.MUTALISK, 10, priority=True)
     ]
     limit_gas = Any(
         [Gas(100),
          TechReady(UpgradeId.ZERGLINGMOVEMENTSPEED, 0.001)])
     return BuildOrder([
         SequentialList([
             ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 14),
             Expand(2),
             StepBuildGas(1),
             ActBuilding(UnitTypeId.SPAWNINGPOOL, 1),
             ActUnit(UnitTypeId.OVERLORD, UnitTypeId.LARVA, 2),
             Step(None,
                  Tech(UpgradeId.ZERGLINGMOVEMENTSPEED,
                       UnitTypeId.SPAWNINGPOOL),
                  skip_until=Gas(100)),
             ActUnit(UnitTypeId.QUEEN, UnitTypeId.HATCHERY, 1),
             ActUnit(UnitTypeId.ZERGLING, UnitTypeId.LARVA, 30),
             ActBuilding(UnitTypeId.BANELINGNEST, 1),
             BuildOrder([
                 Step(None,
                      ActUnit(UnitTypeId.ZERGLING, UnitTypeId.LARVA, 200),
                      skip=RequireCustom(lambda k: self._bot.vespene > 25 or
                                         flying_buildings)),
                 Step(None,
                      ActUnit(UnitTypeId.BANELING, UnitTypeId.ZERGLING,
                              200),
                      skip=RequireCustom(flying_buildings)),
             ])
         ]),
         SequentialList([
             Step(None, DistributeWorkers(), skip=limit_gas),
             Step(limit_gas,
                  DistributeWorkers(1, 1),
                  skip=RequireCustom(flying_buildings)),
             Step(RequireCustom(flying_buildings), DistributeWorkers()),
         ]), in_case_of_air,
         SequentialList([
             Step(None, SpeedMining(), lambda ai: ai.client.game_step > 5),
             PlanZoneDefense(),
             AutoOverLord(),
             InjectLarva(),
             PlanZoneGather(),
             Step(TechReady(UpgradeId.ZERGLINGMOVEMENTSPEED),
                  PlanZoneAttackAllIn(10)),
             PlanFinishEnemy(),
         ])
     ])
Exemplo n.º 4
0
 def __init__(self, unit_type: UnitTypeId, amount: int):
     super().__init__()
     self.micro = MicroRules()
     self.micro.load_default_methods()
     self.micro.unit_micros[UnitTypeId.ZERGLING] = SuicideLingMicro()
     self.started = False
     self.ended = False
     self.unit_type = unit_type
     self.amount = amount
     self.lair_tech = MorphLair()
     self.network = ActBuilding(UnitTypeId.NYDUSNETWORK, to_count=1)
     self.zerg_build = ZergUnit(unit_type)
     self.tags: List[int] = []
Exemplo n.º 5
0
    def __init__(self, amount: int):
        super().__init__()
        # custom micro to make sure lings just attack
        self.micro = MicroRules()
        self.micro.load_default_methods()
        self.micro.generic_micro = NoMicro()

        self.started = False
        self.ended = False

        self.amount = amount
        self.lair_tech = MorphLair()
        self.network = ActBuilding(UnitTypeId.NYDUSNETWORK, to_count=1)
        self.zerg_build = ZergUnit(UnitTypeId.ZERGLING)
        self.nydus_spot: Point2 = Point2((0, 0))
Exemplo n.º 6
0
 def __init__(self):
     """Create the build order."""
     opener = SequentialList(
         Step(
             RequiredUnitReady(UnitTypeId.SPAWNINGPOOL),
             NatSpines(4),
             skip=RequiredUnitReady(UnitTypeId.SPINECRAWLER, count=4),
             skip_until=lambda k: k.build_detector.rush_detected,
         ), Step(None, ZergUnit(UnitTypeId.DRONE, to_count=13)),
         Step(None, ZergUnit(UnitTypeId.OVERLORD, to_count=2)),
         Step(None, ZergUnit(UnitTypeId.DRONE, to_count=17)),
         Step(None,
              ActExpand(2, priority=True,
                        consider_worker_production=False)),
         Step(
             UnitExists(UnitTypeId.HATCHERY,
                        count=2,
                        include_pending=True,
                        include_not_ready=True),
             ZergUnit(UnitTypeId.DRONE, to_count=18),
         ), Step(None, ActBuilding(UnitTypeId.SPAWNINGPOOL)),
         Step(None, ZergUnit(UnitTypeId.DRONE, to_count=20)),
         StepBuildGas(1),
         Step(RequiredUnitReady(UnitTypeId.SPAWNINGPOOL),
              ZergUnit(UnitTypeId.QUEEN, 2)),
         Step(RequiredUnitReady(UnitTypeId.SPAWNINGPOOL),
              ZergUnit(UnitTypeId.ZERGLING, 6)),
         Step(None, ZergUnit(UnitTypeId.OVERLORD, to_count=3)),
         BuildOrder([
             Step(RequiredGas(100), MorphLair()),
             Step(
                 None,
                 ZergUnit(UnitTypeId.DRONE),
                 skip=UnitExists(UnitTypeId.LAIR,
                                 include_pending=True,
                                 include_not_ready=True),
             ),
         ])
         # end of build hard order, switch to reactive play
     )
     super().__init__([opener, AutoOverLord()])
Exemplo n.º 7
0
    def __init__(self):
        """Create the build order."""
        self.drone = ZergUnit(UnitTypeId.DRONE, to_count=0)
        self.queen = ZergUnit(UnitTypeId.QUEEN, to_count=3, priority=True)
        self.zergling = ZergUnit(UnitTypeId.ZERGLING, to_count=0)
        self.roach = ZergUnit(UnitTypeId.ROACH, to_count=0)
        self.ravager = MorphRavager(target_count=0)
        self.swarmhost = ZergUnit(UnitTypeId.SWARMHOSTMP, to_count=0)
        ling_scout = BuildOrder([Step(RequiredTime(4 * 60), LingScout(2, ScoutLocation.scout_enemy3()))])
        run_by = Step(
            RequiredTime(4 * 60), RunBy(UnitTypeId.ZERGLING, 8, 1)
        )
        units = BuildOrder(
            [
                Step(None, self.drone),
                Step(UnitExists(UnitTypeId.SPAWNINGPOOL), self.queen),
                Step(UnitExists(UnitTypeId.INFESTATIONPIT), self.swarmhost),
                Step(UnitExists(UnitTypeId.ROACHWARREN), self.roach),
                Step(UnitExists(UnitTypeId.ROACH), self.ravager),
                Step(UnitExists(UnitTypeId.SPAWNINGPOOL), self.zergling),
            ]
        )
        self.gas = StepBuildGas(to_count=0)
        tech_buildings = BuildOrder(
            Step(
                UnitExists(UnitTypeId.DRONE, 30),
                BuildOrder(
                    [
                        Step(None, ActBuilding(UnitTypeId.ROACHWARREN)),
                        Step(None, MorphLair()),
                        Step(
                            RequiredAll(
                                [
                                    UnitExists(UnitTypeId.LAIR),
                                    UnitExists(UnitTypeId.EVOLUTIONCHAMBER),
                                    UnitExists(UnitTypeId.HATCHERY, 3),
                                ]
                            ),
                            ActBuilding(UnitTypeId.INFESTATIONPIT),
                        ),
                        Step(None, ActBuilding(UnitTypeId.EVOLUTIONCHAMBER)),
                        Step(UnitExists(UnitTypeId.HATCHERY, 4), ActBuilding(UnitTypeId.EVOLUTIONCHAMBER, 2)),
                    ]
                ),
            )
        )
        bases = BuildOrder(
            [
                Step(None, ActExpand(to_count=3, priority=True, consider_worker_production=False)),
                Step(UnitExists(UnitTypeId.DRONE, 60), ActExpand(4, priority=True, consider_worker_production=False)),
            ]
        )

        nat_spines = Step(
            UnitExists(UnitTypeId.SPAWNINGPOOL),
            NatSpines(4),
            skip=UnitExists(UnitTypeId.SPINECRAWLER, count=4),
            skip_until=lambda k: k.build_detector.rush_detected,
        )
        super().__init__(
            [
                nat_spines,
                units,
                tech_buildings,
                self.gas,
                bases,
                MassExpand(),
                AutoOverLord(),
                StandardUpgrades(),
                # ling_scout,
                run_by,
            ]
        )
Exemplo n.º 8
0
    def __init__(self):
        self.drone = ZergUnit(UnitTypeId.DRONE)
        self.queen = ZergUnit(UnitTypeId.QUEEN, to_count=3)
        self.zergling = ZergUnit(UnitTypeId.ZERGLING)
        self.baneling = ZergUnit(UnitTypeId.BANELING)
        self.ultra = ZergUnit(UnitTypeId.ULTRALISK, to_count=15)
        self.corruptor = ZergUnit(UnitTypeId.CORRUPTOR, to_count=40)
        self.mutalisk = ZergUnit(UnitTypeId.MUTALISK)
        self.overseer = ZergUnit(UnitTypeId.OVERSEER, to_count=3)

        build_units = BuildOrder(
            [
                Step(None, self.drone),
                Step(UnitExists(UnitTypeId.SPAWNINGPOOL), self.queen),
                Step(UnitExists(UnitTypeId.ULTRALISKCAVERN), self.ultra, skip_until=self.should_build_ultras),
                Step(UnitExists(UnitTypeId.SPIRE), self.corruptor, skip_until=self.should_build_air),
                Step(UnitExists(UnitTypeId.SPIRE), self.mutalisk, skip_until=self.should_build_air),
                Step(UnitExists(UnitTypeId.BANELINGNEST), self.baneling),
                Step(UnitExists(UnitTypeId.SPAWNINGPOOL), self.zergling),
                Step(
                    UnitExists(UnitTypeId.LAIR),
                    self.overseer,
                    skip_until=lambda k: k.enemy_units_manager.enemy_cloak_trigger,
                ),
            ]
        )

        tech_buildings = BuildOrder(
            Step(None, Expand(3, priority=True, consider_worker_production=False), skip_until=self.take_third),
            Step(None, StepBuildGas(to_count=2)),
            Step(UnitExists(UnitTypeId.LAIR), StepBuildGas(4)),
            Step(None, ActBuilding(UnitTypeId.SPAWNINGPOOL)),
            Step(UnitExists(UnitTypeId.SPAWNINGPOOL), ActBuilding(UnitTypeId.BANELINGNEST)),
            Step(UnitExists(UnitTypeId.BANELINGNEST), MorphLair()),
            Step(
                All([UnitExists(UnitTypeId.DRONE, 60), UnitExists(UnitTypeId.LAIR)]),
                ActBuilding(UnitTypeId.INFESTATIONPIT),
            ),
            Step(UnitExists(UnitTypeId.INFESTATIONPIT), StepBuildGas(6)),
            Step(UnitExists(UnitTypeId.LAIR), ActBuilding(UnitTypeId.EVOLUTIONCHAMBER, to_count=2)),
            Step(All([UnitExists(UnitTypeId.LAIR), UnitExists(UnitTypeId.INFESTATIONPIT)]), MorphHive()),
            Step(UnitExists(UnitTypeId.HIVE), ActBuilding(UnitTypeId.ULTRALISKCAVERN)),
            Step(UnitExists(UnitTypeId.LAIR), ActBuilding(UnitTypeId.SPIRE), skip_until=self.should_build_air),
            Step(UnitExists(UnitTypeId.HIVE), StepBuildGas(8))
        )

        upgrades = BuildOrder(
            Step(
                All([UnitExists(UnitTypeId.BANELINGNEST), UnitExists(UnitTypeId.LAIR)]),
                Tech(UpgradeId.CENTRIFICALHOOKS),
            ),
            SequentialList(
                Step(None, Tech(UpgradeId.ZERGMELEEWEAPONSLEVEL1)),
                Step(UnitExists(UnitTypeId.LAIR), Tech(UpgradeId.ZERGMELEEWEAPONSLEVEL2)),
                Step(UnitExists(UnitTypeId.HIVE), Tech(UpgradeId.ZERGMELEEWEAPONSLEVEL3)),
            ),
            SequentialList(
                Step(
                    UnitExists(UnitTypeId.EVOLUTIONCHAMBER, 2, include_not_ready=False, include_pending=False),
                    Tech(UpgradeId.ZERGGROUNDARMORSLEVEL1),
                ),
                Step(UnitExists(UnitTypeId.LAIR), Tech(UpgradeId.ZERGGROUNDARMORSLEVEL2)),
                Step(UnitExists(UnitTypeId.HIVE), Tech(UpgradeId.ZERGGROUNDARMORSLEVEL3)),
            ),
            Step(UnitExists(UnitTypeId.SPAWNINGPOOL), Tech(UpgradeId.ZERGLINGMOVEMENTSPEED)),
            Step(
                All([UnitExists(UnitTypeId.SPAWNINGPOOL), UnitExists(UnitTypeId.HIVE)]),
                Tech(UpgradeId.ZERGLINGATTACKSPEED),
            ),
            SequentialList(
                Step(UnitExists(UnitTypeId.ULTRALISKCAVERN), Tech(UpgradeId.CHITINOUSPLATING)),
                Step(UnitExists(UnitTypeId.ULTRALISKCAVERN), Tech(UpgradeId.ANABOLICSYNTHESIS)),
            ),
            SequentialList(
                Step(UnitExists(UnitTypeId.SPIRE), Tech(UpgradeId.ZERGFLYERWEAPONSLEVEL1)),
                Step(UnitExists(UnitTypeId.SPIRE), Tech(UpgradeId.ZERGFLYERWEAPONSLEVEL2)),
                Step(
                    All(
                        [
                            UnitExists(UnitTypeId.SPIRE),
                            UnitExists(UnitTypeId.HIVE),
                        ]
                    ),
                    Tech(UpgradeId.ZERGFLYERWEAPONSLEVEL3),
                ),
                Step(UnitExists(UnitTypeId.SPIRE), Tech(UpgradeId.ZERGFLYERARMORSLEVEL1)),
                Step(UnitExists(UnitTypeId.SPIRE), Tech(UpgradeId.ZERGFLYERARMORSLEVEL2)),
                Step(
                    All(
                        [
                            UnitExists(UnitTypeId.SPIRE),
                            UnitExists(UnitTypeId.HIVE),
                        ]
                    ),
                    Tech(UpgradeId.ZERGFLYERARMORSLEVEL3),
                ),
            ),
            Step(TechReady(UpgradeId.CENTRIFICALHOOKS), Tech(UpgradeId.OVERLORDSPEED)),
        )

        super().__init__([PaulAutoOverLord(), upgrades, tech_buildings, build_units, MassExpand()])
Exemplo n.º 9
0
    async def create_plan(self) -> BuildOrder:
        queens_manager = self._bot.knowledge.get_manager(QueensSc2Manager)

        # Policies originally from QueenBot: https://aiarena.net/bots/201/
        early_game_queen_policy = {
            "creep_queens": {
                "active": True,
                "distance_between_queen_tumors": 3,
                "first_tumor_position": self._bot.zone_manager.own_natural.center_location.towards(
                    self._bot.game_info.map_center, 9
                ),
                "priority": True,
                "prioritize_creep": lambda: True,
                "max": 2,
                "defend_against_ground": True,
                "rally_point": self._bot.zone_manager.own_natural.center_location,
                "priority_defence_list": {
                    UnitTypeId.ZERGLING,
                    UnitTypeId.MARINE,
                    UnitTypeId.ZEALOT
                },
            },
            "creep_dropperlord_queens": {
                "active": True,
                "priority": True,
                "max": 1,
                "pass_own_threats": True,
                "target_expansions": [
                    el[0] for el in self._bot.expansion_locations_list[-6:-3]
                ],
            },
            "defence_queens": {
                "attack_condition": lambda: self._bot.enemy_units.filter(
                    lambda u: u.type_id == UnitTypeId.WIDOWMINEBURROWED
                              and u.distance_to(self._bot.enemy_start_locations[0]) > 50
                              and not queens_manager.queens.defence.enemy_air_threats
                              and not queens_manager.queens.defence.enemy_ground_threats
                )
                                            or (
                                                self._bot.structures(UnitTypeId.NYDUSCANAL)
                                                and self._bot.units(UnitTypeId.QUEEN).amount > 25
                                            ),
                "rally_point": self._bot.zone_manager.own_natural.center_location,
            },
            "inject_queens": {
                "active": True,
                "priority": False,
                "max": 2,
                "priority_defence_list": {
                    UnitTypeId.BATTLECRUISER,
                    UnitTypeId.LIBERATOR,
                    UnitTypeId.LIBERATORAG,
                    UnitTypeId.VOIDRAY,
                },
            },
            "nydus_queens": {
                "active": True,
                "max": 12,
                "steal_from": {QueenRoles.Defence},
            },
        }

        mid_game_queen_policy = {
            "creep_queens": {
                "max": 2,
                "priority": True,
                "defend_against_ground": True,
                "distance_between_queen_tumors": 3,
                "priority_defence_list": {
                    UnitTypeId.BATTLECRUISER,
                    UnitTypeId.LIBERATOR,
                    UnitTypeId.LIBERATORAG,
                    UnitTypeId.VOIDRAY,
                },
            },
            "creep_dropperlord_queens": {
                "active": True,
                "priority": True,
                "max": 1,
                "pass_own_threats": True,
                "priority_defence_list": set(),
                "target_expansions": [
                    el for el in self._bot.expansion_locations_list
                ],
            },
            "defence_queens": {
                "attack_condition": lambda: (
                                                sum([unit.energy for unit in self._bot.units(UnitTypeId.QUEEN)])
                                                / self._bot.units(UnitTypeId.QUEEN).amount
                                                >= 75
                                                and self._bot.units(UnitTypeId.QUEEN).amount > 40
                                            )
                                            or self._bot.enemy_units.filter(
                    lambda u: u.type_id == UnitTypeId.WIDOWMINEBURROWED
                              and u.distance_to(self._bot.enemy_start_locations[0]) > 50
                              and not queens_manager.queens.defence.enemy_air_threats
                              and not queens_manager.queens.defence.enemy_ground_threats
                )
                                            or self._bot.structures(UnitTypeId.NYDUSCANAL),
                "rally_point": self._bot.zone_manager.own_natural.center_location,
            },
            "inject_queens": {"active": False},
            "nydus_queens": {
                "active": True,
                "max": 12,
                "steal_from": {QueenRoles.Defence},
            },
        }

        gas_workers = 4
        build_drones = lambda ai: self._bot.workers.amount >= self._bot.townhalls.amount * 16 + gas_workers \
                                  or self._bot.workers.amount >= 16 * 3 + gas_workers  # max 3 base saturation

        upgrades = [
            Step(UnitReady(UnitTypeId.EVOLUTIONCHAMBER, 1),
                 Tech(UpgradeId.ZERGMISSILEWEAPONSLEVEL1, UnitTypeId.EVOLUTIONCHAMBER)),
            Tech(UpgradeId.ZERGGROUNDARMORSLEVEL1, UnitTypeId.EVOLUTIONCHAMBER),
            Tech(UpgradeId.ZERGMISSILEWEAPONSLEVEL2, UnitTypeId.EVOLUTIONCHAMBER),
            Tech(UpgradeId.ZERGGROUNDARMORSLEVEL2, UnitTypeId.EVOLUTIONCHAMBER),
            Tech(UpgradeId.ZERGMISSILEWEAPONSLEVEL3, UnitTypeId.EVOLUTIONCHAMBER),
            Tech(UpgradeId.ZERGGROUNDARMORSLEVEL3, UnitTypeId.EVOLUTIONCHAMBER),
        ]

        return BuildOrder(
            SetQueensSc2Policy(early_game_queen_policy, policy_name="early_game_queen_policy"),
            ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 13),
            ActUnit(UnitTypeId.OVERLORD, UnitTypeId.LARVA, 1),
            ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 14),
            Expand(2),
            ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA, 16),
            ActBuilding(UnitTypeId.SPAWNINGPOOL, 1),
            ActUnit(UnitTypeId.OVERLORD, UnitTypeId.LARVA, 2),
            SequentialList(
                Step(None, SetQueensSc2Policy(mid_game_queen_policy, policy_name="mid_game_queen_policy"),
                     skip_until=lambda ai: ai.time > 480),
                BuildOrder(
                    Step(None, DistributeWorkers(max_gas=4), skip=TechReady(UpgradeId.ZERGGROUNDARMORSLEVEL3, 0.01)),
                    Step(None, DistributeWorkers(max_gas=0),
                         skip_until=TechReady(UpgradeId.ZERGGROUNDARMORSLEVEL3, 0.01)),
                ),
                Step(None, SpeedMining(), lambda ai: ai.client.game_step > 5),
                AutoOverLord(),
                BuildOrder(
                    Step(None, ActUnit(UnitTypeId.DRONE, UnitTypeId.LARVA), skip=build_drones),
                    Step(None, MorphLair(), skip_until=TechReady(UpgradeId.ZERGGROUNDARMORSLEVEL1, 0.5)),
                    Step(None, ActBuilding(UnitTypeId.INFESTATIONPIT),
                         skip_until=TechReady(UpgradeId.ZERGGROUNDARMORSLEVEL2, 0.01)),
                    Step(None, MorphHive(), skip_until=TechReady(UpgradeId.ZERGGROUNDARMORSLEVEL2, 0.5)),
                    Step(None, ActUnit(UnitTypeId.QUEEN, UnitTypeId.HATCHERY)),
                    Expand(4),  # 4 mining bases
                    BuildGas(2),
                    ActBuilding(UnitTypeId.EVOLUTIONCHAMBER, 2),
                    upgrades,
                    ActBuilding(UnitTypeId.HATCHERY, 20),
                )
            ),
        )