q_learner __init__(selfenvdiscountexplorefixed_alphaalphaalpha_funqinitlabelself experience_buffer boundedbuffer(max_buffer_sizeself num_updates_per_action num_updates_per_action self burn_in burn_in def do(self,num_steps= )"""do num_steps of interaction with the environment""self display( ," \ta\tr\ts'\tq"alpha self alpha for in range(num_steps)action self select_action(self statenext_state,reward self env do(actionself experience_buffer add((self state,action,reward,next_state)#remember experience if not self fixed_alphak self visits[(self stateaction)self visits get((self stateaction), )+ alpha self alpha_fun(kself [(self stateaction)( -alphaself get((self stateaction),self qinitalpha (reward self discount max(self get((next_statenext_act),self qinitfor next_act in self actions))self display( ,self stateactionrewardnext_stateself [(self stateaction)]sep='\ 'self state next_state self acc_rewards +reward do some updates from experince buffer if self experience_buffer number_added self burn_infor in range(self num_updates_per_action)( , , ,nsself experience_buffer get(if not self fixed_alphak self visits[( , )alpha self alpha_fun(kself [( , )( -alphaself [( , )alpha (reward self discount max(self get((ns,na),self qinitfor na in self actions))rlqexperiencereplay py -(continued from rlsimpleenv import simple_game_env from rlqtest import sag sag sag from rlplot import plot_rl senv simple_game_env(sag ar q_ar_learner(senv, ,explore= ,fixed_alpha=true,alpha= version june