It would be pretty much impossible for the programmers to "build the behavior in" to the neural network, unless you mean training on supervised data or something.
This kind of learning is similar to GANs, where the discriminator learns from real data and the generator learns from the discriminator.