1. A neural electrical circuit, comprising: a plurality of neuron circuits and synapses, wherein each of the synapses connects one pair of the neuron circuits; and a first memory storing weights of the synapses, a second memory storing the same weights and a third memory comprising one element for each of the synapses, wherein a weight of synapse connecting a pair of the neuron circuits is updated in the second memory and an element of the third memory associated with that synapse is switched from a first to a second logical state, if that pair of neuron circuits spike, all elements of the third memory which were in the second logical state switch at a defined frequency to the first logical state with a probability, when a reward occurs, the updated weight of synapse is copied from the second memory to the first memory, if the element is in the second logical state, and the weight of synapse is copied from the first memory to the second memory overwriting the updated weight, if the element is in the first logical state.