StarCraft 2 AI differences
Solution 1:
There are certainly behavioral differences at the harder difficulty levels. A few that I have noticed:
Harder AIs:
- scout more aggressively
- defend better against rushes (ie. by pulling workers off the mineral line to defend)
- will target SCVs instead of hopelessly attacking whatever it is the SCVs are repairing
So it seems to me the developers actually took into account tactics that better players use and only make these tactics available to the AI based on its difficulty. Of course, this is only a small piece of the puzzle and there are no doubt a lot of factors that go into it. If you're really curious, I'd suggest saving some replays of different level AIs (for the sake of the experiment, make them the same race and on the same map) and actually watching what they do differently.
Solution 2:
AI always see all buildings at all time. AI always see all workers at all time. AI Bonus resources does not apply to MULEs or any other temporary units.
- Insane AI gets +2 resources compared to the player. 9 high yield minerals, 8 high yield gas, 7 normal yield minerals, 6 normal yield gas.
- Very Hard AI gets +1 resources compared to the player. 8 high yield minerals, 7 high yield gas, 6 normal yield minerals, 5 normal yield gas.
- Hard AI gets same resources compare to the player. 7 high yield mineral, 6 high yield gas, 5 normal yield mineral, 4 normal yield gas.
- Normal AI cancels buildings, researches, etc. to simulate -1 resources compare to the player.
- Easy AI cancels buildings, researches, etc. to simulate -2 resources compare to the player.
- Very Easy AI cancels buildings, researches, etc. to simulate -3 resources compare to the player.
Low difficulty AIs do not have a direct penalty to resources so that it could, though unlikely, share those resources with its allies.
The difficulty level also has different APM caps, so that it could do more things.
- scouting more aggressively, because AI cannot see your units. It could only see buildings for free.
- defend against rushes with workers, but only if it thinks it could win the brawl with at least one worker alive.
- targeting worker units instead of construction/repair targets
- change unit composition based on its observation of your unit composition
- harass your base
- attack your base from multiple sides
- control multiple armies
- build order is changed because of the resource difference triggers a different branch
- more efficient float path for float-able buildings
The Insane and Very Hard AI use a different targeting table than player's unit AI. The player's unit AI targeting table is designed to be inefficient so that the micromanagement looks cool during tournaments and championships.