Image Image Image




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Decoupling The Nash Equilibrium Logic
PostPosted: Wed Jul 09, 2008 9:35 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
calcRanges.cs contains one of the most important method: the Nash equilibrium calculation for given game parameters.

The method used is fictitious play, although I'm not 100% sure. Maybe the developers can help here by posting few hints about the exact algorithm used.

The main method signature doing the calculation is the following:

Code:
       
        // iPlayers: player count
        // iStacks: stack sizes BEFORE setting blinds and antes
        // iRaiserIndex: raiser index in array
        // iBB: Big blind size
        // iNoSB: True if there isn't smallblind otherwise false
        // iICMs: Award structure
        // iThreshold: Minimal EV threshold
        // oRanges: Calculation results, call and push ranges
        public void calc(int iPlayers, int[] iStacks, int iRaiserIndex, int iBB, int iAnte, bool iNoSB, double iEVthreshold, double[] iPayoutStructure, int[] oRanges);


And, the bonus from my side, here are the things, visually:

Attachment:
NashCalc.PNG
NashCalc.PNG [ 45.77 KB | Viewed 4340 times ]

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Fri Jul 11, 2008 10:05 am 
Offline
Regular member
User avatar

Posts: 58
Favourite Bot: Openholdem
I have started looking at the code but don't have the program on the work so gonna start analyze it better in the weekend. As the creator said it's pretty messy and not alot of comments.

_________________
We see the winners and "learn" from them, while forgetting the huge unseen cemetery of losers.


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Wed Jul 16, 2008 11:41 am 
Offline
Regular member
User avatar

Posts: 58
Favourite Bot: Openholdem
I am rewriting calcranges.cs and icm into c++ so hopefully I can provide some info when I am done.

_________________
We see the winners and "learn" from them, while forgetting the huge unseen cemetery of losers.


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Wed Jul 16, 2008 11:55 am 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
If you manage to completely decouple the nash (+icm) calculation apart from any GUI that would be nice.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Fri Jul 18, 2008 1:02 am 
Offline
Regular member
User avatar

Posts: 58
Favourite Bot: Openholdem
After a couple of days work I learn a few new things. The nash calculation and ICM calculations actually are already separated.

The two files are:
calcRanges.cs
ICM.cs

If you want to calculate the handranges you can use the function Indiana pointed out:

Code:
public void calc(int iPlayers, int[] iStacks, int iRaiserIndex, int iBB, int iAnte, bool iNoSB, double iEVthreshold, double[] iPayoutStructure, int[] oRanges)


The size and values on is:

Code:
iPayoutStructure = {50,30,20};
int[] iStacks ={1000,1000,1000,1000,1000,1000,1000,1000,1000,1000} ;

The rest is pretty clear.

Which is a public function in calcRanges.cs but since it uses ICM to calculate the optimal Ranges the ICM.cs is also needed.

I haven't played around with just the ICM calculations yet but the two public functions is

Code:
public double calcPush(int players, int[] myHand, int myIndex, double[,] playerData, double[] ICMs, int ICMc)


and

Code:
public double calcCall(int players, int[] myHand, int myIndex, int oppIndex, double[,] playerData, double[] ICMs, int ICMc)


They can be compiled to an c# dll file. See here for instructions http://msdn.microsoft.com/en-us/library/3707x96z(VS.80).aspx

I haven't gripped all the calculations we will see if I can get back to that.

But the dll file with handrange calculations works as good as SNGEGT does.

_________________
We see the winners and "learn" from them, while forgetting the huge unseen cemetery of losers.


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Fri Jul 18, 2008 1:20 am 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
Nice work. I will try to decouple and convert it to Java tomorrow.

I guess on the algorithmic side the ability to handle limpers etc. + provisioning of default opponent models would seem to be the most impotant (now missing) extensions.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Fri Jul 18, 2008 6:12 pm 
Offline
PokerAI fellow
User avatar

Posts: 2342
Favourite Bot: My next one
Damn, I guess I missed the creation of that new subforum. I'll look into the code this week end to get up to speed.


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Tue Jul 22, 2008 4:35 pm 
Offline
Senior member
User avatar

Posts: 189
Favourite Bot: My own
How good are the scraping techniques use in it?

The code is pretty bad from a developing aspect, but if they are providing pixel table testing for 3+ major sites, im not in a position to complain.
I might tidy it up into a c# table information collector..

Potato


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Tue Jul 22, 2008 7:04 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
I think the scrapers are hardcoded, and no longer maintained, but I might be wrong with both points.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Decoupling The Nash Equilibrium Logic
PostPosted: Wed Jul 23, 2008 8:38 pm 
Offline
PokerAI fellow
User avatar

Posts: 2342
Favourite Bot: My next one
They are hardcoded yes. And they are only run when you click on a table inside the listbox on the top right part of the screen.

I was thinking of working on another main interface that would provide a large listbox on the left with details for each table (so 1 item per table) or providing a historical view of all the hands on all tables (1 item per hand per table). Would there be any interest around that ? Or any suggestion ?


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: