Poker-AI.org Poker AI and Botting Discussion Forum 2016-01-11T01:19:22+00:00 http://poker-ai.org/phpbb/feed.php?f=24&t=2957 2016-01-11T01:19:22+00:00 2016-01-11T01:19:22+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6894#p6894 <![CDATA[Re: Simple questions]]> ...
Thank you so much :)

Statistics: Posted by karma — Mon Jan 11, 2016 1:19 am


]]>
2016-01-11T00:59:13+00:00 2016-01-11T00:59:13+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6893#p6893 <![CDATA[Re: Simple questions]]> karma wrote:

Hello, i have some doubts(?) about Weighting the enumerations..

first of all.. the weight table is used when is calculated the potential and strength of the hand, right?.. then

Code:
 if(ourrank>opprank){
    ahead += weightTable[i];
 }
 else if(ourrank==opprank){
    tied += weightTable[i];
 }
 total += weightTable[i];
 ...               
 strength = (ahead+tied/2)/total;


is this code right? or "total += weightTable[i]" should be "total += 1"

Yes, that code looks right, and "total += 1" looks wrong.

karma wrote:

second..
According to Davidson paper:

Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = WT[E] * PT[A]
     }
}

"The relative value for each hand is increased or decreased to be consistent with every opponent action."

i can't see the way of increase the value with WT[E] = WT[E] * PT[A], if WT[E] is between 0 to 1, and in each street is mutiplied by other value between 0 to 1... how this work?

Thanks


With that algorithm, you are right, WT[x] will only decrease. But the word "relative" is crucial here.

Example: suppose there are only two cards, Ace and King, and initially WT[K] = 0.5, WT[A] = 0.5. And suppose that the opponent calls, and the opponent model says that PT[call] for Ace is 40%, PT[call] for King is 80%, so now WT[A] = 0.5*0.4 = 0.2, WT[K] = 0.5*0.8 = 0.4. The probability that the opponent has ace is 0.2/(0.2+0.4) = 33%, king: 0.4/(0.2+0.4) = 67%. And if we have an ace (supposing ace is better than king), then with your strength computation algorithm, total becomes 0.4+0.2 = 0.6, ahead = WT[K] = 0.4, tied = WT[A] = 0.2 so strength = (ahead+tied/2)/total = (0.4+0.2/2)/0.6 = 83%.

Statistics: Posted by eiisolver — Mon Jan 11, 2016 12:59 am


]]>
2016-01-10T22:24:51+00:00 2016-01-10T22:24:51+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6891#p6891 <![CDATA[Re: Simple questions]]> Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = (WT[E] + PT[A]) / 2
     }

}
E WT[E]old  PT[Raise]  WT[E]new
--------------------------------
A    0.25       1.0         0.625
K    0.25       1.0         0.625
Q    0.25        0.0        0.125
J    0.25         0.0        0.125
---------------------------------------
                              1.5 ????


The following is just Bayes Theorem. https://en.wikipedia.org/wiki/Bayes%27_theorem
probability of villain holding ace given action is raise = probability of action is raise given villain is holding ace * probability of villain holding ace / probability of action is raise

Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = WT[E] * PT[A]
     }


     /* Normalise WT */
     TotalWeight = 0
     for each (E in WT) {
         TotalWeight = TotalWeight + WT[E]
     }
     for each (E in WT) {
         WT[E] = WT[E] / TotalWeight
     }
}

E WT[E]old  PT[Raise]  WT[E]new
--------------------------------
A    0.25       1.0         0.5
K    0.25        1.0        0.5
Q    0.25        0.0        0.0
J    0.25         0.0        0.0
--------------------------------------
                              1.0

Statistics: Posted by spears — Sun Jan 10, 2016 10:24 pm


]]>
2016-01-10T19:06:08+00:00 2016-01-10T19:06:08+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6890#p6890 <![CDATA[Re: Simple questions]]>
Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = (WT[E] + PT[A]) / 2
     }

}

I will continue reading.. thanks

It is hard but i love this, all about AI in general, I hope I can contribute in the future

