Homework 4 Part 6


In [1]:
import numpy as np
import matplotlib.pyplot as plt
import scipy.signal as sig
import control
import plot_learning_curve as plc

In [2]:
num_failures, time_steps_to_failure = control.simulate()

Part 6.a

The number of trials obtained for the reinforcement learning algorithm to converge was the following.


In [3]:
print(num_failures)


352

Part 6.b.

The learning curve for the reinforcement learning algorithm is the following.


In [4]:
plot = plc.plot_learning_curve(time_steps_to_failure[:num_failures])

In [5]:
plt.show()



In [ ]: