I have an idea for a mobile game similar to Civilization or Polytopia but of course on a much smaller scale and not as complex. But I was wondering what approach should I take to program the enemy AI. Does each faction take actions depending on the situation they are in each turn like how many resources, what buildings it needs, what units to move and where. Or should each one has its own personality or agenda that they act upon, like I need to build a tower but I don't have resources, so I'm going to focus on collecting the resources and then build it. This, of course, seems like a more complex AI behaviour.
Also any tips for actual coding the AI would be helpful. I never did AI programming before.