Statistics: Posted by karma — Sun Jan 10, 2016 7:06 pm


]]>
2016-01-10T18:11:16+00:00 2016-01-10T18:11:16+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6889#p6889 <![CDATA[Re: Simple questions]]> - Hero holds K.
- Villain's weight table is {0.15, 0.5, 0.25, 0.1}.
- Hero's strength = (0.5/2 + 0.25 + 0.1) / (0.15 + 0.5 + 0.25 + 0.1)


Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = WT[E] * PT[A]
     }


     /* Normalise WT */
     TotalWeight = 0
     for each (E in WT) {
         TotalWeight = TotalWeight + WT[E]
     }
     for each (E in WT) {
         WT[E] = WT[E] / TotalWeight
     }
}

Statistics: Posted by spears — Sun Jan 10, 2016 6:11 pm


]]>
2016-01-10T17:35:44+00:00 2016-01-10T17:35:44+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6888#p6888 <![CDATA[Re: Simple questions]]> spears wrote:

If you believe opponent holds a uniformly distributed hand then every weightTable[i] is the same and could be 1. If you believe opponent is more likely to hold some cards than others then some weightTable[i] are greater than others.

Yes, I understand it, I do this thinking that is more likely to hold some cards than others, my question is more stupid, for example:
weightTable lenght = 3.. I lost (with 0.50 prob. hold it), won (with 0.75 prob. hold it) and tie (with 0.25 prob. hold it)..
then is..
strength = (0.75+0.25/2) / (0.50+0.75+0.25)
or
strength = (0.75+0.25/2) / (1+1+1)
??

spears wrote:

To get the correct probabilities you would just normalise WT. As it is the the relative values of WT are correct.

Then for example.. if opp hold 72 preflop and call a raise, WT[72] was equal to 1, becomes 0.1.. in flop 725, opp raise, then.. WT[72] = 0.1 * 0.9 = 0.09 ??

Thanks so much

Statistics: Posted by karma — Sun Jan 10, 2016 5:35 pm


]]>
2016-01-10T15:37:55+00:00 2016-01-10T15:37:55+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6887#p6887 <![CDATA[Re: Simple questions]]> karma wrote:

Hello, i have some doubts(?) about Weighting the enumerations..

first of all.. the weight table is used when is calculated the potential and strength of the hand, right?.. then

Code:
 if(ourrank>opprank){
    ahead += weightTable[i];
 }
 else if(ourrank==opprank){
    tied += weightTable[i];
 }
 total += weightTable[i];
 ...               
 strength = (ahead+tied/2)/total;


is this code right? or "total += weightTable[i]" should be "total += 1"

If you believe opponent holds a uniformly distributed hand then every weightTable[i] is the same and could be 1. If you believe opponent is more likely to hold some cards than others then some weightTable[i] are greater than others.

karma wrote:

second..
According to Davidson paper:

Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = WT[E] * PT[A]
     }
}

"The relative value for each hand is increased or decreased to be consistent with every opponent action."

i can't see the way of increase the value with WT[E] = WT[E] * PT[A], if WT[E] is between 0 to 1, and in each street is mutiplied by other value between 0 to 1... how this work?

Thanks

To get the correct probabilities you would just normalise WT. As it is the the relative values of WT are correct.

Statistics: Posted by spears — Sun Jan 10, 2016 3:37 pm


]]>
2016-01-09T18:11:34+00:00 2016-01-09T18:11:34+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2957&p=6886#p6886 <![CDATA[Simple questions]]>
first of all.. the weight table is used when is calculated the potential and strength of the hand, right?.. then

Code:
 if(ourrank>opprank){
    ahead += weightTable[i];
 }
 else if(ourrank==opprank){
    tied += weightTable[i];
 }
 total += weightTable[i];
 ...               
 strength = (ahead+tied/2)/total;


is this code right? or "total += weightTable[i]" should be "total += 1"

second..
According to Davidson paper:

Code:
UpdateWeightTable(Action A, WeightTable WT, GameContext GC, OpponentModel OM)
{
     for each (entry E in WT)
     {
          ProbabilityDistribution PT[FOLD,CALL,RAISE]
          PT = PredictOpponentAction(OM, E, GC)
          WT[E] = WT[E] * PT[A]
     }
}

"The relative value for each hand is increased or decreased to be consistent with every opponent action."

i can't see the way of increase the value with WT[E] = WT[E] * PT[A], if WT[E] is between 0 to 1, and in each street is mutiplied by other value between 0 to 1... how this work?

Thanks

Statistics: Posted by karma — Sat Jan 09, 2016 6:11 pm


]]>