I'm curious if there is research, startups, open-source projects, etc., pertaining to this topic which has intrigued me for a while.<p>Law and code are very similar conceptually it seems: they outline variables, environments, conditions, then execute procedures. The big difference being computers do one, and people do the other. Politics discusses this notion of "efficient" government and I want to take it even further. I'm curious about a world where, let's take property taxes for example, we can search repositories for every implementation (procedure/function) of property tax law (code) in a given country (within all states/counties), and not only see it publicly (open source), but be able to use the code for testing (how effective is this "algorithm" for a given outcome?), RFC's, forking across localities, tweaking, and all the other processes that work so well in software design.<p>Efficiency and smart management in software is modularization, clear roles for parts, and easy ways to plug things together (and avoid NIH syndrome) I feel like (in a programming analogy) every single city/county/state rewrites everything scratch all the time!<p>Of course maybe these are just different mediums that allow for very similar processes and I'm just amazed by that. But I can't help but think there is something here.<p>So here's the question: If in the future, a very progressive group of technophiles wanted to start a new country from scratch on a moon or space station somewhere, do you think they would do everything on a github style medium with software design type methods? Should they? Could they? Do you always need humans to enforce/interpret the laws?
Yes, you do always need humans to enforce/interpret the laws. Don't be absurd.<p>The alternative is kind of like that scene in Robocop, except ED-209 is a judge instead of a robot, it sentences you to death rather than killing you directly (the bailiff obeys unquestioningly), and instead of frantically trying to shut the machine down, everybody in the room agrees that you were indeed carrying the gun, and almost certainly still are.<p>You ask for a retrial and it takes 1/50th of a second to spit out exactly the same response. The rationale for the verdict is a procedurally generated AST running to 5200 pages, which is incoherent not only to you but also to lawyers and programmers alike. (You are given a copy of it on a USB stick, but no computer to read it with.)<p>A country where laws are applied with absolutely no nuance, context, consideration, empathy or judgement is a petrifying hellscape. A pretty good Black Mirror episode, in fact.<p>E: this is all ignoring how <i>awful</i> human beings are at software development.
Bitcoin + consensus + smart contracts<p>Bitcoin already enforces practical law in some sense. If you dig into this it all comes down to property rights, which now can be implemented on the net with blockchains. Ethereum attempts to go a step further along these lines, but its not practical yet IMO. You're right, this is a very fertile ground.
There's a lawyer at the MIT media lab named Dazza Greenwood who is working on projects along these lines. My understanding is that he's already working with Boston to get any city ordinances that are amenable to the challenge to also be published with valid code of some sort. He has really worked through a lot of the issues and is really open about talking on the subject.<p>The formalization of all law into code fully is probably not fully achievable in the near term since there are many component parts of legal tests that are not really deterministically resolvable, and I think it would be a hard sell that justice is properly served if a call to rand() played a part in adjudication or sentencing.<p>I think a more profitable way to start integrating code is within the realm of contract law. A contract described in code has some advantages over even a well written legal prose contract: it's testable, components could be more easily reusable, in some circumstances it could self-monitor for breach, it's easily diffable. Such contracts could be made to be more transparent (assuming good faith and code-literacy) and less prone to purposely unenforcible clauses etc (law linter?). Some such contracts might be progressively abstracted into a genuine and good faith "standard contract" for [thing]. Of course now you need two lawyers who both can also program comfortably in the same programming language and I have to imagine the first judge to interpret such a contract is going to be pissed as hell (or more optimistically intrigued).<p>As far as starting from scratch all the time, we don't really do that. The US legal system was basically just forked from England at first, and within the US we have a lot of model laws that are more or less universal (look at the <a href="https://en.wikipedia.org/wiki/Uniform_Law_Commission" rel="nofollow">https://en.wikipedia.org/wiki/Uniform_Law_Commission</a>), but we do sometimes have some weird holdouts (pretty sure Louisiana still uses some Napoleonic code instead of UCC stuff).<p>Edit: sorry for the wall-o-text, also just thought of IoT/semi-autonomous agents that might require the autonomy to decide whether or not to enter into a legally binding agreement on behalf of the operator without necessarily knowing ahead of time the counterparty or the exact terms. It would be a lot easier for these kind of bots if there were some generic contracting convention or DSL or something. I'm thinking trading bots and maybe of an intelligent shopping bot.
the AI and law movement began more than 40 years ago. There's an AI and law journal, a bi-annual international conference (ICAIL) and tons of other work (such as LDRI from the UK National Archives and the automated legal reasoning research from Stanford, CMU, and MIT.<p><a href="http://sites.sandiego.edu/icail/" rel="nofollow">http://sites.sandiego.edu/icail/</a>
Laws already struggle when words meet reality, code would even more. So, no, outside of very specific cases with a lot of conventional law to define the interfaces.<p>Law can already be kind of algorithmic, but it (IMHO) doesn't make much sense to have computers execute it.