Do you think that perhaps the function of government could be replaced by open-source software?
All government? No. But some yes. And this is one of those things, like all computer systems, where we're going to have to start with small issues and work out the bugs there before moving on.
The issue is not in "can" we create such a system; the issue will be removing the power from politicians. They will object and will attempt to cause as much FUD as possible.
Artificial Neural Networks are already acting as consultants to JUDGES in bail and parole hearings.
I don't think it's unreasonable to believe that a politician will very soon promise to manage the resources under their purview purely by evidence based, PROCRUSTEAN algorithms.
TRUSTLESS TRANSPARENT DECENTRALIZED ANARCHY