예제 #1
0
파일: play.py 프로젝트: zb46392/poker
def main():
    global INIT_CHIPS
    Table.INIT_CHIPS = INIT_CHIPS
    o = TerminalJustPotCollectionTextualObserver()
    t = Table([TerminalPlayer, SemiRandomBot, SemiRandomBot])
    t.attach_observer(o)
    t.run_tournament()
예제 #2
0
파일: demo.py 프로젝트: zb46392/poker
def main():
    t = Table([SemiRandomBot, SemiRandomBot, SemiRandomBot])
    o = TerminalTextualObserver()
    f = FileTextualObserver()
    t.attach_observer(o)
    t.attach_observer(f)
    t.run_tournament()
예제 #3
0
파일: validate.py 프로젝트: zb46392/poker
def main() -> None:
    global VALIDATION_EPISODES, INIT_CHIPS, SMALL_BET, BIG_BET

    Table.INIT_CHIPS = INIT_CHIPS
    Table.SMALL_BET = SMALL_BET
    Table.BIG_BET = BIG_BET
    prepare_dqn()

    table = Table(PLAYERS)

    total_win_cnt = {player_name: 0 for player_name in table.player_names}

    for episode in range(1, VALIDATION_EPISODES + 1):
        table.reset_tournament()
        table.run_tournament()

        total_win_cnt[table.get_winner_name()] += 1

        print_progress(episode, total_win_cnt)

    print_results(total_win_cnt)