finalized learning decay and saving ai progress code, added simple counter to stop AI from getting stuck in infinite loops