Holdem visualizer on Ignition pool

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Holdem visualizer on Ignition pool

Postby stolkachov » Fri Feb 01, 2019 7:14 pm

Hi, I have Ignition specific question.
Couple months ago you did a change where Player1 was replaced with p1-sessionid or whatever.
So when it was Player1 I could go to Holdem Hand Range Visualizer and run different analysis on this player (obv it didn't matter which player1..6 I was going to choose)
Now when it's p1-whatever I cannot really do it as I will get very small sample size as this id only from specific session.

I know you did this change for a reason (specifically to support HUD in regular table cash games), but I would really like to have a way to do range analysis on ignition pool.
I know that I can do filters and run reports with "Filter on Active Player" unchecked, but it won't produce visualization.

Is there any workaround for this?

The only thing that I can think of is writing a piece of software to preprocess Ignition files before importing them into PT4 and add something like that.

Player Info: Seat1: P1, Seat2: P2, Seat3: P3, Seat4: P4, Seat5: P5 Seat6: P6

Or maybe you could add an option to not do this p1-sessionid mapping when files are imported through the "Get Hands From disk" option as it doesn't really make sense and not helpful to do it this way after 24h.

What do you think?
stolkachov
 
Posts: 26
Joined: Fri Nov 16, 2018 5:45 pm

Re: Holdem visualizer on Ignition pool

Postby Flag_Hippo » Sat Feb 02, 2019 11:41 am

There isn't a workaround to do that with PokerTracker 4 after these changes but thanks for the suggestion and I'll pass that on for you to the development team.
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Holdem visualizer on Ignition pool

Postby stolkachov » Sun Feb 03, 2019 3:04 pm

Thanks for the reply.
I actually tried it right now.

I did insert this line into original Ignition HH file

Player Info: Seat1: P1, Seat3: P3, Seat4: P4, Seat5: P5, Seat6: P6

------------------
Original
Ignition Hand #3724900909 Zone Poker ID#1335 HOLDEMZonePoker No Limit - 2019-02-02 01:44:27
Seat 1: Small Blind ($146.28 in chips)
Seat 2: Big Blind [ME] ($50 in chips)
Seat 3: UTG ($45.25 in chips)
Seat 4: UTG+1 ($95.88 in chips)
Seat 5: UTG+2 ($14.23 in chips)
Seat 6: Dealer ($211.20 in chips)
Dealer : Set dealer [6]
Small Blind : Small Blind $0.25
Big Blind [ME] : Big blind $0.50

Updated:

Ignition Hand #3724900909 Zone Poker ID#1335 HOLDEMZonePoker No Limit - 2019-02-02 01:44:27
Seat 1: Small Blind ($146.28 in chips)
Seat 2: Big Blind [ME] ($50 in chips)
Seat 3: UTG ($45.25 in chips)
Seat 4: UTG+1 ($95.88 in chips)
Seat 5: UTG+2 ($14.23 in chips)
Seat 6: Dealer ($211.20 in chips)
Dealer : Set dealer [6]
Player Info: Seat1: P1, Seat3: P3, Seat4: P4, Seat5: P5, Seat6: P6
Small Blind : Small Blind $0.25
Big Blind [ME] : Big blind $0.50

and I imported it into PT4

Image

So yes there is a workaround. One should just write a script to preprocess all ignition input files and add this Player info line in which case PT4 import mechanism won't change it to session ids. I'll do it and share it here in case someone is interested.
stolkachov
 
Posts: 26
Joined: Fri Nov 16, 2018 5:45 pm

Re: Holdem visualizer on Ignition pool

Postby stolkachov » Sun Feb 03, 2019 9:59 pm

Ok, here you go. It will work on either original ignition files or exported from PT4 to import them again.

Code: Select all
import os
import sys


def main():

    PLAYER_INFO = ["Player Info: Seat2: P2, Seat3: P3, Seat4: P4, Seat5: P5, Seat6: P6",
                   "Player Info: Seat1: P1, Seat3: P3, Seat4: P4, Seat5: P5, Seat6: P6",
                   "Player Info: Seat1: P1, Seat2: P2, Seat4: P4, Seat5: P5, Seat6: P6",
                   "Player Info: Seat1: P1, Seat2: P2, Seat3: P3, Seat5: P5, Seat6: P6",
                   "Player Info: Seat1: P1, Seat2: P2, Seat3: P3, Seat4: P4, Seat6: P6",
                   "Player Info: Seat1: P1, Seat2: P2, Seat3: P3, Seat4: P4, Seat5: P5"]
    num_param = len(sys.argv)
    converted_hands = []
    if num_param < 3:
        print("Usage python3 IgnitionConverter.py inputDir outputDir")
        sys.exit(1)
    else:
        input_dir, output_dir = sys.argv[1:]

    print(input_dir, output_dir)

    for filename in os.listdir(input_dir):
        if not filename.endswith(".txt"):
            continue
        with open(os.path.join(input_dir, filename), "r") as f:
            original_content = f.read()
            cnt_hands = original_content.count("Ignition Hand")
            # print(cnt_hands)
            all_hands = list(map(lambda x: x.strip(), filter(None, original_content.split("\n\n"))))
            for hand in all_hands:
                lines = hand.split("\n")
                for line in lines:
                    if line.startswith("Seat") and "[ME]" in line:
                        # print(line)
                        hero_seat_index = line[5]
                    # In case of exported PT4 file
                    if line.startswith("Player Info:"):
                        converted_hands.append(hand.replace(line, PLAYER_INFO[int(hero_seat_index)-1]))
                        break
                    # In case of original Ignition file
                    if line.startswith("Small Blind : Small Blind") or line.startswith("Small Blind  [ME] : Small Blind"):
                        converted_hands.append(hand.replace(line, PLAYER_INFO[int(hero_seat_index)-1] + "\n" + line))
                        break

        with open(os.path.join(output_dir, filename), "w") as f:
            f.write("\n\n\n".join(converted_hands))
            cnt_processed = "".join(converted_hands).count("Ignition Hand")
            if (cnt_hands != cnt_processed):
                print ("ERROR")
            converted_hands.clear()


if __name__ == '__main__':
    main()
stolkachov
 
Posts: 26
Joined: Fri Nov 16, 2018 5:45 pm

Re: Holdem visualizer on Ignition pool

Postby stolkachov » Sun Feb 03, 2019 10:05 pm

and now given that you have big enough sample you can make pretty good visualization. Ideally I'd like to combine all the P1..P6 data, but I don't see how is it possible at this moment

https://imgur.com/a/rj0FFi4
Image
stolkachov
 
Posts: 26
Joined: Fri Nov 16, 2018 5:45 pm


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: Google [Bot] and 34 guests

cron
highfalutin