return wq def train(xnp arrayynp arraywnp array-tuple[np arraycallable]"""train the modelusing solution to ridge regression"" np eye( shape[ ]neww np linalg inv( dot( - idot( dot( ) w_lr neww ( w_lr\ makeq(wreturn wq def print_report(rewardslistepisodeint)after trainadd one last functionone_hotto perform one-hot encoding for your states and actions/ataribot/bot_ _ls py def train(xnp arrayynp arraywnp array-tuple[np arraycallable]return wq def one_hot(iintnint-np array"""implements one-hot encoding by selecting the ith standard basis