Poker-AI.org

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

All times are UTC




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Nov 06, 2013 9:20 am 
Offline
Junior Member

Joined: Sat Nov 02, 2013 2:21 pm
Posts: 26
Hi,
can you tell me if this is right for earth movers distance?
Code:
   protected double distance(double[] v1, double[] v2)
   {
      double emd = 0, totalDist = 0;
      for (int i = 0; i < v1.length; i++)
      {   
         emd = (v1[i] + emd) - v2[i];
         totalDist += Math.abs(emd);
      }
      return totalDist;
   }


Top
 Profile  
 
PostPosted: Sun Nov 24, 2013 5:25 pm 
Offline
Junior Member

Joined: Sat Nov 02, 2013 2:21 pm
Posts: 26
Seems to work. :)

Attachment:
flop-cluster000.png
flop-cluster000.png [ 19.41 KiB | Viewed 26575 times ]
Attachment:
flop-cluster032.png
flop-cluster032.png [ 19.88 KiB | Viewed 26575 times ]
Attachment:
flop-cluster037.png
flop-cluster037.png [ 17.5 KiB | Viewed 26575 times ]


Top
 Profile  
 
PostPosted: Sun Nov 24, 2013 6:00 pm 
Offline
Veteran Member

Joined: Thu Feb 28, 2013 2:39 am
Posts: 437
Can you elaborate on those graphs?


Top
 Profile  
 
PostPosted: Sun Nov 24, 2013 6:53 pm 
Offline
Junior Member

Joined: Sat Nov 02, 2013 2:21 pm
Posts: 26
I clustered all flops using KMeans++, ehs2-histograms with 100 bars, and EarthMoversDistance. One graph = one cluster. One line = one flop. The heat-pixels are the histogram-bars. I hope that was understandable.
Did this (for testing purposes) with k=200 and only 10 kMeans iterations.


Top
 Profile  
 
PostPosted: Mon Nov 25, 2013 3:58 pm 
Offline
Senior Member

Joined: Mon Mar 11, 2013 10:24 pm
Posts: 216
Your goal here is to cluster public board buckets, right? Did you use all possible hole cards to create the EHS2 distributions? And if so, did you check the boards within a cluster if they are "meaningful", i.e. represent boards that one would typically group together? I tried this too, but did not get the results I expected.


Top
 Profile  
 
PostPosted: Mon Nov 25, 2013 5:35 pm 
Offline
Junior Member

Joined: Sat Nov 02, 2013 2:21 pm
Posts: 26
Goal here was to cluster complete flops (= 2 hole cards + 3 board cards). The ehs2-distributions are against all possible holecards. I created the graphs to evaluate the results. But they are not as good as they look at first view. Some hands with totally different distributions are clustered together. I believe (and hope) that is because I did not use enough clusters and ran only very few iterations.


Top
 Profile  
 
PostPosted: Sat Aug 23, 2014 7:06 pm 
Offline
New Member

Joined: Sat Aug 23, 2014 6:57 pm
Posts: 4
For everyone that experimenting with k-means with the Earth Mover Distance, are you guys using the traditional average to compute the centroids of each group (that is treat each histogram as a vector and compute the average of all vectors in a group)? I ask because the average is not guaranteed to be the centroid of a group for metrics other than euclidean. Do you guys think that is what these papers did? Maybe the average is good enough...

I was so confused by this I asked a question on stack exchange: http://stats.stackexchange.com/question ... 823#112823. Someone there provided a good example of why averaging does not always give you the best centroid. Any comments on this?


Top
 Profile  
 
PostPosted: Thu Oct 01, 2015 8:31 am 
Offline
Junior Member

Joined: Wed Sep 04, 2013 6:05 pm
Posts: 47
Hi Guyz,

I have decided to code a bit and give a try to this method.

I have clustered preflop hands in 8 clusters and these are the results :
Attachment:
preflop_EMD_Clustered.jpeg
preflop_EMD_Clustered.jpeg [ 53.43 KiB | Viewed 25429 times ]

Not exactly the same as in the paper...

My histograms aren't really the same as well :
Attachment:
4s4h_Histo.jpeg
4s4h_Histo.jpeg [ 50.81 KiB | Viewed 25429 times ]


What are your results for preflop clustering and histograms ? Do they match the paper ?

Regards,

MrNice


Top
 Profile  
 
PostPosted: Wed Jul 10, 2019 7:01 am 
Offline
New Member

Joined: Wed Jul 10, 2019 6:24 am
Posts: 1
If I calculate the EMD of all possible histograms in the first round of the game, I get a 169x169 matrix like the small 4x4 EMD matrix in Figure 2 (page 4) of the paper.
After performing kmeans clustering on the 169x169 matrix (kmeans++, multiple restarts, 8 clusters) I get a slightly different result like in Table 1 (page 5) of the paper.
My histograms and EMD values are the same like in the paper that is why I think I am doing something wrong between EMD calculation and clustering.

I think they reduce the 169x169 EMD matrix to a 169x1 EMD matrix because otherwise the matrices are getting pretty huge on the second and third round of the game, right?
I am happy for any hint and I am also interested in exchanging information with others who are on the same journey ;).


Top
 Profile  
 
PostPosted: Wed Jul 17, 2019 1:52 am 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
ScoobySnacks wrote:
For everyone that experimenting with k-means with the Earth Mover Distance, are you guys using the traditional average to compute the centroids of each group (that is treat each histogram as a vector and compute the average of all vectors in a group)? I ask because the average is not guaranteed to be the centroid of a group for metrics other than euclidean. Do you guys think that is what these papers did? Maybe the average is good enough...

I was so confused by this I asked a question on stack exchange: http://stats.stackexchange.com/question ... 823#112823. Someone there provided a good example of why averaging does not always give you the best centroid. Any comments on this?


I have used the traditional average in the past. I know about the theoretical concerns, but for me it still worked fine. The clusters look reasonable and the resulting bot was pretty good.


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

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