Topic-icon Possible bugs in Log File analysis

More
18 Jan 2018 18:15 #39704 by ridley97
ridley97 created the topic: Possible bugs in Log File analysis
I followed up on my own question about Bet/Raise and Most Played log statistics. I found a couple of possible minor bugs - please see the post in the General issues forum
ridley97
The following user(s) said Thank You: Ghost__, sp0ck

Please Log in or Create an account to join the conversation.

More
19 Jan 2018 18:15 #39719 by ridley97
ridley97 replied.
If Ive read it right, bugs in Most Bet/Raise and Most Played have minimal impact and are easy to fix
In this section of function get_most_raise :

01 while($row = $query->fetch(PDO::FETCH_ASSOC)) {
02 if(is_numeric($row) & $row>0 & is_numeric($row) & $row>=0 & $row<=4 & is_numeric($row) & $row>=0 & is_numeric($row) & $row>0 & $row<=10) {
03 if($row != $oldHandID) {
04 for($i=0;$i<count($player_list_seat);$i++) {
05 $most_raise_found_hand[$i] = false;
06 }
07 }
08 if($row=='bets' || ($row=='is all in with' && $row>$oldAmount ) ) {
09 $most_raise[2][$row-1]++;
10 if(!$most_raise_found_hand[$row-1]) {
11 $most_raise[3][$row-1]++;
12 $most_raise_found_hand[$row-1] = true;
13 }
14 }
15 $oldAmount = $row;
16 $oldHandID = $row;
17 }
18 }


Error : Final Bet Amount is carrying forward to next Hand as 'previous bet amount',
so an opening Action of All-In does not count as a raise, unless its higher than final bet of previous hand.


Note line 08 is interpreted as: if (action = bet) OR [ (action = all-in) AND (amount > oldamount) ]
note the [ ] brackets,
so Amount is checked for All-in Actions only.

Fix : Need to reset 'previous bet amount', at the start of each new Hand,
so simply insert one new line, immediately after line 03, as : $oldAmount = -1;


In this line of SQL, created within function get_played_hands :

WHERE Amount IS NOT null AND Action<>'posts small blind' AND Action<>'posts big blind' AND UniqueGameID=".$uniqueGameID."

Possible Error : 'Wins' Actions also have not null Amounts, but a big blind could have a 'wins' Action without making a voluntary bet,
either by pre-flop walk, or a sequence of checks to a winning showdown. Should this count as 'played' ?

Fix if required ? : Either append : AND Action<>'wins'to the line
or better, rewrite the line to state explicitly the Actions that do count as voluntary bets, i.e. 'bets', 'calls', 'is all in with'

Note : 'wins (side pot)' Action also has an Amount and may be possible without a voluntary bet against an all-in call less than the small or big blind.
The following user(s) said Thank You: Ghost__

Please Log in or Create an account to join the conversation.

More
26 Jan 2018 14:18 - 26 Jan 2018 14:21 #39791 by tahr
tahr replied.
Hi ridley97,

Sometime ago, I started a Java project to analyze PDB files, in the same way that PHP analyzer does, but showing much more information (see: https://www.pokerth.net/community/forum/15-features-request/12533-log-file-analyzer )
Unfortunately, I started the project but I didn't have enough time to build something useful.

I just upload it to github all I did, which is not a lot: https://github.com/albmed/PTHAnalyzer.git
GUI app has nothing to show... just a basic structure, using SWT.
The only thing that could be useful (somehow), are tests:
- TestStats, prints out a lot of information, in a similar way that PHP Analyzer does, but it show much more information, especially those necessary to print charts.
- TestGraphs, builds the same charts that PHP: Pot, Stack & Cash.

Results are pretty similar than PHP Analyzer, but sometimes are different (I don't remember why).
If you run tests, make sure you overwrite variables for output paths (for graphs) and file input locations (PDB files), which are hard-coded.
I attach an example of both tests and original PDB file:
This attachment is hidden for guests.
Please log in or register to see it.


If you have Java skills, you can compare results either using PHP analyzer and this small app, to look for bugs. Feel free to do whatever you want with Java code, and let me know.

Requirements:
You'll need Java 8 to compile & run (it uses lambda expressions) and sqlite4java, log4j, jfreechart & jcommon libraries. If you what to try GUI app (main/MainWindow), you'll also need SWT.

Code may have a lot of bugs, and it would need a complete re-design :)

Regards,
tahr.

This message has an attachment file.
Please log in or register to see it.

The following user(s) said Thank You: Ghost__, sp0ck

Please Log in or Create an account to join the conversation.

Champions of

PokerTH - live

The PokerTH spectator tool.

Member Login

 advert
NOTE! This site uses cookies and similar technologies.
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information

We use cookies to personalize content and ads to offer features for social media and analyze the number of hits on our website. We also provide information about your use of our website to our partner for social media, advertising and analysis on.
http://www.google.com/intl/de/policies/privacy/partners/