コード例 #1
0
def _read_row(row):
    hole = int(row[0])
    board = row[1]
    if board == 0:
        board = ()
    else:
        board = ((int(board), ), )
    bets_0 = _comma_split_int(row[2])
    bets_1 = _comma_split_int(row[3])

    infoset = InfoSet((hole, ), board, (bets_0, bets_1))

    strategy = Strategy(0)
    strategy.average_strategy = [
        float(x) / 100000 for x in _comma_split_int(row[4])
    ]
    sum_strategy = sum(strategy.average_strategy)
    for s in strategy.average_strategy:
        s /= sum_strategy

    return infoset, strategy