StarCraft II AI Bot – DAY 2: Stalker Auto Blink

Stalker blink bot

Stalkers will blink back to avoid enemy attack when health low.
Also they will focus fire to take one enemy down at a time.

Result


14 Stalkers v.s 14 Stalkers, the bot wins with 12 stalkers left.

Implementation

foreach gameloop
    cur_enemy = nearest enemy 
    for each Stalker
        if health low
            blink back
        else
            if enough allies firing at the current enemy
                cur_enemy = find next enemy
            else
                attack cur_enemy

see code from here

Leave a Reply

Your email address will not be published. Required fields are marked *