General duality between optimal control and estimation | Synapse