Poker-AI.org Poker AI and Botting Discussion Forum 2016-03-02T21:39:44+00:00 http://poker-ai.org/phpbb/feed.php?f=22&t=2968 2016-03-02T21:39:44+00:00 2016-03-02T21:39:44+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6930#p6930 <![CDATA[Re: Help on equity range calculation]]>

1. Deal cards to hero.
1.1. deal known cards on the table
2. Generate Probability vectors for all opponents.
3. Delete forever all combinations with hero cards and known table cards from player vectors.
Code:
#define deletedForever -100500

4. Loop
5. Get random combination from player1 set.
6. Delete temporaly all combinations from other players sets
7. There you have all players with cards
8. Get random cards to the table and calculate profits.
9. Restore player vectors
and again and again

Statistics: Posted by nefton — Wed Mar 02, 2016 9:39 pm


]]>
2016-03-02T21:26:45+00:00 2016-03-02T21:26:45+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6929#p6929 <![CDATA[Re: Help on equity range calculation]]> For example 2 players of 3 split the bank, and 3rd loose. Or all players have different stakes.

Statistics: Posted by nefton — Wed Mar 02, 2016 9:26 pm


]]>
2016-03-02T21:22:46+00:00 2016-03-02T21:22:46+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6928#p6928 <![CDATA[Re: Help on equity range calculation]]>
it looks like:
Code:

bool Pockets_probability_vector::GetRandomPockets(card_t* c1, card_t* c2){
   
   int summ = 0;
   for (int pok = 0; pok < TotalPockets; pok++){
      if (Core[pok] > 0) summ += Core[pok];
   }

   if (summ == 0) return false;

   int rand_summ = rand() % summ;
   int rand_number = -1;
   summ = 0;
   for (int pok = 0; pok < TotalPockets; pok++){
      if (Core[pok] > 0) summ += Core[pok];
      if (summ > rand_summ){
         rand_number = pok;
         break;
      }
   }

   if (rand_number == -1) return false;

   NumberToPockets(rand_number, c1, c2);

   return true;
}

Statistics: Posted by nefton — Wed Mar 02, 2016 9:22 pm


]]>
2016-03-02T21:16:41+00:00 2016-03-02T21:16:41+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6927#p6927 <![CDATA[Re: Help on equity range calculation]]> You have several fundamental mistakes.
Here is how I solved not far ago problem like TS`s.

1. No any AA, AK, AKs. You need use AhKh, AhAd ... ets.
2. It is wery simple and useless model you want to calculate. Let's look wider.
Any player may have different cards with different probabilities.
Its about 1300 (not near my work now) different player cards combinations (of 2 cards)
And each combination have some chance to be.
This situation is easy represented by array
Code:
int ProbabilityVector[1300];
//each combination probability easy to calculate
int summ = 0;
for (p=0; p<1300; p++) summ += ProbabilityVector[p];

double P_129 = ProbabilityVector[129] / summ;
//but you need not any double in your calculations

Statistics: Posted by nefton — Wed Mar 02, 2016 9:16 pm


]]>
2016-03-02T00:34:14+00:00 2016-03-02T00:34:14+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6926#p6926 <![CDATA[Re: Help on equity range calculation]]> spears wrote:

Well I think that assigning a probability avoids the problem you are getting through randomisation


Thanks, I figured out my basic problem was not properly handling collisions but what you are suggesting too sounds like a good idea.

Thank you for the input a good suggestion to consider as well

Statistics: Posted by mru22 — Wed Mar 02, 2016 12:34 am


]]>
2016-03-01T19:19:36+00:00 2016-03-01T19:19:36+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6925#p6925 <![CDATA[Re: Help on equity range calculation]]> Statistics: Posted by spears — Tue Mar 01, 2016 7:19 pm


]]>
2016-03-01T12:49:25+00:00 2016-03-01T12:49:25+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6924#p6924 <![CDATA[Re: Help on equity range calculation]]> Statistics: Posted by mru22 — Tue Mar 01, 2016 12:49 pm


]]>
2016-03-01T12:37:56+00:00 2016-03-01T12:37:56+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6923#p6923 <![CDATA[Re: Help on equity range calculation]]> Statistics: Posted by spears — Tue Mar 01, 2016 12:37 pm


]]>
2016-03-01T06:35:29+00:00 2016-03-01T06:35:29+00:00 http://poker-ai.org/phpbb/viewtopic.php?t=2968&p=6922#p6922 <![CDATA[Help on equity range calculation]]>
I have the single hand vs hand hand working pefectly but when I do hand vs range I have small discrepencies when i have more than one opponent with the same cards or same ranges.

I was looking at the following source: https://github.com/mihhailnovik/jSim

In the area where there is monte carlo simulation I cannot figure what is different in my logic than from the code he provides so I;d like to explain what I'm doing and maybe someone can correct my approach.

1) I specify a players specific hand
2) specify the board.
3) I remove those cards from the remaining available cards.
4) Specify a few ranges for each opponent
5 ) For each iteration in the simulation i randomize who is dealt the first hand. For example Opponent 2 below might be dealt first and receive AdKc then the next iteration opponent 3 could be dealt first.
6) For each players range, i use rand on the number of ranges and then pull a specific hand based on that random value.
For example if a player can have 18 different hands between AA, KK, QQ i run a rand % 18 and the use the result as the hand from the array to assign.

I do that for each opponent and check to make sure the cards in the hand are available and not already taken such as:

if( (selectedHand & usedCards) ==0) {
opponentMask[n] = selectedHand;
}

When i run the code the results come back close but still like .25 or .45 different but other times they might be off be off by more depending on the order that I specified the ranges and how many opponents share similar ranges or hands with same cards.

It seems there is something not random enough in they way I am drawing hands. Can anyone suggest something I am fundamentally missing ? Thanks,

An example of something that would evaluate differently is
Player 9h9d
Opponent 1) AA,KK,QQ,TT,44
Opponent 2) 88,44,33,JTs
Opponent 3) KK,77,JJ,65s

will return about .3 to .4 different from

Player 9h9d
Opponent 1) 88,44,33,JTs
Opponent 2) KK,77,JJ,65s
Opponent 3) AA,KK,QQ,TT,44

board in both cases AsQc3d

Any insight or help is appreciated.

Statistics: Posted by mru22 — Tue Mar 01, 2016 6:35 am


]]>