Your question actually has several underlying (and still unanswered) questions.
The main one is: "Can we state in an unambiguous way what a Government should do?"
Another, more fundamental and still open to "philosophical" debate, is: "Will computers ever be able to cope with situations unforeseen at time of their building?"
Today's computers are mainly geared toward two diverging schemes: Algorithmic and Pattern Recognition.
Take, for example, one of the "though" problems currently handled by computers: weather forecast.
There are two "schools":
- Model Earth and all relevant atmospheric interactions as a (huge) set of differential equations and integrate them. (algorithmic)
- Feed a SNN (Simulated Neural Network) data taken from last 30 years and let it decide what will happen in the near future. (pattern recognition)
First approach has proved either too crude (forecasts are reasonably precise for next 24 hours, no more) or too expensive (even with current supercomputers simulation takes almost the same time as "real" time). (patter recognition)
Second approach worked much better (it is what almost all commercial forecasts use), but it is currently failing more and more often because weather patterns are changing (due to Global Warming and other effects) and thus the "old ways" are not reliable anymore and the method is unable to adjust fast enough.
To come back to Your question: even stashing, for the sake of argument, all objections people will have because they do not want Government to do the "right" thing, but as they want it to do what's their interest (i.e.: they want their chance to to do "lobbying") instead, there remains a series of fundamental issues:
- There are several irreconcilable "world views" (e.g.: "rightist": favor accumulation of resource vs. "leftist": favor redistribution of resources). Which one should "computer" chose?
- Current computer research is unable to cope with unexpected and fundamentally "new" patterns; this might be overcome in the future, but I strongly suspect it would need a radical change in perspective I don't see coming (I have a personal theory concerning this, but this is not the place to expound it).
- Actual goals (i.e.: the Evaluation Function) need to be defined and getting any kind of consensus on the issue looks like a problem harder than anything tackled so far (someone spoke about "making people happy" which can be easily obtained by injecting certain psychotropic substances in public water pipes; is that really what we want? I don't think so. A much better definition is sourly needed).
Bottom line: If You can define "good government" then there's a good chance computers will, in a reasonable future, do it better than humans, otherwise we'll have to wait till some AI is smart enough to devise definition itself (hoping it won't decide it can do without all humans altogether, of course)