I absolutely despise the meme that's so popular here saying that the law is like code and should be totally automated. It's not. It's very fuzzy and that's a huge benefit.
It scares the shit out of me that my life would ever be in the hands of a bunch of glorified arts students in conjunction with random members of the population.
I am only suggesting that there is a different approach.
A change like this would likely be similar to the changes brought about when judicial discretion was ejected in favor of strict sentencing.
The Judicial branch and Executive branch benefit from the "fuzziness". If Congress fails to move, the President can make a move without them. If Congress is ever unclear, then the Judicial Branch gains a touch of power as they make a landmark ruling.
In fact, the _huge_ size of laws today are attempts at making Congress's intent more clear. 3000+ Pages of "Affordable Care Act" and yet the intent remained unclear (tax vs penalty? Tax Deductions to marketplaces run by "the state". Does "the state" mean the government in general? Or does it mean "state" as in Florida?)
The famous "Tomato is a Fruit or Vegetable??" case "Nix v. Hedden" is all you need to know about Congress's inability to write clear laws... no matter how hard they try. This country has a knack of finding corner cases to the law making them horribly important in laughable ways.
In any case, "code that is law" sounds like a horrible idea. Congress barely reads laws as it is, and instead outsources the job to "the expert" lobbyists.
Part of the problem is that expert Congressmen / Congresswomen learn that they can make more money by working for private business lobbying firms than staying in Congress. So they leave Congress (and leave all the political crap behind)... and write laws and legal arguments for businesses.
----------
And even then, Congress gets a lot of things wrong when they are 100% clear anyway. Most judges don't like sentencing minor Marijuana smokers to jail... but when Congress writes "Minimum Sentencing Laws", guess what? The Judge is _forced_ to do so, even if the individual judge disagrees with the law.
In this case where Congress is so wrong with law, it is more beneficial to leave more power to the judge and jury. Even if you do think that Marijuana is evil and horrible, most people agree that sending someone to jail over it is a mistake. (where the jailed man will only get access to more drugs and contacts). Send drug users to the hospital, send them to get cured. Don't send them to jail where it will only get worse.
So you would have AIs not only writing the laws, but interpreting them. And you're not worried about conflicts of interest one bit? What happens when the AIs write a law stating that only AIs can have jobs? Or if an AI writes a law that says "kill all humans" ?
The law needs to be written by somebody. And Congress... despite all of its faults... is the best organization we know of at writing laws.
You're ignoring literally centuries of political theory btw. This is one of the most studied subjects in America right now. I would suggest reading "Roberts Rules of Order" for the base mechanism of how meetings are run and how to organize a group to make a decision.
The vast vast vast majority of Congressional decisions and Judicial decisions take place as rigorously as code. Its not the "interpretation" of law where mistakes are made... most commonly, it is the writing of law which causes controversy.
In any case, even the writing of laws is extremely algorithmic.
https://en.wikipedia.org/wiki/Robert's_Rules_of_Order
Robert's Rules of Order don't necessarily match up with the Senate's rules or the House's rules... but the concepts are very similar. (In particular, there is a time limit to debate in the House, while there isn't one in the Senate. Both differ from Robert's Rules where individuals are only allowed to speak twice per meeting).
Regardless, Parlamentary Theory is extremely codified. And if you listen to CSpan for just 5 minutes, you'll notice that Congress (Specificall the House) talks in a very algorithmic manner. (Individual Representatives reserving time down to the _minute_ to talk about their arguments).