I've commented on this elsewhere, but the one thing I am convinced the AI can do that we cannot is apply production that was initiated towards one thing to something else when it decides it wants to shift. That is, if it has invested 20 hammers in producing unit A, but then it decides to produce unit B, it simply applies the 20 hammers to unit B rather than having to start from scratch like we do.
I saw this in real time in a recent GOTM and wish now that I had saved the autosave and the game file at the time. I was bombing the last capital city; I had a spy in place with sufficient visibility that I could see the city's production target and the number of turns remaining. The city in question was producing a carrier (540 hammers required) for a number of turns, then suddenly switched to producing a battleship armada (>> 540 hammers required) right after I initiated my attack. I don't remember the exact number of turns remaining in either case, but I remember that I did a best estimate of the production capability of the city and whether that could account for the low number of turns I was seeing needed for the battleship armada. I thought at the time that it was pretty clear that extant production that had been achieved towards the carrier was now being applied to the armada, otherwise there was no way to explain why such a low number of turns remaining were showing for the armada.
This would also explain two other frequent observations I have made: 1. that cities under assault rapidly raise ancient walls (because I assume they apply stored production towards another target to the walls; otherwise they would have to start from scratch, or pay a fee for switching policies to Limes etc at the least). 2. that when I have (air) pillaged a spaceport with a rocket on the launch pad, showing that a Space Race project was underway at that city, somehow the project is completed in a few turns by some other spaceport city, again presumably because that city switched its production target to the Space Race project and then applied stored production towards it.
The next time I see something like this going on I will try to remember to save the autosave and game files to demonstrate it.