<jupyter_start><jupyter_text>The simulated data in raw_data.csv contains lot of games which are very "dumb" and would never be played by human players.To weed out such games from our dataset, we pick the shortest game for a given starting sequence.<jupyter_code>good_games = []
current_game_sequence = raw_data[0][:5]
best_game = raw_data[0]

for game in raw_data:
    if np.array_equal(current_game_sequence, game[:5]):
        # compare game and best_game
        if lenOfGame(game) < lenOfGame(best_game):
            best_game = game
    else:
        # save best game to good games
        good_games.append(best_game)
        current_game_sequence = game[:5]
        best_game = game

print("Done")
print(len(good_games))
data = np.array(good_games, dtype=int)
file_path = "good_games_data.csv"
np.savetxt(file_path, good_games, delimiter=',', fmt="%u")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09786276715410573, 'fraction_numerical': 0.00562429696287964, 'mean_word_length': 4.204678362573099, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '524281', 'license': 'MIT', 'n_tokens_mistral': 301, 'n_tokens_neox': 290, 'n_words': 81, 'path': 'data/GoodGamesOnly.ipynb', 'repo_name': 'vijaygkd/deep-ttt', 'size': '889'}