From 539134273aecd29e1189d254116a55d491539034 Mon Sep 17 00:00:00 2001 From: thorvald Date: Sun, 28 Apr 2024 12:42:06 +0200 Subject: [PATCH] Better error messages --- UCBC 2024/MvsM/WBridge5.conf | 2 +- install/dist/table_manager_client.spec | 44 ------------------------- src/Splash.webp | Bin 0 -> 1414 bytes src/bba/BBA.py | 1 + src/bots.py | 6 ++-- src/frontend/api.html | 1 + src/pimc/PIMC.py | 2 +- src/pimc/PIMCDef.py | 2 +- src/table_manager_client.py | 3 +- 9 files changed, 11 insertions(+), 50 deletions(-) delete mode 100644 install/dist/table_manager_client.spec create mode 100644 src/Splash.webp diff --git a/UCBC 2024/MvsM/WBridge5.conf b/UCBC 2024/MvsM/WBridge5.conf index 98efed72..b06bded0 100644 --- a/UCBC 2024/MvsM/WBridge5.conf +++ b/UCBC 2024/MvsM/WBridge5.conf @@ -127,7 +127,7 @@ pimc_max_threads = -1 # If singleton, just play it without evaluating it pimc_autoplaysingleton = True # PIMC trust NN -pimc_trust_NN = 0.01 +pimc_trust_NN = 0.0 [sampling] # Filter to remove hands, where the opening lead was not suggested by the neural network diff --git a/install/dist/table_manager_client.spec b/install/dist/table_manager_client.spec deleted file mode 100644 index 8872f36f..00000000 --- a/install/dist/table_manager_client.spec +++ /dev/null @@ -1,44 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - - -block_cipher = None - - -a = Analysis( - ['..\\src\\table_manager_client.py'], - pathex=['..\\src'], - binaries=[('..\\bin\\dds.dll', '.'), ('..\\bin\\BGADLL.dll', '.'), ('..\\bin\\libbcalcdds.dll', '.')], - datas=[], - hiddenimports=[], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False, -) -pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) - -exe = EXE( - pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [], - name='table_manager_client', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=True, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, -) diff --git a/src/Splash.webp b/src/Splash.webp new file mode 100644 index 0000000000000000000000000000000000000000..807ffc401208bd2306fc43cad2be28974c1ae8b1 GIT binary patch literal 1414 zcmZXRdo&XY9LKllj(L?_)Rq`cxX2?tI3s4>kA!)J<8kG%%`-;wy1L{wk0iF_U7qtO zk7OR5F(%n6L`0~uwQ5s@b{}=FI`{Y2_nhDN`}>{W@8e{JLS5Ml0HDoH9bFwyDMtLQ z-&+7kKy|l0hkyu@eU07Gsw!AT^spoOKt?cjA*vk0b6}CKj#?@cD`jOD2uqDRy}{`u z19s>U2#DJMfqZ#a0Po(G^Ydo(s96xHHkS;fvQuCCem<=*n$i@cwpiyNnkB6SaGYCd z=~(;T+?YZbNM#06jR``OMMRNwswJ=YrLiv9!u~rj^UqulB;3#m%Dx;5Bud~}6|gO|JPrH(FNfMd;j2^C zxRAxUTL&FvLDVl5&~~>?1wq;|Uhy|qd?Ovvg*T+iA>P=KwQBEpmis-`$I0s!en`V* z>cfaXKKTJyKY>2UqeU;TH!!mx#rXcqG{8>s*qO**7p#p|bUj=Cfg!LoSZ@?1;A^Q!k;@rp2f-weCn`7dyIpxRxv{8mTXQPI~j5&7c)9Z%wO2D1R!|V#{ zi85SZz;huiCa^N_mF1I{J|7t9#AKenLhUg%^mDa0znBYYbPujkz!RwQ|Wy%3(d#UvARU10rK5Lkk z3{BaHi-@eOyjxV#mV6Xra6n}xwG<}qrPG_#l(ePOq3X%5k!fnCb(NNwgSe*6W+vTO zeZ*oo{I!CA%mn`JzH|S$Y8wBb1WXB(()p1E4O-P zm7rL_%is>+7|NPYdy2w>;si_tekC{bex5g^ePykBzZG>1(u0GNta`IwZ-fyf2QBm3mQ+9G9)`k-6)DR8Vp0KWib>timMF zBkS1(#ksw$@LD_3lP+i7qu-S^SDQU8Tp7=d5s7NQWV|g>zohANZ)8~wm4j|;c;>E= zzAq5y8y$PKJ%bXGTJrXi`&FP)(;%K*4!-z$2pVH&NVc#P!6NfqJ5PNgW0VB*3duV+ zZcKW`Ej(2J1w*DCU;-Rw+SRinr|&bhVRHoL`ry#^F^&Gs6UYi31PmHB>lcq^A@?Y$ z?+q^SSnK4=l^U+pQ95h+I2-d-po#NQVVqvL#yoh(MZy+b3yOU&m~);niyXGT_D&Y* zuUjc4WqG}-n<<<=51;a|aR22X0mvE= 0: if self.models.matchpoint: - candidate_cards = sorted(enumerate(candidate_cards), key=lambda x: (x[1].expected_score_dd, round(x[1].insta_score, 2), -x[0]), reverse=True) + candidate_cards = sorted(enumerate(candidate_cards), key=lambda x: (x[1].expected_score_dd, round(5*x[1].p_make_contract, 1), round(x[1].insta_score, 2), -x[0]), reverse=True) who = "NN-MP" else: candidate_cards = sorted(enumerate(candidate_cards), key=lambda x: (round(5*x[1].p_make_contract, 1), int(x[1].expected_tricks_dd * 10) / 10, round(x[1].expected_score_dd, 1), round(x[1].insta_score, 2), -x[0]), reverse=True) @@ -1316,7 +1318,7 @@ def pick_card_after_dd_eval(self, trick_i, leader_i, current_trick, players_stat who = "DD" else: if self.models.matchpoint: - candidate_cards = sorted(enumerate(candidate_cards), key=lambda x: (round(x[1].expected_score_dd, 1), round(x[1].insta_score, 2), -x[0]), reverse=True) + candidate_cards = sorted(enumerate(candidate_cards), key=lambda x: (round(x[1].expected_score_dd, 1), round(5*x[1].p_make_contract, 1), round(x[1].insta_score, 2), -x[0]), reverse=True) who = "MP-Make" else: candidate_cards = sorted(enumerate(candidate_cards), key=lambda x: (round(5*x[1].p_make_contract, 1), round(x[1].insta_score, 2), int(x[1].expected_tricks_dd * 10) / 10, -x[0]), reverse=True) diff --git a/src/frontend/api.html b/src/frontend/api.html index 088a2141..6fa73dd9 100644 --- a/src/frontend/api.html +++ b/src/frontend/api.html @@ -130,6 +130,7 @@

