I've noticed that in the later game, they do upgrade in peacetime, but only partly. E.g.:- When you can see what they are doing (via Esp Pts), say an ai discovers Rifling.Typically it drops research to 10% for a couple of turns, and spends the cash on Upgrading. From then on, it bangs the reasearch back up, and only upgrades with any incidental spare cash.
And btw, its not actually 50% straight upgrade on every lvl. Its a sliding scale, caused by the fact that the ai doesn't have to put the same amount of hammers into the troop build as the player. They use a sliding scale, where at settler it takes 160%, Noble 100%, and Deity only 60% of the

to build a unit. E.g. If a unit costs 100

for an ai on Noble it will cost 160

on Settler and 60

on Deity. This also applies to Upgrades, so if a unit is 100

on noble and the new unit is 200

, then the upgrade will cost 100

*50% . However since the same unit on Deity only cost 60

, its replacement will only cost 120

, and therefore its upgrade will cost (120-60)=60

*50%.
I
think its 3.5

per

so on noble the ai upgrades in the above case for 175

on Deity it upgrades the same unit for 105

.In both cases, the player upgrades this mythical unit for 350

So if I'm right (which is quite doubtful by now

) on Deity the ai upgrades at 30% of the player.
All the above numbers are from memory (so they probably aren't totally accurate), but you can find them in the Civ4HandicapInfo.Xml...I'm sure RJ or someone will correct me, but you get the idea...