<jupyter_start><jupyter_text>Inferior and Superior Agents<jupyter_code>import os
import sys
if sys.version_info[0] == 2:
    import cPickle as pickle
else:
    import pickle
    import pathlib
from experiment.explanation_generators import load_data, sample_state, exp_gen

ranges, counts = load_data(['/home/joon/xai/causal/stable-baselines3/outputs/collected_22_inferior/data.pickle', 
                            '/home/joon/xai/causal/stable-baselines3/outputs/collected_21_superior/data.pickle'])


state, dp = sample_state(ranges[1], counts[1])
print(state, dp)
exp_gen(ranges[0], counts[0], state)
exp_gen(ranges[1], counts[1], state)<jupyter_output>[-0.11999999999999988, -0.23999999999999977, 0.03134999999999999, -0.0627] [10, 10, 12, 9]
State and binned state value:
[-0.11999999999999988, -0.23999999999999977, 0.03134999999999999, -0.0627]
[-0.11999999999999988, -0.23999999999999977, 0.03134999999999999, -0.0627]
[10, 10, 12, 9]
{'fraction_non_alphanumeric': 0.1316348195329087, 'fraction_numerical': 0.21762208067940553, 'mean_word_length': 5.083870967741936, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 9, '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': '277515', 'license': 'MIT', 'n_tokens_mistral': 503, 'n_tokens_neox': 357, 'n_words': 65, 'path': 'notebooks/Inferior and Superior.ipynb', 'repo_name': 'junkilee/stable-baselines3', 'size': '942'}