<jupyter_start><jupyter_text>This is to show what data is in the memory<jupyter_code>import pickle
import os
import matplotlib.pyplot as plt
import numpy as np
with open('mem.pickle','rb') as f:
    (t,epsilon,mem)=pickle.load(f)
print('t =',t*2)
print('epsilon =',epsilon)
print('lenghth of memory:',len(mem))
die_list = [m[4] for m in mem]
print('Die rate:', np.mean(die_list))
def print_m(m):
    (s_t,a_t, r_t,s_t1,die) = m
    print('Current state:')
    plt.imshow(s_t[0,:,:,0],'gray')
    plt.show()
    print('Use action:',a_t)
    if die:
        print('Then die.')
    else:
        print('Survive and go to:')
        plt.imshow(s_t1[0,:,:,0],'gray')
        plt.show()
    print('Reward:',r_t)
print_m(mem[-1])<jupyter_output>Current state:
{'fraction_non_alphanumeric': 0.18351063829787234, 'fraction_numerical': 0.011968085106382979, 'mean_word_length': 4.122448979591836, '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': '270283', 'license': 'Apache-2.0', 'n_tokens_mistral': 317, 'n_tokens_neox': 317, 'n_words': 67, 'path': 'Memory_checker.ipynb', 'repo_name': 'yanglyuxun/game_play_jump', 'size': '752'}