<jupyter_start><jupyter_text><jupyter_code>st = 1224
act = 2
num = 0
policy = np.zeros((100,2))
thetaVals = np.zeros((100,1))
valuefunction = np.zeros((100,1))
for i in range(100):
    nextact = np.argmax(qTable[st,0:3])
    nextst = int(next_states[st,nextact])
    thetaVals[i],num = get_values(st)
    st = nextst
    print(st)   
    
    
plt.plot(range(100), thetaVals)
draw_pendulum(thetaVals)
plt.xlabel("time (ms)")
plt.ylabel("x")
plt.show()

a,b = get_values(2201)
print(a,'\n',b)<jupyter_output>2.500451295714325 
 -6.23469387755102
{'fraction_non_alphanumeric': 0.17463235294117646, 'fraction_numerical': 0.11213235294117647, 'mean_word_length': 4.7368421052631575, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '32410', 'license': 'MIT', 'n_tokens_mistral': 287, 'n_tokens_neox': 243, 'n_words': 36, 'path': 'Q-learning-table-current.ipynb', 'repo_name': 'sq538/RL_Pendulum', 'size': '544'}