# Nearest unblocked strategy versus learning patches

_[Crossposted](https://agentfoundations.org/item?id=1296) at Intelligent Agents Forum._

The [nearest unblocked strategy](https://arbital.com/p/nearest_unblocked/) problem (NUS) is the idea that if you program a restriction or a patch into an AI, then the AI will often be motivated to pick a strategy that is as close as possible to the banned strategy, very similar in form, and maybe just as dangerous.

For instance, if the AI is maximising a reward R, and does some behaviour B~i~ that we don't like, we can patch the AI's algorithm with patch P~i~ ('maximise R~0~ subject to these constraints...'), or modify R to R~i~ so that B~i~ doesn't come up. I'll focus more on the patching example, but the modified reward one is similar.

The problem is that B~i~ was probably a high value behaviour according to R-maximising, simply because the AI was attempting it in the first place. So there are likely to be high value behaviours 'close' to B~i~, and the AI is likely to follow them.

A simple example
----------------

Consider a cleaning robot that rushes through its job an knocks over a white vase.

![](http://images.lesswrong.com/t3_ont_0.png?v=fba29a86ba10449b05413c61fdeca186)

Then we can add patch P~1~: "don't break any white vases".

Next time the robot acts, it breaks a blue vase. So we add P~2~: "don't break any blue vases".

The robots next few run-throughs result in more patches: P~3~: "don't break any red vases", P~4~: "don't break mauve-turquoise vases", P~5~: "don't break any [black vases with cloisonné enammel](https://s-media-cache-ak0.pinimg.com/originals/7f/ba/0b/7fba0bcda370db48ed170a794ef9fc1c.jpg)"...

Learning the restrictions
-------------------------

Obviously the better thing for the robot to do would be just to avoid breaking vases. So instead of giving the robot endless patches, we could try and instead give it patches P~1~, P~2~, P~3~, P~4~... and have it learn: "what is the general behaviour that these patches are trying to proscribe? Maybe I shouldn't break any vases."

Note that even a single P~1~ patch would require an amount of learning, as you are trying to proscribe breaking white vases, at all times, in all locations, in all types of lighting, etc...

The idea is similar to that mentioned in the post on [emergency learning](https://agentfoundations.org/item?id=1243), trying to have the AI generalise the idea of restricted behaviour from examples (=patches), rather than having to define all the examples.

A complex example
-----------------

The vase example is obvious, but ideally we'd hope to generalise it. We'd hope to have the AI take patches like:

*   P~1~ "Don't break vases."
*   P~2~: "Don't vacuum the cat."
*   P~3~: "Don't use bleach on paintings."
*   P~4~: "Don't obey human orders when the human is drunk."
*   ...

And then have the AI infer very different restrictions, like "Don't imprison small children."

Can this be done? Can we get a sufficient depth of example patches that most other human-desired patches can be learnt or deduced? And can we do this without the AI simply learning "Manipulate the human"? This is one of the big questions for methods like [reward](https://arxiv.org/abs/1606.03137) [learning](https://jan.leike.name/publications/Towards%20Interactive%20Inverse%20Reinforcement%20Learning%20-%20Armstrong,%20Leike%202016.pdf).