Open Side Menu Go to the Top
Register
FPHG (*** NO LONGER ALLOWED AT PARTY - PLEASE READ OP ***) FPHG (*** NO LONGER ALLOWED AT PARTY - PLEASE READ OP ***)

05-28-2006 , 07:49 AM
This version is all thanks to Mogobu. He has been working on the FPHG code, and has optimized it again so it should use alot less CPU than before (he has also compiled it on a better compiler than I was using, so this should also decrease CPU load).

I haven't had time to test this yet so I have left v0.06 up just incase their are any problems (you will see v0.07 is listed on the main page as the current test-version).

I'm just about to go away on vacation for the next 2/3 weeks so I wont have time to add any extra to FPHG until I gets back, but here is my ToDo list:

Still ToDo:
1. Make it so that .hhf files are split after N hands for people having problems importing into PT.
2. Fix the the missing newline which can be seen when viewing the hands in notepad.
3. Fix to warn user that "-o" option can't be used at same time as "-r".
4. Add a simple GUI to save all the CLI app questions.
5. Write the FAQ and instructions (to be posted on Ben's Wiki for easy editing by us all).

Have I missed anything?

Juk
05-29-2006 , 09:12 PM
Looks good to me.

I compiled it using Microsoft's Profile-Guided Optimization. I profiled against a "dirty memory" scenario where many tables had been running for an extended period of time, and used a version of the code which ran both RealTime and regular mode scans so that both logic branches got profiled and optimized.

Using the PGO resulted in 10 to 20% more scans per minute than just using the regular VS 2005 C++ compiler (with all relevant optimization turned on.) Using the VS 2005 C++ compiler improved performance over the initial version of the app before I made any changes, but it wasn't a huge improvement - I think it was about 10-15% faster.

Between my hacking away at the code and using the newer optimizing compiler, I'm seeing gains of well over 1,000% in regular mode, and more than double that in RealTime mode. I can run it with a 250ms delay and get roughly four scans per second without creating any serious load on machine. That makes it less likely to miss the end of a hand - the more frequently you scan, the more CPU load, but the less likely you are to miss the end of a hand.

I'm curious what kind of performance differences others notice on their machines, and whether the super-optimized version runs at all. Also, a little long-term run testing would be a good thing!
05-31-2006 , 03:37 AM
Well, the results from running it on my machine for several hours aren't quite the same.

I use a Dell laptop with a Celeron M 1.3Ghz CPU with 1mb L2 cache and 1.5Gb ram to grab hands from 12 SNGs on EmpirePoker. Version 0.06/0.06a used about 10% CPU when running with their default scanning delay of 1,000ms. Version 0.07 uses about 22% CPU with a delay of 250ms.

So maybe this is an improvement since it scans a lot more than previous versions, but the CPU usage is certainly noticable.
I have never used Realtime mode and I haven't tried altering the default scanning delay.

Do you think this has something to do with you optimizing for a different CPU or maybe the code is not optimized for Empire yet?
05-31-2006 , 12:45 PM
OK, that was my stupid mistake - I shouldn't have changed the default scanning delay. I meant that to be a temporary change for use while debugging. . . People are used to the current defaults. I will fix it in a "debug" release, along with other fixes as people report in. When Juk gets back, we'll get it posted.

I would like to know if it's because of optimizing based on profiling on MY machine, or what. . .

Can you try this?

Make a file called run.bat with the following in it:

<font class="small">Code:</font><hr /><pre>@echo off
FreePHG.exe -prof</pre><hr />

The "-prof" turns on profiling mode, which will report how many "scans per minute" your machine produces. The "scans per minute" line appears once in a while, and it starts with a lot of spaces, so you'll see it off on the right side of the DOS box in which it's running.

If you could fire this batch against .06 and against .07, I'd be curious to see what kind of numbers you turn up.

If you want to try running .07 with a 1,000 ms delay, use this:

<font class="small">Code:</font><hr /><pre>@echo off
FreePHG.exe -d 1000</pre><hr />

The "-d 1000" changes the delay to 1000. Don't use "prof" mode at the same time when running, because the profiling work slows things down a tiny bit.

Thanks!
05-31-2006 , 01:46 PM
Modification to instantly grab Party hands.

Unzip the folder and moved it to:
C:\Program Files\PartyGaming\PartyPoker\HandHistory\FreePHG_v 0_06

Open the folder and locate the run.bat file.

1. RIGHT click on run.bat, choose EDIT
2. Change the text to look like the text below:
@echo off
FreePHG.exe -e txt
3. Go to file-&gt;save &amp; then close it

What that run.bat file does is open FreePHG and change the custom option to write .txt files instead of .hhf files - the .txt files can be auto imported using the party auto import function

Open auto import like normal and you are good to go.

Thanks to Brandon (TheStation) for this mod.
05-31-2006 , 06:15 PM
Juk's kinda here still , but not very easy to upload stuff from here (slow as [censored] net connection, etc).

I'm trying to avoid using the net for a few weeks too *give my RSI a break!), but if anything REALLY desperate comes up then you can still post or email and i'll try to check once every day, or so, for posts/emails.

Will be back properly by about the 15th of June, but until then only deperate stuff plz

Juk
06-01-2006 , 12:39 PM
I'd like to know what exactly the loophole is. I can't find it after reading this thread for 10 minutes.
06-01-2006 , 12:50 PM
Quote:
I'd like to know what exactly the loophole is. I can't find it after reading this thread for 10 minutes.
I'm pretty sure it's never been explicitly stated. However, Juk did post his source.
-Sam
06-01-2006 , 01:28 PM
Quote:
Quote:
I'd like to know what exactly the loophole is. I can't find it after reading this thread for 10 minutes.
I'm pretty sure it's never been explicitly stated. However, Juk did post his source.
-Sam
Juk was quoting when he called it a loophole; it's not really much of a loophole (which sounds like some sort of tricky exploit.) That's sort of why Juk was set off in the first place; it's really basic stuff.

It's pretty clear if you read through the (openly posted) source code: this app reads through the memory that Party is using, looks for anything that looks like a hand history, and dumps it to disk. Reading the memory is achieved through a commonly known and commonly used Windows API call.

The techniques used to try to optimize the scanning process (such as Juk's approach of building a 32-bit character string and scanning at 8-bit aligned addresses) are actually more sophisticated than the basic process used to read the memory.
06-01-2006 , 02:13 PM
Just wanted to say this is a kewl little app, have just discovered it, I'm also a programmer and a poker player and it's kewl to see someone doing this kind of stuff, makes me realise I should be more active on this forum from now on, there's so much info here - wish I had more time.

Anyway thanks Juk great work.
06-02-2006 , 01:54 PM
So I stole some code from various AHK-scripts that have been posted in the software forum and used it to write a script that opens PokerTracker and starts auto-import, it opens FPHG and it opens iWitness.
I created a folder called DataMining and in this folder I put all the stuff from iWitness and FPHG as well as the below code, otherwise the handhistories would end up in the wrong folder.

<font class="small">Code:</font><hr /><pre> ;;;;;;;;;;;;;;;;;;;;;;;;;;
; Begin PokerTracker Stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;
Process, Exist, ptrack2.exe
ptpid = %ErrorLevel%
if ptpid &lt;&gt; 0
{
IfWinExist Poker Tracker
{
WinActivate
}
}
else
{
Run C:\Program Files\Poker Tracker V2\ptrack2.exe
WinWait Poker Tracker
WinActivate
Sleep, 3000 ; Let it check for a newer version
Click 82, 64 ;
Sleep, 500 ; Starts auto-import.
Click 90, 340 ;
}

;;;;;;;;;;;;;;;;;;;;;;;;;;
; End PokerTracker Stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;
; Begin iWitness Stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;
Process, Exist, iWitness
p4tid = %ErrorLevel%
if p4tid &lt;&gt; 0
{
if WinExist iWitness
{
WinActivate
}
}
else
{
Run C:\Program Files\AutoHotkey\PokerScripts\DataMining\iWitness. ahk

}
;;;;;;;;;;;;;;;;;;;;;;;;;;
; End iWitness Stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;


;;;;;;;;;;;;;;;;;;;;;;;;;;
; Begin FreePHG Stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;
Process, Exist, FreePHG
p4tid = %ErrorLevel%
if p4tid &lt;&gt; 0
{
if WinExist FreePHG
{
WinActivate
}
}
else
{
Run C:\Program Files\AutoHotkey\PokerScripts\DataMining\FreePHG.e xe

}
;;;;;;;;;;;;;;;;;;;;;;;;;;
; End FreePHG Stuff
;;;;;;;;;;;;;;;;;;;;;;;;;;
</pre><hr />

Note that I use the auto-import party handhistory function and not the lightning bold.

Peter
06-03-2006 , 09:03 PM
I'm not too sure what is meant by creating a new folder to run FPHG from... I simply unzipped the FPHG files into my PartyPoker folder ie. where all the .hhfs are saved... I'm running FPHG.exe out of the PartyPoker folder, is this ok ?
06-04-2006 , 12:25 AM
edited: im a ****** and fixed my own mistake
06-04-2006 , 12:41 AM
Quote:
I'm not too sure what is meant by creating a new folder to run FPHG from... I simply unzipped the FPHG files into my PartyPoker folder ie. where all the .hhfs are saved... I'm running FPHG.exe out of the PartyPoker folder, is this ok ?
As far as FreePHG and PokierTracker are concerned, that's OK, and it works well.

Some people were concerned, early on, that Party might not like seeing it there, if they looked. It seems to not be an issue.
06-04-2006 , 02:17 AM
^ Nice, thanks dude
06-13-2006 , 01:35 PM
Should I be running the "run" program while datamining or the "FreePhg" program. Great software by the way.
06-13-2006 , 01:54 PM
Is it ok to datamine while playing? Im not sure if it would overwrite the files or not. Any help appreciated.
06-13-2006 , 07:49 PM
Anyone? Any input on my two questions would be great I just got the program running today and am a bit leery on how to use it.
06-13-2006 , 08:12 PM
yes, use the batch file. within the README you'll find the switches you need to enable to run FPHG while you play, it's the "observed only" option.

by the way, 6hrs is not a long time to wait in the software forum. I'd say a polite bump would be 24hrs. personally I don't care but someone might get ticked and not help you.
06-13-2006 , 08:56 PM
Quote:
yes, use the batch file. within the README you'll find the switches you need to enable to run FPHG while you play, it's the "observed only" option.
Sorry to be pesty about this but I want to make sure I get it right. So when I am playing/datamining or both I don't open the run.bat file but DO open the FreePhg.exe file correct? I just tried opening the run.bat file btw and it woulnd't load but the FreePhg.exe file did load.
06-13-2006 , 09:05 PM
Quote:
Sorry to be pesty about this but I want to make sure I get it right. So when I am playing/datamining or both I don't open the run.bat file but DO open the FreePhg.exe file correct? I just tried opening the run.bat file btw and it woulnd't load but the FreePhg.exe file did load.
The run.bat file needs to be in the same folder as freephg.exe for it to work (or you need to specify the path to freephg.exe in the .bat file). When you're playing and datamining at the same time, you want to modify the run.bat file so that it only imports observed hands (see readme.txt). Then you can use PT to import observed hands to one database and played hands to another, if you want.
06-14-2006 , 01:27 PM
Just so you understand, all the run.bat file does is open the FreePHG.exe file for you; it just does it with "switches" that let you control how FreePHG runs.

If you want to keep things simple, you should use FreePHG the exact same way whether you're playing or not; that's what I do. I let PokerTracker sort out the details. Hands are never imported into a single database twice, and I want all possible hands in my "observed" databases where I get statistics - including my played hands.
06-16-2006 , 11:25 PM
After I import the HHs to Pokertracker can I delete them from the folder and still have them saved in PT?
06-17-2006 , 04:11 AM
Quote:
After I import the HHs to Pokertracker can I delete them from the folder and still have them saved in PT?
Dont they delete themselves after you close Party?

By the way, wanted to say thanks for this program and to everyone who made it easy to set up.
06-17-2006 , 04:21 PM
They don't delete themselves. Party deletes any HHF's which it created when you close Party. Since FreePHG is creating these, if you put them elsewhere, they'll stay put. Party may or may not delete all HHF's that it finds if they're in the Party directory; I'm not sure.

PokerTracker can be set to move the HHF's somewhere else after they are processed; that's what I do and I save them in case I need to re-import.

      
m