I am not sure I'm posting this in the right forum, but here it goes:
How do neutral hostile units (aka creeps), or, for that matter, computer-controlled player units choose their attack target if surrounded by more than one enemy?
Do they check armor, level, type (building, unit, Hero, ward...