work save (AI code framework)

need to consider where to put the codes for generating defending army