Hi, 

usially in battle, when AI has worse units that I have, it keeps attacking my units and damaging its own units.

Usually it happens when AI's goal to defend its flag, so holding possition looks like the best option, because i have to spend more turns.  

Why it's not implemented yet, especially for city defence?