Poker-AI.org

Poker AI and Botting Discussion Forum
It is currently Mon Nov 13, 2023 2:25 pm

All times are UTC




Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat Apr 06, 2013 2:04 pm 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
Hi everyone,

I'm starting an implementation that would take as input a restricted form of a HUNL game, and compute a Nash Equilibrium. It would first of all be restricted in terms of bettings sequences and second, it would use a card/board abstraction for the game to be tractable.

About this last part, I've just read about bucketing, but I'm not sure I understand about history bucketing. Do we really need it? I was thinking about creating buckets for the flop in the form of: nutted hands, top2, 2p, TPTK, TPGK, second pair GK, second pair bad kicker, two overs, one over, flush draw, bdfd, straight draw, bdsd, flush draw + pair, etc., and similar stuff for turn, and for the river I guess you just need hand strength separated in N buckets

Then a decision node in the game would be composed of a betting sequence, and a bucket. If we want to have less than 10M decision nodes for instance, we could use 1000 betting sequences and 10k buckets per round
I think I'm missing something important there, 10k buckets seems a lot!

Finally, I'll use something like external sampling to solve the abstracted game

Would you say that this is currently the best approach to get an approximation of a Nash equilibrium for the whole game?
I'll do the implementation in c/c++ ; how much decision nodes will I be able to handle with external sampling, and how much betting sequences/buckets would you say I should use?

Also, which paper do you think presents the external sampling algorithm in the most understanble way so that I can implement it easily? And would you have other links that would help me understand better this whole thing?

Thanks


Top
 Profile  
 
PostPosted: Sat Apr 06, 2013 3:45 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
I'd recommend to read Michael Johansons Master thesis. Most of the question will e clear after that ;)


Top
 Profile  
 
PostPosted: Mon Apr 15, 2013 2:32 pm 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
Thanks, it's very interesting. I have read the first three chapters for now (do I need more for now?)

However I'm still having trouble understanding the EHS and EHS2 history bucketing thing
From what I understood, they use 5 to 10 buckets per rounds, and they make decisions based on the sequence of buckets for PF,Flop,Turn,River. When they use 5 buckets, this increases the number of decision nodes by a factor of ~625

Image

I understand that if you fix yourself 5 buckets/round, then history bucketing will give you better strategies. But now what if you're able to "forget" which buckets you were in, and for instance merge all the states on Turn which have the same Turn bucket (regardless of Preflop/Flop buckets)? In that case you could use about directly use about 600buckets/round and get a game which has ~the same size than the previous one.

This looks closer to the way poker players would think, especially if you define the buckets to be what I said earlier: "nutted hands, top2, 2p, TPTK, TPGK, second pair GK, second pair bad kicker, two overs, one over, flush draw, bdfd, straight draw, bdsd, flush draw + pair, etc." I guess one drawback of this is that you would have to define buckets manually, rather than computer directly from EHS and EHS2

Do you think this would be possible?


Top
 Profile  
 
PostPosted: Mon Apr 15, 2013 4:24 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
yes, the keywords are perfect recall (you remember history) and imperfect recall (you dont know which bucket you are coming from). It has shown that the latter typically leads to better results.


Top
 Profile  
 
PostPosted: Mon Apr 15, 2013 7:22 pm 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
imperfect recall has better results?

So do you think that implementing an abstraction with imperfect recall and about 10k buckets/round + 1000 betting sequences (10M decision nodes total) would make sense and lead to good results?

is CFR still easy to implement with imperfect recall, or possible at all?


Top
 Profile  
 
PostPosted: Mon Apr 15, 2013 8:43 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
febbriz wrote:
imperfect recall has better results?

So do you think that implementing an abstraction with imperfect recall and about 10k buckets/round + 1000 betting sequences (10M decision nodes total) would make sense and lead to good results?

is CFR still easy to implement with imperfect recall, or possible at all?


yes, imperfect recall is better given a fixed amount of memory.
well, if it fits into your memory, it surely will lead to good results, but I doubt you have the resources ;) just build a game tree and try out how much buckets per round can fit into memory...


Top
 Profile  
 
PostPosted: Tue Apr 16, 2013 7:59 am 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
cool, I'll first try with 100 buckets/round and 1000 bettings sequence i guess that should fit in memory

what do you think about using intuitionistic buckets (tptk,etc.) instead of EHS or EHS2?


Top
 Profile  
 
PostPosted: Tue Apr 16, 2013 8:56 am 
Offline
Site Admin
User avatar

Joined: Sun Feb 24, 2013 9:39 pm
Posts: 642
Dunno if you will find this useful, but since it took me 10 mins to find it I'm going to post it anyway :)
http://www.poker-ai.org/archive/pokerai ... 20&p=36668


Top
 Profile  
 
