<jupyter_start><jupyter_text>Use baseline3 to train and evaluate<jupyter_code>env = MsnDiscrete()
env = DummyVecEnv([lambda : env])
model = DQN(
    "MlpPolicy", 
    env=env, 
    learning_rate=5e-4,
    batch_size=128,
    buffer_size=50000,
    learning_starts=0,
    target_update_interval=250,
    policy_kwargs={"net_arch" : [256, 256]},
    verbose=1,
    tensorboard_log="./tensorboard/MsnDiscrete-v2/"
)
model.learn(total_timesteps=1e5)<jupyter_output>Logging to ./tensorboard/MsnDiscrete-v2/DQN_1<jupyter_text>We can use DQN<jupyter_code>class Net(nn.Module):
    def __init__(self, n_state):
        super().__init__()
        self.fc1 = nn.Linear(n_state, 50)
        self.fc2 = nn.Linear(50)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13215258855585832, 'fraction_numerical': 0.04495912806539509, 'mean_word_length': 4.404411764705882, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '62478', 'license': 'MIT', 'n_tokens_mistral': 314, 'n_tokens_neox': 290, 'n_words': 40, 'path': 'ws.ipynb', 'repo_name': 'LSTM-Kirigaya/MsnEnvironment', 'size': '734'}