<commit_before>import time
from RpiEnv import Env
import numpy as np
from qLearning import QL


def playGame(train_indicator=1):  # 1 means Train, 0 means simply Run
    actions = ['left', 'go', 'right']
    learning_rate = 0.3
    greedy = 0.05
    decay = 0.7
    straight_die_distance = 10
    side_die_distance = 10
    average_step_length = 5
    np.random.seed(1337)

    episode_count = 300
    max_steps = 30000

    step_average = 0
    step_queue = []
    # initialize pigpiod and set at which distance is dead
    env = Env(straight_die_distance, side_die_distance)

    Qlearning = QL(actions, decay, greedy, learning_rate)

    # load weight
    Qlearning.load("Qtable.h5")
<commit_msg>separate die_distance to side and straight<commit_after>import time
from RpiEnv import Env
import numpy as np
from qLearning import QL


def playGame(train_indicator=1):  # 1 means Train, 0 means simply Run
    actions = ['left', 'go', 'right']
    learning_rate = 0.3
    greedy = 0.05
    decay = 0.7
    straight_die_distance = 10
    side_die_distance = 7
    average_step_length = 5
    np.random.seed(1337)

    episode_count = 300
    max_steps = 30000

    step_average = 0
    step_queue = []
    # initialize pigpiod and set at which distance is dead
    env = Env(straight_die_distance, side_die_distance)

    Qlearning = QL(actions, decay, greedy, learning_rate)

    # load weight
    Qlearning.load("Qtable.h5")

{'fraction_non_alphanumeric': 0.07994389901823282, 'fraction_numerical': 0.03997194950911641, 'mean_word_length': 3.2218934911242605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '589066', 'n_tokens_mistral': 520, 'n_tokens_neox': 466, 'n_words': 139}