Enter Board information

function processLinFile() { bidSequence = []; bidSeqPoint = 0; + openinglead = '' document.getElementById('biddingInput').value = '' document.getElementById('playInput').value = '' // Handle firefox lin-link diff --git a/src/pimc/PIMC.py b/src/pimc/PIMC.py index 06dbd609..493edd43 100644 --- a/src/pimc/PIMC.py +++ b/src/pimc/PIMC.py @@ -396,5 +396,5 @@ async def nextplay(self, player_i, shown_out_suits): self.pimc.EndEvaluate() if self.verbose: print(candidate_cards) - print("Returning from PIMC") + print(f"Returning {len(candidate_cards)} from PIMC nextplay") return candidate_cards diff --git a/src/pimc/PIMCDef.py b/src/pimc/PIMCDef.py index d4ffcaa5..800cf2e7 100644 --- a/src/pimc/PIMCDef.py +++ b/src/pimc/PIMCDef.py @@ -406,5 +406,5 @@ async def nextplay(self, player_i, shown_out_suits): self.pimc.EndEvaluate() if self.verbose: print(candidate_cards) - print("Returning from PIMC") + print(f"Returning {len(candidate_cards)} from PIMCDef nextplay") return candidate_cards diff --git a/src/table_manager_client.py b/src/table_manager_client.py index a01be9c4..26050682 100644 --- a/src/table_manager_client.py +++ b/src/table_manager_client.py @@ -562,7 +562,8 @@ async def receive_card_play_for(self, player_i, trick_i): card_resp = await self.receive_line() card_resp_parts = card_resp.strip().split() - print("card_resp_parts", card_resp_parts) + if self.verbose: + print("card_resp_parts", card_resp_parts) assert card_resp_parts[0] == SEATS[player_i], f"{card_resp_parts[0]} != {SEATS[player_i]}" cr = CardResp(