Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатика
ИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханика
ОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторика
СоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансы
ХимияЧерчениеЭкологияЭкономикаЭлектроника

How to use it from a DLL

To use Enhanced prwin from a DLL, you need to declare the structures and pick up the pointer to them as described here: {prw1326}. To switch OpenHoldem to a calculation using data in the structure which you have generated you need to set:

prw1326->useme = 1326;

 

If this is all you do OpenHoldem will switch at flop and after to an enhanced calculation using the vanilla hand profiles it set up for each chair at initialization. This will probably give slightly worse results than a well-configured {Weighted prwin}, since the profiles are static!

 

Now assume that at the flop you become convinced that chair 2 has a pair of aces. No other ace is known, so he can have six possible hands. You want to set the structure so that OpenHoldem only calculates prwin using those hands for that opponent. First we need to note how OpenHoldem (or more specifically the PokerEval library) represents cards. Card rank 2 to Ace is represented by 0 to 12. You then add a number representing the suit. For hearts add 0, for diamonds add 13, for clubs add 26, and for spades add 39. Ac is thus 12+26=38. The six pairs he can have are AhAd, AhAc, AhAs, AdAc, AdAs and AcAs. You set the first six positions in the [1326] arrays:

 

prw1326->chair[2].rankhi[0]=12; //Ah

prw1326->chair[2].ranklo[0]=25; //Ad

...

prw1326->chair[2].rankhi[5]=25; //Ad

prw1326->chair[2].ranklo[5]=51; //As

 

Since you only want six card pairs to be considered you set:

prw1326->chair[2].limit=6;

 

Finally you set the weighting for each hand. As each hand is considered equally probable:

 

for(i=0;i<6;i++)prw1326->chair[2].weight[i]=prw1326->chair[2].level;

 

Once the hand was over you would not want to leave chair 2 as having a pair of aces.

 

prw1326->chair[2]=prw1326->vanilla_chair;

 

would reset it.

 

This was an example of using prw1326 to set an opponent on a hand list. We chose a very small list for ease of illustration, but it is worth noting that this can be dangerous. If another opponent had a hand list which included a pair of aces, and an ace appeared on common, then there would be a risk that OpenHoldem could not find enough cards to satisfy an iteration and would hang. Since the iteration process is so CPU intensive we did not include code to catch this situation.

 

Now let us suppose that chair 3 is a tight player. You think he will only place money on the upper half of the cards, and will only reliably pay for the top 25%. In this case you would want to take the vanilla profile and change the weightings on it.

 

for(i=0;i<332;i++) prw1326->chair[3].weight[i]=prw1326->chair[3].level;

for(i=332;i<663;i++) prw1326->chair[3].weight[i]=prw1326->chair[3].level*(663-i)/332;

prw1326->chair[3].limit=663;

 

Because we have set.limit for the chair we do not need to bother about the weightings for the bottom half of the hand list, because they will never be considered.

 

The procedure above would set a general profile for chair 3 based on pre-flop behavior. You might have a situation in which his betting behavior indicated that he might well have a jack in his hand. One response would be to traverse the hand list and reduce the weighting for any hand which did not contain a jack. A quicker technique is to increase the.level value (which automatically reduced the probability for all hands) and then increase the weighting only for hands containing a jack. It can be very useful to build up indexes in your DLL which show the hands which contain aces, kings etc, and also for those which contain suited cards. This can speed up this sort of operation considerably.

 

prw1326->preflop

If you use prwin at all pre-flop, there are real advantages to using the normal {Weighted prwin} before the flop. Enhanced prwin works by considering specific hand profiles for opponents, and in general, pre-flop you are not sure who your opponents later on will be. It also does not use the P factor to calculate against a number of opponents; it works strictly on active opponents. Using table tightness and position in an f$P formula to estimate likely number of opponents means that {Weighted prwin} is more useful pre-flop. Nevertheless, if you set…

 

prw1326->preflop=1326;

 

…then enhanced prwin will also be used pre-flop.

prw1326->bblimp

If this is set non-zero then Enhanced prwin will not attempt any weighting for a chair who has not voluntarily put any money into the pot pre-flop (i.e. an unraised BB). Please note that this is not set by default, but is a flag which should be set for the prwin calculation to be wholly realistic.

prw1326->chair[x].ignore

If this is set non-zero then Enhanced prwin will not attempt any weighting for chair x. The Iterator will make no assumptions about the chair hand list. The chair itself will still be included in the prwin calculation if it is still playing, but it is just treated as if it was an unraised BB, so that it could have any available hand.

 


Дата добавления: 2015-07-20; просмотров: 127 | Нарушение авторских прав


Читайте в этой же книге: The Formula Editor | Secondary Functions | Menu Options | The Scripting Language | Calculated Symbols | Poker Value | User DLL | How OpenHoldem calls DLL functions | Using Hand Lists | Preferences |
<== предыдущая страница | следующая страница ==>
Iterations and Standard Deviation| Starting Hand Ranking

mybiblioteka.su - 2015-2024 год. (0.007 сек.)