Artificial Neural Networks with Dynamic Connections