To continue a discussion I started a few months ago,
Crime is the most dangerous property, because if it goes out of control, it gets even more out of control over time, due to barbarian criminals spawning.
However, the AI happily builds every +crime producing building there is, even if crime is already out of control. And never sells them even if it never manages to get crime back under control.
So I think the AI should keep itself to thresholds on building +crime buildings, and sell off +crime buildings if crime goes completely out of control.
For example, if current crime level AND Drift_Towards_Value are both above a certain worrisome threshold (e.g. 500), then the AI should start selling off some of his +crime buildings in a desperate attempt to get crime under control. It should take both current crime level AND Drift_Towards_Value into account to not do something drastic just because of a very temporary situation. Yes it may lead to the AI selling off a building and rebuilding it a hundred turns later but it is better than letting crime explode even further. Plus the AI gets bonus production to compensate for inefficiency.
Furthermore, it should wait with building +crime unless crime is low enough to allow it based on a threshold. If for example, current crime is -100, the drift is +5, and the threshold is +100, then the Drift_Towards_Value is +25, which is 75 points below the threshold, so the city can at most accept a 75/25 = +3 crime building before the Drift_Towards_Value goes over the threshold. So every building with more than +3 crime must be blocked until the crime situation improves.
P.S. the threshold for building +crime buildings should be less tight than the threshold for building anti crime stuff. Otherwise the part of the AI that approves +crime buildings and the part of the AI that builds anti-crime stuff will wait for each other to make the first move.
P.S. 2 I think this discussion belongs in the AI thread.