PostPosted: Fri Apr 19, 2013 3:20 pm 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
febbriz wrote:
what do you think about using intuitionistic buckets (tptk,etc.) instead of EHS or EHS2?


You can always try it and test it against other bots. Personally I dont think its a good idea, because first of all on some boards there will be very little combinations of lets say a pair, so you will be wasting buckets a HS/HS2 rating will automatically take care of relative handstrength on different boards.

I also think, that this kind of thinking comes natural to humans, but has little mathematical justification. In my experience the natural/naive algorithms produce worse results than those based on mathematical principles.


Top
 Profile  
 
PostPosted: Fri Apr 19, 2013 4:38 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
if you can create a good abstraction by intuition it should work as well, but its very tough to do it manually: you are probably thinking sth like Top pait=r, 2 Pairs, etc, but a TP with 72o on 743r is different than A2 on A72r and also J2o on J552r is different than J2o on JcTc9c8c...


Top
 Profile  
 
PostPosted: Tue Apr 23, 2013 11:53 am 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
I should have said that my primary objective is not really to make a bot, but a solver that would give me intuition and ideas to integrate into my own game. These are my first ideas on the abstraction that I would use:

  • Preflop: 169 buckets (or less if that's too much?)
  • Flop: (72*240 = 17280 buckets) (probably too much)
    • Board buckets: (3*8*3 = 72 buckets)
      • (3) monotone, two-tone, rainbow
      • (8) connected, one gap, two gaps, more gaps, paired (high/low) connected, paired (high/low) not connected
      • (3) highcard A, T-K, <= 9
    • Hand Strength buckets: (12*5*4 = 240 buckets)
      • (12) sets and better, top2 pairs (no pair in hand), 2 pairs (no pair in hand), TopPair A kicker, TP T-K kicker, TPWK, SecondPair T+ kicker, SPWK, overpair in our hand (includes two pairs), pair in our hand (no overpair, includes two pairs), pair, nothing
      • (5) FD with 2 colors in hand, FD with one color in hand, BDFD with two colors in hand, BDFD with one color in hand, nothing
      • (4) OESD or DoubleGutter with 2 in hand, OESD with one in hand, Gutshots, nothing
  • Turn, River: ? still need to think about it

Does this look like a useful abstraction to you? Is that too much buckets? Unnecessary buckets?
Do you think that such abstractions are a mess to program? Also, is the abstracted game easy to create, or possible at all?
Also, I'm assuming that when using such abstractions, we cannot take into account blockers, is that right?
How much betting sequences can I analyze if I use that many buckets on a standard laptop with 2GB of ram?

I'm thinking that getting strategies in term of distributions over these buckets would give me a good insight on how to improve my own game, and it would also help me spot my mistakes

Thanks for your help


Top
 Profile  
 
PostPosted: Tue Apr 23, 2013 7:23 pm 
Offline
Junior Member

Joined: Mon Apr 22, 2013 11:46 am
Posts: 34
febbriz wrote:
I should have said that my primary objective is not really to make a bot, but a solver that would give me intuition and ideas to integrate into my own game. These are my first ideas on the abstraction that I would use:

  • Preflop: 169 buckets (or less if that's too much?)
  • Flop: (72*240 = 17280 buckets) (probably too much)
    • Board buckets: (3*8*3 = 72 buckets)
      • (3) monotone, two-tone, rainbow
      • (8) connected, one gap, two gaps, more gaps, paired (high/low) connected, paired (high/low) not connected
      • (3) highcard A, T-K, <= 9
    • Hand Strength buckets: (12*5*4 = 240 buckets)
      • (12) sets and better, top2 pairs (no pair in hand), 2 pairs (no pair in hand), TopPair A kicker, TP T-K kicker, TPWK, SecondPair T+ kicker, SPWK, overpair in our hand (includes two pairs), pair in our hand (no overpair, includes two pairs), pair, nothing
      • (5) FD with 2 colors in hand, FD with one color in hand, BDFD with two colors in hand, BDFD with one color in hand, nothing
      • (4) OESD or DoubleGutter with 2 in hand, OESD with one in hand, Gutshots, nothing
  • Turn, River: ? still need to think about it

Does this look like a useful abstraction to you? Is that too much buckets? Unnecessary buckets?
Do you think that such abstractions are a mess to program? Also, is the abstracted game easy to create, or possible at all?
Also, I'm assuming that when using such abstractions, we cannot take into account blockers, is that right?
How much betting sequences can I analyze if I use that many buckets on a standard laptop with 2GB of ram?

I'm thinking that getting strategies in term of distributions over these buckets would give me a good insight on how to improve my own game, and it would also help me spot my mistakes

Thanks for your help


17000 buckets on the flop is not too bad. the river has far more sequences than the flop, so that is where it will become a problem, especially if you want to recall the past board textures. (and on the turn have 72*(flush hit/blanked, straight hit/blanked, overcard hit/blanked) board buckets etc. by the river both the betting tree and the board buckets will have escalated.

i very much doubt the hand strength buckets you are using would perform better than using a hs^2 or hs^2/hs nested metric, but may be more useful to you for analysis.


Top
 Profile  
 
PostPosted: Tue Apr 23, 2013 10:00 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
If you really want to have that many buckets on the flop, and a similar number on turn/river and analyze anything else than the simplest PoF games, I'd recommend to buy a looooooooooooot more RAM... ;)
Just build a simple game tree with the betting abstraction you want and count the decision nodes on each street. For each bucket you need two doubles to store regret/strategy - that should give you an idea how much buckets you can effort... My guess is: way way less than you think/wish ;)


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 9:28 am 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
if I have 500 betting sequences, 20k buckets/round (no recall), this makes about 10M decisions nodes
for each decision node, i need 2 double per actions; usually i'll have 3 actions, so i need 48 bytes, so a total of 480MB

is this right?


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 9:59 am 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
also, what do you think would be a nice way to represent betting sequences (this is one input of the program, so it could be in any format)

in JSON it looks like that, but it's already a mess while they just posted the blinds!
Code:
{
  "p": 0,
  "decisions": [{
    "action": "r",
    "value": 0.5,
    "target": {
      "p": 1,
      "decisions": [{
        "action": "r",
        "value": 1,
        "target": {
          "decisions": [
            {
              "action": "r",
              "value": 3,
              "target": {
                "p": 0,
                "decisions": []
              }
            },
            {
              "action": "c",
              "target": {
                "decisions": []
              }
            },
            { "action": "f" }
          ]
        }
      }]
    }
  }]
}


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 2:18 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
febbriz wrote:
if I have 500 betting sequences, 20k buckets/round (no recall), this makes about 10M decisions nodes
for each decision node, i need 2 double per actions; usually i'll have 3 actions, so i need 48 bytes, so a total of 480MB

is this right?


no, one action/bucket combo needs 2 doubles = 16 byte. 3 (actions) * 20000 (buckets) * 16 byte = 960000 byte = 0,915MB. Multiply that with the numer of decisions and I'd be surprised if your notebook can handle it... Regarding the tree building: for smaller trees its fine, for bigger ones you might want to generate it programmatically.


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 3:09 pm 
Offline
Junior Member

Joined: Mon Apr 22, 2013 11:46 am
Posts: 34
proud2bBot wrote:
no, one action/bucket combo needs 2 doubles = 16 byte. 3 (actions) * 20000 (buckets) * 16 byte = 960000 byte = 0,915MB. Multiply that with the numer of decisions and I'd be surprised if your notebook can handle it... Regarding the tree building: for smaller trees its fine, for bigger ones you might want to generate it programmatically.


i.e. 500.

you made the same calculation he did, all though you used some weird definition of mega :ugeek:


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 3:32 pm 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
somehomelessguy wrote:
proud2bBot wrote:
no, one action/bucket combo needs 2 doubles = 16 byte. 3 (actions) * 20000 (buckets) * 16 byte = 960000 byte = 0,915MB. Multiply that with the numer of decisions and I'd be surprised if your notebook can handle it... Regarding the tree building: for smaller trees its fine, for bigger ones you might want to generate it programmatically.


i.e. 500.

you made the same calculation he did, all though you used some weird definition of mega :ugeek:


A megabyte is not a million byte ;)


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 3:35 pm 
Offline
Junior Member

Joined: Sat Apr 06, 2013 1:21 pm
Posts: 18
ye he used 1Mb = 1024*1024 bytes i think
but anyway in the end you get about ~500MB so it should be fine right?

about the trees you're right, i'll program them directly within my code


Top
 Profile  
 
PostPosted: Wed Apr 24, 2013 5:09 pm 
Offline
Junior Member

Joined: Mon Apr 22, 2013 11:46 am
Posts: 34
HontoNiBaka wrote:
somehomelessguy wrote:
proud2bBot wrote:
no, one action/bucket combo needs 2 doubles = 16 byte. 3 (actions) * 20000 (buckets) * 16 byte = 960000 byte = 0,915MB. Multiply that with the numer of decisions and I'd be surprised if your notebook can handle it... Regarding the tree building: for smaller trees its fine, for bigger ones you might want to generate it programmatically.


i.e. 500.

you made the same calculation he did, all though you used some weird definition of mega :ugeek:


A megabyte is not a million byte ;)


depends on who you ask. if you ask IEC, IEEE or common sense you get a million. if you ask bill gates you get 1024*1024.

/nerdrage offtopic mode off.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:
Powered by phpBB® Forum Software © phpBB Group