f(brain, state) -> command