GS Nation Game AI

I am making a simple version of a grand strategy game. Everything is going well but I have no idea how to create AI for other nations. This game is inspired by Age of History 2. How do I create AI that is able to think?
As of now, all I have is a global variable that keeps track of the diplomatic relations between the player and the AI nation. The value of the relation global variable has an effect on the AI threat level. The better relations between countries the lower the threat level they will have.
This is all I have and I’m not sure what to do next or how to make that AI smart. Please help.

I would start by jotting down all the rules that apply, and then figuring how to implement them in terms of events.

Yeah, I agree. AI is always hard in every engine. I would take a look at some youtube videos that don’t tell you how to code the AI but tell you how it works. Those are the best.