You can have a law that only affects algorithms used by the state in education,medicine, police and justice, this algorithms should be fully open or at least properly checked to be correct. Also the people using this algorithms need to be trained not to blindly trust the computer, they need to learn the failure cases.
Maybe I'm being paranoid, but I fear the "You know what I meant!" paradigm.
"Of course you won't have to register every algorithm. You know what I meant!"
"Of course you won't have to submit every program to approval. You know what I meant!"
"Of course you don't have to worry if you got sufficient consent to use that information. You know what I meant!"
And so on. The gag, of course, is that nobody really knows what They meant, only that there's now this massive chill upon the land because nobody wants to be the first test case for the system to demonstrate What They Meant on.