1

こんにちは、私は大学で Java プロジェクトを行っており、そこでポーカーの手を分析する必要があります。txt ログ ファイルでいくつかのポーカー ハンドを見つけました。

通常は次のようになります。

PokerStars Zoom Hand #86981279921:  Hold'em No Limit ($0.10/$0.25 USD) - 2012/09/30 23:49:51 ET
Table 'Whirlpool Zoom 40-100 bb' 9-max Seat #1 is the button
Seat 1: lgwong ($30.99 in chips) 
Seat 2: hastyboots ($28.61 in chips) 
Seat 3: seula i ($25.31 in chips) 
Seat 4: fr_kevin01 ($31.81 in chips) 
Seat 5: limey05 ($27.45 in chips) 
Seat 6: sanlu ($24.65 in chips) 
Seat 7: Masterfrank ($25.35 in chips) 
Seat 8: Refu$e2Lose ($33.23 in chips) 
Seat 9: 1pepepe0114 ($37.62 in chips) 
hastyboots: posts small blind $0.10
seula i: posts big blind $0.25
*** HOLE CARDS ***
fr_kevin01: folds 
limey05: folds 
sanlu: folds 
Masterfrank: folds 
Refu$e2Lose: folds 
1pepepe0114: folds 
lgwong: folds 
hastyboots: folds 
Uncalled bet ($0.15) returned to seula i
seula i collected $0.20 from pot
seula i: doesn't show hand 
*** SUMMARY ***
Total pot $0.20 | Rake $0 
Seat 1: lgwong (button) folded before Flop (didn't bet)
Seat 2: hastyboots (small blind) folded before Flop
Seat 3: seula i (big blind) collected ($0.20)
Seat 4: fr_kevin01 folded before Flop (didn't bet)
Seat 5: limey05 folded before Flop (didn't bet)
Seat 6: sanlu folded before Flop (didn't bet)
Seat 7: Masterfrank folded before Flop (didn't bet)
Seat 8: Refu$e2Lose folded before Flop (didn't bet)
Seat 9: 1pepepe0114 folded before Flop (didn't bet)

私の問題は、ログ ファイルを解析する方法がわからないことです。私が持っている唯一の知識は、特定の文字または記号を行ごとに「手動で」スキャンすることですが、徹底的なエラー処理が必要になるのではないかと心配しています。

これらのポーカー ハンドを解析するための他のテクニックやより良い方法があるかどうか、私はさまよっていましたか?

助けてくれて本当にありがとうございます

編集:「データマイニング」は質問の一部ではないため、申し訳ありません。

EDIT2:C ++と同じことをするJavaメソッドも探していました

例: C++ では、# 記号が myfile.getline(store_in_this_var,5,'#') になるまで 5 文字を読み取ります。同じことを行う Java メソッドを提案していただけますか?

4

1 に答える 1

1

あなたはおそらくあなたが言うことをする必要があります:

行ごとに進み、行頭の文字を探します。

数年前、 FullTilt Pokerの履歴ファイルを分析する同様のアプリを作成しました...

私はまったく同じことをしましたが、かなりうまくいきました。


編集

于 2012-11-06T22:57:24.283 に答える