Wednesday, January 19, 2011

The rush() command in StarCraft AI

The rush() command in StarCraft's AI scripts works strangely.

If any unit is within 320 pixels of the AI's "region", and the conditions for that unit's owner is met, then it will jump to the specified block. Rush 0 applies to buildings that aren't completed. The rest only apply to units/buildings that have been completed.
rush(BYTE condition, BLOCK block)
Will jump to the given code block if the condition is met.
Condition NumberTerranZergProtoss
0Commands a BarracksCommands a Spawning PoolCommands a Gateway
1Terran Infantry Score > 16Zerg Ground Score > 10Zealots > 6
2Terran Infantry Score > 24Zerg Air Score > 10(Unused)
3Terran Infantry Score > 5Zerg Ground Score > 2 or commands a Hydralisk DenZealots > 1
4Terran Infantry Score > 16Zerg Ground Score > 10Zealots > 8
5Terran Infantry Score > 6Zerg Ground Score > 6Zealots > 3
6Terran Infantry Score > 12Sunken Colonies > 1Dragoons > 1
7Commands a Siege TankCommands a QueenZealots > 6
8Terran Infantry Score > 5Zerg Ground Score > 2Zealots > 1
9Terran Infantry Score > 9Zerg Ground Score > 4Zealots > 5
10Terran Infantry Score > 4Zerg Ground Score > 4Zealots > 2
11Terran Infantry Score > 10Zerg Ground Score > 10Zealots > 5
12Terran Infantry Score > 16Zerg Air Score > 5Protoss Air Score > 2
13Terran Infantry Score > 24Zerg Air Score > 10Protoss Air Score > 2

Note:

Protoss Air Score = Dragoons + Scouts
Zerg Ground Score = Hydralisks + Sunken Colonies
Zerg Air Score = Hydralisks + Mutalisks + (Spore Colonies × 2)
Terran Infantry Score:
    if (bunkers × 4 <= marines)
        Terran Infantry Score = marines + bunkers × 4
    else
        Terran Infantry Score = marines × 2

0 comments:

Post a Comment