<commit_before>from __future__ import division

import datetime
from math import log, sqrt
from random import choice


class MonteCarlo(object):
    def __init__(self, board, **kwargs):
        self.board = board
        self.states = []
        self.wins = {}
        self.plays = {}

        self.max_depth = 0
        self.stats = {}

        seconds = kwargs.get('time', 30)
        self.calculation_time = datetime.timedelta(seconds=seconds)
        self.max_moves = kwargs.get('max_moves', 100)

        # Exploration constant, increase for more exploratory moves,
        # decrease to prefer moves with known higher win rates.
        self.C = kwargs.get('C', 1.4)
<commit_msg>Changed MonteCarlo.__init__ to allow string versions of the optional params.<commit_after>from __future__ import division

import datetime
from math import log, sqrt
from random import choice


class MonteCarlo(object):
    def __init__(self, board, **kwargs):
        self.board = board
        self.states = []
        self.wins = {}
        self.plays = {}

        self.max_depth = 0
        self.stats = {}

        seconds = float(kwargs.get('time', 30))
        self.calculation_time = datetime.timedelta(seconds=seconds)
        self.max_moves = int(kwargs.get('max_moves', 100))

        # Exploration constant, increase for more exploratory moves,
        # decrease to prefer moves with known higher win rates.
        self.C = float(kwargs.get('C', 1.4))

{'fraction_non_alphanumeric': 0.10055096418732783, 'fraction_numerical': 0.011019283746556474, 'mean_word_length': 2.650753768844221, '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': '1293788', 'n_tokens_mistral': 435, 'n_tokens_neox': 405, 'n_words': 121}