Lets all hope though that artificial intelligence is never used to control anything critical like dams and power stations. To me any form of intelligence is flawed because it is not perfect and can never be perfect. In reality intelligence is just a randomly made decision with a one-off reason for making the decision and it's not always the right reason.
At the other end of the scale you have a computer programme which has preset functions and can do nothing else. Decisions on how the functions work and when they are performed are usually decided (in the industrial environment at least) by teams of engineers and other specialists that spend months looking at contingencies.
At least with the latter way of doing things and providing there's no breakdowns you can always expect what is going to happen.