zjuwyz Posted August 10, 2019 Report Share Posted August 10, 2019 Hi! I'm learning dealer grammar recently, and find "tricks()" expression very useful, especially when I want to generate some hands that NS surely have a game to play. In the document, it is described astricks(compass, strain)Runs GIB's double-dummy engine (BRIDGE under Linux, BRIDGE.EXE under Windows/NT or /98), which must be present on the path or in the same directory as the Dealer executable (together with, on Windows, SH.EXE and CYGWIN.DLL from Cygnus' free Cygwin package; this latter is not necessary in Paul Baxter's version), to compute the number of tricks that, at double-dummy par, will be taken by the given declarer in the given strain (suit or notrumps). However, I couldn't find the word "strain" anywhere else in the document. I also looked through Examples.zip and found nothing, sadly. I tried "tricks(north, notrump)>=7", "tricks(north, notrumps) >= 7", "tricks(north, spade) >= 7", "tricks(north, spades) >= 7", "tricks(north, 1s) >= 7", "tricks(north, x1s) >= 7" etc. None of these works. Error message returns immediately, not as those almost impossible ones like "hcp(north) == 40" which uses up the trial limitation. Most likely there is a syntax error, or the environment (as described in the document) on the server is incorrect. Can anyone help? Quote Link to comment Share on other sites More sharing options...
Gerardo Posted August 11, 2019 Report Share Posted August 11, 2019 strain is a suit name or notrump(s) But this function is currently not supported by us in our current setup. Quote Link to comment Share on other sites More sharing options...
zjuwyz Posted August 12, 2019 Author Report Share Posted August 12, 2019 strain is a suit name or notrump(s) But this function is currently not supported by us in our current setup. I see, thanks. Hope this feature to be supported in the future. Quote Link to comment Share on other sites More sharing options...
barmar Posted August 12, 2019 Report Share Posted August 12, 2019 I see, thanks. Hope this feature to be supported in the future.This is the first time anyone has even mentioned it, as far as I know. Quote Link to comment Share on other sites More sharing options...
nige1 Posted August 13, 2019 Report Share Posted August 13, 2019 The best forum for this kind of topic isFull disclosure and Dealer This version of Dealer no longer seems to workDealer + GIB -- version that supports tricks function Using that version, you could run a script like... /** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** tricks.ds. 19 Oct 2017. NG Trick expectation at double-dummy. Script for Dealer by Hans van Staveren & Henk Uijterwaal http://dealergib1.bridgebase.com/tools/dealer/dealer.php *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** **/ predeal east SQT32, HQ932, D864, CA9 # 1N opener ntHCP = 16 wHCP = hcp (west) w1N = (shape (west, any 4333 + any 4432) and ntHCP - 2 < wHCP and wHCP < ntHCP + 2) or (shape (west, any 5332 + any 5422 + any 6322 - 5422 - 4522 - 6xxx - x6xx) and ntHCP - 2 < wHCP and wHCP < ntHCP + 1) produce 100 condition w1N frequency "NT tricks, West" (tricks (west, notrump), 8, 9), This avoided the need to install your own version of Dealer and Gib. Quote Link to comment Share on other sites More sharing options...
Gerardo Posted August 14, 2019 Report Share Posted August 14, 2019 tricks() works there. Had to add "action" on its own line before frequency. That generates just the frequency though, no hans are shown. Quote Link to comment Share on other sites More sharing options...
nige1 Posted August 14, 2019 Report Share Posted August 14, 2019 tricks() works there. Had to add "action" on its own line before frequency. That generates just the frequency though, no hans are shown. Thank you Gerardo, It worked before but I didn't include the "action" verb in my example above, which should be ... *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** tricks.ds. 14 Aug 2019. NG Trick expectation at double-dummy. Script for Dealer by Hans van Staveren & Henk Uijterwaal [url="http://dealergib1.bridgebase.com/tools/dealer/dealer.php"]http://dealergib1.br...aler/dealer.php[/url] *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** **/ predeal east SQT32, HQ932, D864, CA9 # 1N opener ntHCP = 16 wHCP = hcp (west) w1N = (shape (west, any 4333 + any 4432) and ntHCP - 2 < wHCP and wHCP < ntHCP + 2) or (shape (west, any 5332 + any 5422 + any 6322 - 5422 - 4522 - 6xxx - x6xx) and ntHCP - 2 < wHCP and wHCP < ntHCP + 1) produce 100 condition w1N action frequency "NT tricks, West" (tricks (west, notrump), 8, 9), The output of this script is Frequency NT tricks, West: Low 38 8 38 9 20 High 4 Generated 1296 hands Produced 100 hands Initial random seed 1565783392 Time needed 4.395 sec You can also use "printall" or whatever to display the relevant hands. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.