Fixed endless looping issue in hopfield_exp1.py when trying to replace memories that are too close in Hamming distance to the input.