Tag Archives: Deep Learning

(日本語) 機械学習と深層学習 Python によるシミュレーション qlearning.py


position = 0 # initial state for j in range(3): position = select_a(position, q_value) q_value[position] = update_q(position, q_value) print(q_value) if q_value == previous_q_value: if convergence_time == 0: convergence_time = i eq_count += 1 if eq_count > THRESHOLD: print(convergence_time) break else: eq_count = 0 convergence_time = 0 if __name__ == “__main__”: solve(32767, 1000)