introducing: Loophole - an agentic system that translates your natural language moral beliefs into codified laws, and then runs adversarial agents that try to come up with legal scenarios that break your laws - either a scenario that is immoral and legal, or vice versa - a judge agent fixes the law if it can do so consistently, but if there is an inconsistency you as the user must decide what is best.
you can work with the system until your legal framework can't be broken by the agents - and you get as output a legal system that is aligned with your moral code
more details and code below
Conversation
I was thinking the other day about how there can be things that are illegal, despite feeling totally moral, or vice versa - and how this is somewhat the result of laws needing to be general and robust enough, because nailing down edge cases exhaustively is too hard AND/OR there
Here's how it works:
1. You state your moral principles in plain language
2. An AI legislator drafts a formal legal code from them
3. Two adversarial agents attack it every round:
- **Loophole Finder**: finds scenarios that are *technically legal* under your code but *morally
Very cool! I have been noticing a trend, at least among those my age, that morals are being substituted for legality
for a bunch of reasons but i think mainly people dont take the time to even think about such concerns
Why limited to 'moral' codex? What about governance patterns etc? Would be a great use case similar logic. Will take a look, very interesting for large enterprise.
Enter Lamang and fight to earn your reputation.
A game-changing update arrives March 31.
Get Gray Zone Warfare at -33% off on Steam.
The media could not be played.
I love this idea so much. It would be fun to see if at some point you could also deploy this same loop to try and simplify the resulting code — trying to make your moral code more parsimonious, basically. But definitely will be checking this out tonight.
Fun application here for translating a company’s mission and values into ops & HR policies
I’ve managed to set mine up in my system as mathematical invariants with TLA and Lean verification.