There's a lot of stupidity, as has been mentioned, with regards to the way AI chooses targets in war. They always go for the perceived weakest point and therefore always fall into traps.
aka:
-I can use workers to lure melee units into traps repetitively
-I can use sacrificial horse units or other melee with slight damage to attract city fire. Then just run away and send another. The AI should prioritize hitting units that are the biggest threat to the city instead such as my artillery or more threatening melee. As it is I can always get them to destroy or waste their fire and give my artillery enough time to break the city.
-city selection during attack. The AI seems to have no concept of surgical striking and sucks at effectively using preemptive strikes. They can have a massive military, but instead of really breaking me quickly by striking at the heart or cutting supply lines or cities off. They one-by-one go for the border cities and slowly move in. I understand this from an absorption point of view but it is a dumb strategy if you massively outnumber someone and can be abused to distract someone with a much, much larger military.
-bad grasp of victory conditions and easy to derail:
Case in point on these last two: I played a tall, cultural game with India and had 5 cities was about 50 turns from winning. This was my first immortal game so I was expecting some intelligence. Russia, the overseas warmonger had conquered her entire continent, was ahead slightly in science, and had a military that put everyone on our continent to shame. I had a large navy with about 30 modern ships and nuclear subs and 10-15 aircraft and was really the only credible threat on our continent. Everyone else was hopelessly behind on tech. She was obviously going for domination and had started to denounce us and try to turn us against one another. Note: I had gone patronage and owned all the city states. She kept attacking all the overseas ones and racked up a lot of ire for it. Then she fought a long war with another nation on my continent--granted one everyone hated. We all ignored her. Finally she declared ware on Siam, my buddy, and I declared war on her as she had a large navy within striking distance and was vulnerable to a preemptive action. I took a few losses but destroyed about 40 ships and won navally by targeting the carriers with my submarines. I then spent the rest of the 50 turns just off the coast between us, bombing with aircraft carriers and distracting her with two weak CS's. She had so much land military that she could barely move it and the military advisor says she wielded a miltary that could wipe me off the map. However, she ignored my navy and my continent and was obsessed with taking the two CS's with her land units. Each turn I bombarded and killed a few more of them. Occasionally I couldn't halt the waves and the CS would fall. I'd then wait a turn for her to move away, bomb it to oblivion, and take it with a destroyer and liberate it. Rinse, repeat, waste another 5 turns as she attempted to take it again. This is an example of going for the weakest link taken to stupidity. I controlled the direction of her military and baited her massively superior military for 50 turns and then achieved a cultural victory. If she had been programmed a bit more strategically, she would have learned from the CS mistake, made more aircraft and subs and sunk my offshore fleet, then invaded me. This would have #1 stopped my cultural victory (which was obvious to everyone) and made the rest of the game easy for her. But she diddled around attacking the weak guys like CS's and other nations and let me win.
Note: she balanced her military really well though, and littered the land troops with SAMs which really wrecked havoc with my bombers so the content of her troops proved pretty good (I noticed some ppl said the AI did this badly). To be fair, she also did produce some subs toward the end and occasionally sent another carrier or battleship north the contend with my fleet, but it was pathetically insufficient priority for the amount of damage the fleet was doing and my nuke subs always found the new ships/subs and destroyed them before they got anywhere close.
For the mod, I suggest a simple solution to this ******ed mis-prioritizing behavior. Introduce a military memory. The AI remembers and keeps track of how much damage a certain city/group of units/fleet/or particular unit is doing. If it gets really high or a particular city is noted to be producing way too many units the AI should shift and target the source of the damage. This is strategic planning. In my case study, this would have resulted in her giving the CS lower priority after 2 tries and targeting my fleet and offshore boats which had destroyed 100+ units after 15 turns or so. In the city example with artillery it would result in the city recognizing after a turn of bombardment that the artillery are the only credible threat and targeting them one by one--resulting in the city being saved.