Training Neural Networks with Internal State, Unconstrained Connectivity, and Discrete Activations