function StandardAI takes code heroes, code peons, code attacks returns nothing
local boolean isNewbie = (MeleeDifficulty() == MELEE_NEWBIE)
call InitAI()
call SetMeleeAI()
call SetDefendPlayer(true)
call SetGroupsFlee(not isNewbie)
call SetHeroesBuyItems(not isNewbie)
call SetHeroesFlee(true)
call SetHeroesTakeItems(true)
call SetIgnoreInjured(true)
call SetPeonsRepair(true)
call SetSmartArtillery(not isNewbie)
call SetTargetHeroes(not isNewbie)
call SetUnitsFlee(not isNewbie)
call SetWatchMegaTargets(true)
call CreateCaptains()
call SetHeroLevels(heroes)
call Sleep(0.1)
call StartThread(peons)
call StartThread(attacks)
endfunction