<commit_before>import random
import sys

import acpc_python_client as acpc


class KuhnRandomAgent(acpc.Agent):
    def __init__(self):
        super().__init__()

    def on_game_start(self, game):
        pass

    def on_next_turn(self, game, match_state, is_acting_player):
        if not is_acting_player:
            return

        print('%s: %s %s' % (
            match_state.get_viewing_player(),
            self.is_fold_valid(),
            self.is_raise_valid()
        ))

        # Select between passing (fold or initial call)
        # or betting (raising or calling a bet)
        selected_action = random.randrange(2)
        if selected_action == 0 and self.is_fold_valid():
            self.set_next_action(acpc.ActionType.FOLD)
        elif selected_action == 1 and self.is_raise_valid():
            self.set_next_action(acpc.ActionType.RAISE)
        else:
            self.set_next_action(acpc.ActionType.CALL)

    def on_game_finished(self, game, match_state):
        pass


if __name__ == "__main__":
    if len(sys.argv) < 4:
        print("Usage {game_file_path} {dealer_hostname} {dealer_port}")
        sys.exit(1)

    client = acpc.Client(sys.argv[1], sys.argv[2], sys.argv[3])
    client.play(KuhnRandomAgent())
<commit_msg>Remove unnecessary log from random agent<commit_after>import random
import sys

import acpc_python_client as acpc


class KuhnRandomAgent(acpc.Agent):
    def __init__(self):
        super().__init__()

    def on_game_start(self, game):
        pass

    def on_next_turn(self, game, match_state, is_acting_player):
        if not is_acting_player:
            return

        # Select between passing (fold or initial call)
        # or betting (raising or calling a bet)
        selected_action = random.randrange(2)
        if selected_action == 0 and self.is_fold_valid():
            self.set_next_action(acpc.ActionType.FOLD)
        elif selected_action == 1 and self.is_raise_valid():
            self.set_next_action(acpc.ActionType.RAISE)
        else:
            self.set_next_action(acpc.ActionType.CALL)

    def on_game_finished(self, game, match_state):
        pass


if __name__ == "__main__":
    if len(sys.argv) < 4:
        print("Usage {game_file_path} {dealer_hostname} {dealer_port}")
        sys.exit(1)

    client = acpc.Client(sys.argv[1], sys.argv[2], sys.argv[3])
    client.play(KuhnRandomAgent())

{'fraction_non_alphanumeric': 0.1028858218318695, 'fraction_numerical': 0.006691760769552488, 'mean_word_length': 2.697063369397218, 'pattern_counts': {'":': 2, '<': 5, '<?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': '5548889', 'n_tokens_mistral': 789, 'n_tokens_neox': 767, 'n_words': 165}