diff --git a/data/clusters/flop/1669086738_samples=10000_bins=5.npy b/data/clusters/flop/1669086738_samples=10000_bins=5.npy deleted file mode 100644 index 3d3cd2e..0000000 Binary files a/data/clusters/flop/1669086738_samples=10000_bins=5.npy and /dev/null differ diff --git a/data/clusters/flop/1669110120_samples=100000_bins=5.npy b/data/clusters/flop/1669110120_samples=100000_bins=5.npy deleted file mode 100644 index b233b96..0000000 Binary files a/data/clusters/flop/1669110120_samples=100000_bins=5.npy and /dev/null differ diff --git a/data/clusters/flop/1719047678_samples=10000_bins=10.npy b/data/clusters/flop/1719047678_samples=10000_bins=10.npy deleted file mode 100644 index 3773c60..0000000 Binary files a/data/clusters/flop/1719047678_samples=10000_bins=10.npy and /dev/null differ diff --git a/data/clusters/turn/1669110257_samples=100000_bins=5.npy b/data/clusters/turn/1669110257_samples=100000_bins=5.npy deleted file mode 100644 index 6bfab19..0000000 Binary files a/data/clusters/turn/1669110257_samples=100000_bins=5.npy and /dev/null differ diff --git a/data/clusters/turn/1719048213_samples=10000_bins=10.npy b/data/clusters/turn/1719048213_samples=10000_bins=10.npy deleted file mode 100644 index cc1efef..0000000 Binary files a/data/clusters/turn/1719048213_samples=10000_bins=10.npy and /dev/null differ diff --git a/data/raw/flop/1669086738_samples=10000_bins=5 b/data/raw/flop/1669086738_samples=10000_bins=5 deleted file mode 100644 index af5e926..0000000 Binary files a/data/raw/flop/1669086738_samples=10000_bins=5 and /dev/null differ diff --git a/data/raw/flop/1669086738_samples=10000_bins=5.npy b/data/raw/flop/1669086738_samples=10000_bins=5.npy deleted file mode 100644 index 7d7be7f..0000000 Binary files a/data/raw/flop/1669086738_samples=10000_bins=5.npy and /dev/null differ diff --git a/data/raw/flop/1669110120_samples=100000_bins=5 b/data/raw/flop/1669110120_samples=100000_bins=5 deleted file mode 100644 index a3802f1..0000000 Binary files a/data/raw/flop/1669110120_samples=100000_bins=5 and /dev/null differ diff --git a/data/raw/flop/1669110120_samples=100000_bins=5.npy b/data/raw/flop/1669110120_samples=100000_bins=5.npy deleted file mode 100644 index 458e0eb..0000000 Binary files a/data/raw/flop/1669110120_samples=100000_bins=5.npy and /dev/null differ diff --git a/data/raw/flop/1719047678_samples=10000_bins=10 b/data/raw/flop/1719047678_samples=10000_bins=10 deleted file mode 100644 index 3163362..0000000 Binary files a/data/raw/flop/1719047678_samples=10000_bins=10 and /dev/null differ diff --git a/data/raw/flop/1719047678_samples=10000_bins=10.npy b/data/raw/flop/1719047678_samples=10000_bins=10.npy deleted file mode 100644 index 913f36b..0000000 Binary files a/data/raw/flop/1719047678_samples=10000_bins=10.npy and /dev/null differ diff --git a/data/raw/turn/1669084044_samples=10000_bins=5 b/data/raw/turn/1669084044_samples=10000_bins=5 deleted file mode 100644 index 9b86f5b..0000000 Binary files a/data/raw/turn/1669084044_samples=10000_bins=5 and /dev/null differ diff --git a/data/raw/turn/1669084044_samples=10000_bins=5.npy b/data/raw/turn/1669084044_samples=10000_bins=5.npy deleted file mode 100644 index 5de1895..0000000 Binary files a/data/raw/turn/1669084044_samples=10000_bins=5.npy and /dev/null differ diff --git a/data/raw/turn/1669110257_samples=100000_bins=5 b/data/raw/turn/1669110257_samples=100000_bins=5 deleted file mode 100644 index bfca99c..0000000 Binary files a/data/raw/turn/1669110257_samples=100000_bins=5 and /dev/null differ diff --git a/data/raw/turn/1669110257_samples=100000_bins=5.npy b/data/raw/turn/1669110257_samples=100000_bins=5.npy deleted file mode 100644 index a0e0e76..0000000 Binary files a/data/raw/turn/1669110257_samples=100000_bins=5.npy and /dev/null differ diff --git a/data/raw/turn/1719048213_samples=10000_bins=10 b/data/raw/turn/1719048213_samples=10000_bins=10 deleted file mode 100644 index 7704b63..0000000 Binary files a/data/raw/turn/1719048213_samples=10000_bins=10 and /dev/null differ diff --git a/data/raw/turn/1719048213_samples=10000_bins=10.npy b/data/raw/turn/1719048213_samples=10000_bins=10.npy deleted file mode 100644 index 8742dc7..0000000 Binary files a/data/raw/turn/1719048213_samples=10000_bins=10.npy and /dev/null differ diff --git a/data/slumbot/steveng_call.joblib b/data/slumbot/steveng_call.joblib deleted file mode 100644 index a13981b..0000000 Binary files a/data/slumbot/steveng_call.joblib and /dev/null differ diff --git a/data/slumbot/steveng_equity.joblib b/data/slumbot/steveng_equity.joblib deleted file mode 100644 index 6579279..0000000 Binary files a/data/slumbot/steveng_equity.joblib and /dev/null differ diff --git a/kmeans_data/cards/flop/1719903872_samples=10000_bins=10.npy b/kmeans_data/cards/flop/1719903872_samples=10000_bins=10.npy new file mode 100644 index 0000000..98c16f3 Binary files /dev/null and b/kmeans_data/cards/flop/1719903872_samples=10000_bins=10.npy differ diff --git a/kmeans_data/cards/turn/1719904417_samples=10000_bins=10.npy b/kmeans_data/cards/turn/1719904417_samples=10000_bins=10.npy new file mode 100644 index 0000000..aa4475e Binary files /dev/null and b/kmeans_data/cards/turn/1719904417_samples=10000_bins=10.npy differ diff --git a/kmeans_data/centroids/flop/centroids_1719903872_samples=10000_bins=10.npy b/kmeans_data/centroids/flop/centroids_1719903872_samples=10000_bins=10.npy new file mode 100644 index 0000000..2760b01 Binary files /dev/null and b/kmeans_data/centroids/flop/centroids_1719903872_samples=10000_bins=10.npy differ diff --git a/kmeans_data/centroids/turn/centroids_1719904417_samples=10000_bins=10.npy b/kmeans_data/centroids/turn/centroids_1719904417_samples=10000_bins=10.npy new file mode 100644 index 0000000..262e820 Binary files /dev/null and b/kmeans_data/centroids/turn/centroids_1719904417_samples=10000_bins=10.npy differ diff --git a/kmeans_data/distributions/flop/1719903872_samples=10000_bins=10.npy b/kmeans_data/distributions/flop/1719903872_samples=10000_bins=10.npy new file mode 100644 index 0000000..151e12f Binary files /dev/null and b/kmeans_data/distributions/flop/1719903872_samples=10000_bins=10.npy differ diff --git a/kmeans_data/distributions/turn/1719904417_samples=10000_bins=10.npy b/kmeans_data/distributions/turn/1719904417_samples=10000_bins=10.npy new file mode 100644 index 0000000..7c166e6 Binary files /dev/null and b/kmeans_data/distributions/turn/1719904417_samples=10000_bins=10.npy differ diff --git a/kmeans_data/kmeans/flop/kmeans_1719903872_samples=10000_bins=10.joblib b/kmeans_data/kmeans/flop/kmeans_1719903872_samples=10000_bins=10.joblib new file mode 100644 index 0000000..bdadaf9 Binary files /dev/null and b/kmeans_data/kmeans/flop/kmeans_1719903872_samples=10000_bins=10.joblib differ diff --git a/kmeans_data/kmeans/turn/kmeans_1719904417_samples=10000_bins=10.joblib b/kmeans_data/kmeans/turn/kmeans_1719904417_samples=10000_bins=10.joblib new file mode 100644 index 0000000..a63ab39 Binary files /dev/null and b/kmeans_data/kmeans/turn/kmeans_1719904417_samples=10000_bins=10.joblib differ diff --git a/notebooks/abstraction_visualization.ipynb b/notebooks/abstraction_visualization.ipynb index 81b5f57..4890842 100644 --- a/notebooks/abstraction_visualization.ipynb +++ b/notebooks/abstraction_visualization.ipynb @@ -14,14 +14,16 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 18, "metadata": {}, "outputs": [], "source": [ "import joblib\n", "from sklearn.cluster import KMeans\n", "import numpy as np\n", - "import matplotlib.pyplot as plt" + "import matplotlib.pyplot as plt\n", + "import sys\n", + "sys.path.append('../src')" ] }, { @@ -33,46 +35,45 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ - "flop_kmeans_centroids = joblib.load('../data/clusters/flop/1669110120_samples=100000_bins=5.npy')\n", - "flop_raw_data = np.load('../data/raw/flop/1669110120_samples=100000_bins=5.npy')\n", - "flop_cards = joblib.load('../data/raw/flop/1669110120_samples=100000_bins=5')" + "flop_kmeans = joblib.load('../kmeans_data/kmeans/flop/kmeans_1719903872_samples=10000_bins=10.joblib')\n", + "flop_raw_data = np.load('../kmeans_data/distributions/flop/1719903872_samples=10000_bins=10.npy')\n", + "flop_cards = np.load('../kmeans_data/cards/flop/1719903872_samples=10000_bins=10.npy')" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "# Convert histograms to EHS\n", - "ehs_flop_raw_data = (flop_raw_data * np.array([0.1, 0.3, 0.5, 0.7, 0.9])).sum(axis=1)" + "ehs_flop_raw_data = (flop_raw_data * np.array([0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95])).sum(axis=1)" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "array([51, 62, 19, ..., 63, 24, 29], dtype=int32)" + "array([ 5, 25, 38, ..., 39, 25, 9], dtype=int32)" ] }, - "execution_count": 4, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "assert(flop_kmeans_centroids.shape[0] == 100) # This should be 100\n", - "kmeans = KMeans(flop_kmeans_centroids.shape[0])\n", - "kmeans.cluster_centers_ = flop_kmeans_centroids\n", - "kmeans._n_threads = -1\n", + "kmeans = flop_kmeans\n", + "assert(len(kmeans.cluster_centers_) == 50)\n", + "flop_kmeans_centroids = kmeans.cluster_centers_\n", "\n", "flop_raw_data_classes = kmeans.predict(flop_raw_data)\n", "flop_raw_data_classes" @@ -80,34 +81,258 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Loading KMeans Flop Classifier kmeans_1719903872_samples=10000_bins=10.joblib\n", + "Loading KMeans Turn Classifier kmeans_1719904417_samples=10000_bins=10.joblib\n" + ] + } + ], + "source": [ + "from abstraction import calculate_equity_distribution" + ] + }, + { + "cell_type": "code", + "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "(100, 5)" + "" ] }, - "execution_count": 5, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiwAAAGdCAYAAAAxCSikAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAAC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yUV9TXl4et16SXnrppTHXS9LRo0d14sQJ5eXlJTIeAABIUQn/lJDX69WuXbu0Z88evf3221q3bp2Ghobk8XgkSdXV1aqtrY2t37Bhg9rb2/Xkk0/q8OHDevzxx/Xaa69p/fr1kqRTp05p06ZNOnDggD788EP5/X7dfvvtmjdvntxu9wSdJgAAmMwSvoelsrJS/f39qqurUyAQUElJidrb22M31vb29io9/WwH3XDDDdq7d68ee+wxPfLII5o/f75efPFFXXfddZIki8WiN954Q3v27NHJkyeVn5+v5cuXq6GhQVardYJOE0CqcdT8JtkjnOPDxpXJHgFIWeO66Xb9+vWxKySf19HRcc6xu+66S3fdddeo67OysvTb3/52PGMAAIApgt8lBAAAjEewAAAA4xEsAADAeAQLAAAwHsECAACMR7AAAADjESwAAMB4BAsAADAewQIAAIxHsAAAAOMRLAAAwHgECwAAMB7BAgAAjEewAAAA4xEsAADAeAQLAAAwHsECAACMR7AAAADjESwAAMB4BAsAADAewQIAAIxHsAAAAOMRLAAAwHgECwAAMB7BAgAAjEewAAAA4xEsAADAeAQLAAAwHsECAACMR7AAAADjESwAAMB4BAsAADAewQIAAIxHsAAAAOMRLAAAwHgECwAAMB7BAgAAjEewAAAA4xEsAADAeOMKlpaWFjkcDmVmZsrpdKqrq+u863/xi1+ouLhYmZmZWrhwofbv3x/3fDQaVV1dnfLy8pSVlSWXy6V33313PKMBAIAUlHCwtLW1yev1qr6+Xj09PVq8eLHcbrf6+vpGXf+HP/xBq1ev1ne+8x29/vrrWrVqlVatWqU333wztmbbtm166qmn1NraqoMHD2r69Olyu9365JNPxn9mAAAgZSQcLDt27NDatWvl8Xi0YMECtba2atq0adq9e/eo63/4wx+qoqJCmzZt0jXXXKOGhgYtWbJEzc3Nkj67utLU1KTHHntMt99+uxYtWqTnnntOx48f14svvvilTg4AAKSGyxJZPDw8rO7ubtXW1saOpaeny+VyqbOzc9TXdHZ2yuv1xh1zu92xGPnggw8UCATkcrliz+fk5MjpdKqzs1NVVVXn7BkOhxUOh2NfD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R4tJW3dulU7d+5Uc3Oz3n77bW3dulXbtm3Tj370o2SPNiXxY82XgNPp1NKlS9Xc3Czps08HLigo0AMPPKCampokT5fa+vv7NXv2bL388su65ZZbkj1Oyjp16pSWLFmip59+Wk888YRKSkrU1NSU7LFSTk1Njf7jP/5D//7v/57sUaaEb37zm7LZbPq7v/u72LE77rhDWVlZeuGFF5I42dTEFZaLbHh4WN3d3XK5XLFj6enpcrlc6uzsTOJkU8Pg4KAkadasWUmeJLXdf//9WrlyZdx/55h4//iP/6iysjLdddddmj17tq6//nrt2rUr2WOlrBtuuEF+v19/+tOfJEn/+Z//qVdeeUUrVqxI8mRT06T8bc2TycDAgEZGRmKfBHyGzWbT4cOHkzTV1BCJRLRx40bdeOONcZ+sjIm1b98+9fT06NVXX032KCnvv//7v7Vz5055vV498sgjevXVV/XXf/3XysjI0Jo1a5I9XsqpqalRKBRScXGxLBaLRkZG9L3vfU933313skebkggWpKz7779fb775pl555ZVkj5Kyjhw5og0bNuill15KqV+lYapIJKKysjJ9//vflyRdf/31evPNN9Xa2kqwXAQ///nP9dOf/lR79+7Vtddeq0OHDmnjxo3Kz8/n/U4CguUiy83NlcViUTAYjDseDAZlt9uTNFXqW79+vX7961/r97//vb761a8me5yU1d3drb6+Pi1ZsiR2bGRkRL///e/V3NyscDgsi8WSxAlTS15enhYsWBB37JprrtHf//3fJ2mi1LZp0ybV1NSoqqpKkrRw4UL9z//8j3w+H8GSBNzDcpFlZGSotLRUfr8/diwSicjv96u8vDyJk6WmaDSq9evX61e/+pX+7d/+TYWFhckeKaXddttt+q//+i8dOnQo9igrK9Pdd9+tQ4cOESsT7MYbbzznx/T/9Kc/6Wtf+1qSJkptp0+fjvtlvpJksVgUiUSSNNHUxhWWS8Dr9WrNmjUqKyvTsmXL1NTUpKGhIXk8nmSPlnLuv/9+7d27V//wD/+gGTNmKBAISJJycnKUlZWV5OlSz4wZM865P2j69Om68soruW/oIvibv/kb3XDDDfr+97+vv/iLv1BXV5eeeeYZPfPMM8keLSV961vf0ve+9z1dddVVuvbaa/X6669rx44d+qu/+qtkjzY1RXFJ/OhHP4peddVV0YyMjOiyZcuiBw4cSPZIKUnSqI+f/OQnyR5tyrj11lujGzZsSPYYKeuf/umfotddd13UarVGi4uLo88880yyR0pZoVAoumHDhuhVV10VzczMjBYVFUUfffTRaDgcTvZoUxKfwwIAAIzHPSwAAMB4BAsAADAewQIAAIxHsAAAAOMRLAAAwHgECwAAMB7BAgAAjEewAAAA4xEsAADAeAQLAAAwHsECAACMR7AAAADj/T+1tenjUBc03gAAAABJRU5ErkJggg==", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ - "flop_kmeans_centroids.shape" + "cards = '7s 9s 8h 3c Ts'\n", + "# cards = '6s 3s 8h 5s Js'\n", + "plt.bar([i for i in range(10)], calculate_equity_distribution(cards.split(' ')[:2], cards.split(' ')[2:]))" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiMAAAGdCAYAAADAAnMpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAaz0lEQVR4nO3df2xd9X3H4bdtajuUxAQy7JKausC0NIXGECdeQC2r5jWbsm5I3ZZWbIm8Lv+MMJi1akm7JaOMOrQ08kQyUlCzSWWIbFp/bKPLxLzRjtVVaNJs0BaqbQpJYXYSrbNpkJzKvvujqpGXGHLz64tvnkc6Ej7+nns/9yjILx2fe11XqVQqAQAopL70AADAhU2MAABFiREAoCgxAgAUJUYAgKLECABQlBgBAIoSIwBAUReVHuBUTE5O5qWXXsrcuXNTV1dXehwA4BRUKpW8/PLLufLKK1NfP/P1j1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UxMTEx9+uyPtba25rnnnis01YVhcnIyd911V26++eaa+zTfN5LHHnss+/bty9NPP116lJr3X//1X3nwwQfT19eXj370o3n66afzO7/zO2lsbMzatWtLj1dzNmzYkLGxsSxatCgNDQ2ZmJjIvffem9tuu630aBckMcKsdPvtt+fZZ5/NU089VXqUmnXo0KHceeedeeKJJ9Lc3Fx6nJo3OTmZrq6ufOITn0iS3HDDDXn22WezY8cOMXIO/OVf/mX+4i/+Io8++mje+c53Zv/+/bnrrrty5ZVXOt8FiJEzsGDBgjQ0NGRkZGTa/pGRkbS1tRWaqvatX78+f/d3f5evfvWreetb31p6nJq1d+/eHD58ODfeeOPUvomJiXz1q1/Ntm3bMj4+noaGhoIT1pa3vOUtWbx48bR973jHO/LXf/3XhSaqbR/5yEeyYcOGfPCDH0ySXH/99XnhhRfS398vRgpwz8gZaGxszNKlSzM4ODi1b3JyMoODg1mxYkXByWpTpVLJ+vXr84UvfCH/9E//lLe//e2lR6ppP/uzP5tnnnkm+/fvn9q6urpy2223Zf/+/ULkLLv55ptPeKv6d7/73bztbW8rNFFte+WVV6b9UdckaWhoyOTkZKGJLmyujJyhvr6+rF27Nl1dXVm+fHkGBgZy7Nix9Pb2lh6t5tx+++159NFH86UvfSlz587N8PBwkqSlpSVz5swpPF3tmTt37gn347z5zW/O5Zdf7j6dc+B3f/d3c9NNN+UTn/hEfu3Xfi179uzJQw89lIceeqj0aDXp/e9/f+69995cddVVeec735lvfvOb2bp1a37zN3+z9GgXpgpn7IEHHqhcddVVlcbGxsry5csrX//610uPVJOSnHT7sz/7s9KjXTBuueWWyp133ll6jJr1t3/7t5Xrrruu0tTUVFm0aFHloYceKj1SzRobG6vceeedlauuuqrS3Nxcufrqqysf+9jHKuPj46VHuyD5nBEAoCj3jAAARYkRAKAoMQIAFCVGAICixAgAUJQYAQCKEiMAQFFiBAAoSowAAEWJEQCgKDECABQlRgCAov4PxFfZnxGDC9MAAAAASUVORK5CYII=", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "cards = 'Ah 7s Qc 3h 5s'\n", + "plt.bar([i for i in range(10)], calculate_equity_distribution(cards.split(' ')[:2], cards.split(' ')[2:]))" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['7s 9s 8h 3c Ts', '6s 3s 8h 5s Js', '8h 5d 6h Qh 4h',\n", + " '5s 7s 2s Ts 4c', '2s 9s 8s 5s 4d', '3d 8d Qh 5d 9d',\n", + " 'Jd 5d 7c 6h 4d', 'Js 3s Ks Tc 9c', '9s 8s Tc 5s 3s',\n", + " '9h Th 3s 8c 7c', '8s 9c Js 4d Td', 'Td 9c 4c 7c 8s',\n", + " '8s 9h Qs Td 6h', '3c 8c 6c 2c Ah', '8c 6s 7s 5d 5c',\n", + " '6c 9c 4c Td 3c', '8d Ks 6s 4h 5h', '6c Ts 5c 7h 8s',\n", + " 'Jd 6c 4c 3c 5d', '5s 6s Ac Ts 3s', '8s 6s 9h 7h Ks',\n", + " '5s 3s 2c 4s 9s', '8s 7s Td Ah 9h', 'Td 7s 9s 5d 8d',\n", + " '8d 7h 5d 9d Js', '5c 9c Jc 2s 3c', '7c 2c 6d 8c 4c',\n", + " '6d Td Ad 8h 7c', '7c Ts 9s 3d 8c', 'Jc 9h 6c 8s Td',\n", + " '9h Ts 8d 6c Jd', 'Td 6s 7d 4d 3d', '6c Jd 9c 8s Th',\n", + " '8s 3s 7s Qs 5h', '2s 4s Ts As 3h', '5h 4h Ah 2d 7h',\n", + " '8h 2h 4h 9s Qh', '7c 9h 4c Ts 8c', '7s Td 6s 8d Ad',\n", + " 'Th 4d 9c Js 8h', '8s 4s Jh 6s 2s', '8c 9s Jc 7d 6c',\n", + " '9s Jc 5c Tc 7s', '7c 6c 3c 9d 2c', '8c 9s 6c 7s Js',\n", + " '7d 4d 9c 5d 9d', 'Ts 8s 6d Jd 9h', '6h 8c 9d 7h Jh',\n", + " '5s 9d 8s 7s Jc', 'Ts 8c 9d 5c 7c', '8h 7d Ah Tc 9d',\n", + " 'Js 5h 6c 3c 4h', '4c 9d 8c 7h Td', '8c 3c Kc Jh 4c',\n", + " 'Jd Qd 6s 8h Th', '6d Ts 4h 7c 8h', '6d Jh 4s 7c 5c',\n", + " '9d 7d 6s Ac 8d', '9d 7d 8h Ac 6h', 'Jd 5c 3h 6s 4s',\n", + " '4d Ts 3s 5s 6h', '8d 9d 4d 3d 7h', '7d 8h Ts 5h 9h',\n", + " 'Th 4s Jh 8d 9c', '6d 5d 7d 3s Jd', '7c Th 9c 3h 8c',\n", + " 'Jh 9d 8d 5d 7c', '6c 8h Qc 7s 9d', 'Td Jh 9s 6c 8s',\n", + " '9s Ts Qh 8d 2s', '7h 6c 9d 8s Ah', '8h 7s Ts 9c 2d',\n", + " 'Td 3d 9h 2d 6d', '7h 3h Jh Kh 4d', '9s 8c Ts 4d 7c',\n", + " '8c Ts 2h 7s 9h', '9h 3h 5d Jh 7h', 'Jh 7c 5c Td 9c',\n", + " '7s 6d 8h 8s 5d', '2c 4c 6c 3c Kh', '6c Ts 8s 5s 7d',\n", + " '6h 7h 9c 8h 3s', '9s 8s 7s 6c 4h', 'Ts 2s Qs 6s 7h',\n", + " '7h 6h 3d 9h 4h', '2c 9c Kc 3s 8c', '7s 5s 6d Ks As',\n", + " '8d 4d 3d As 9d', '5c Js 3d 4h 2d', 'Ts 2h 8h 9c Jd',\n", + " '2c 5c Tc Jc Jh', '8h 6s 7s 5s 5c', '3c 6c Jc 2c Ks',\n", + " '2h 9h 7h 8h 5s', '8d 2d 3d Qs Jd', '9h 7d 6c 8d 2d',\n", + " 'Th 3h 2h 7c 4h', '8h 9h 5h 4s 2h', '7d 6c 8c 9d Kd',\n", + " '6c 9c 8s Qh 7h', 'Th Jd 7s 9d 4s', 'Jh 4h Td Qd 9c',\n", + " '8d 7c 6h 5s Qc', '7s Ts 9s 4h 8h', '4s Jd 2d 5h 3s',\n", + " '8d 5s Td 7s 6d', '9s 7h 5h Js 8s', '2d 4d As 3d Qd',\n", + " '2h 5h 6c 4h Qh', '9s 7s 5s 2h Qs', '5h Js 6h 4s 3d',\n", + " '2h 9h 7h Kh 8s', '7d 8h 5h 9d Jc', '3c Jd 2d 5s 4s',\n", + " '5h 4h Ts Jh 7h', '6c 7s 8d 9c Ad', '5s 9s Ts 7d 4s',\n", + " '8c Tc 7d Kh Js', '7d 2d Ad 4c 9d', '4d 9d 8d As 2d',\n", + " 'Th Qh 8c 7d 6h'], dtype='