Stochastic Learning Networks and their Electronic Implementation