BBO Discussion Forums: Thomas Andrews DDS weird behaviour - BBO Discussion Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Thomas Andrews DDS weird behaviour Same dds command returns different values when called twice

#1 User is offline   rvg 

  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 2015-March-20

Posted 2017-June-26, 03:57

I am trying to use the "dds" command in Thomas Andrews' dealer program (http://bridge.thomas...nds.html#ddscmd ) in order to compute the number of tricks declarer (north) can make in a Spade contract. The full hand is :



I am trying to figure out how many tricks declarer can make on the lead of the Ace of Heart from West's hand thus :


source format/none

set diagram { 
   {J9832 T J3 AK732}
   {T7 KQ4 T876 9654}
   {AK654 52 AK52 QJ}
   {Q AJ98763 Q94 T8}                                                                                           
}

set tricks [dds -leader west -diagram $diagram -trick AH south spades]                                                                                                                                                                                                                                           
puts "tricks on AH lead are $tricks (expected 12)"
set tricks [dds -leader west -diagram $diagram -trick AH south spades]
puts "tricks on AH lead are $tricks (expected 12)"                                                                                                                      


The strange behavior is that the first invocation of the dds returns the value of 0 whereas the second (identical) call to dds returns 12 (the correct answer). I was wondering if someone knew what I was doing wrong here.

u1347224@penguin:~/git/gdealer/deal319/linux$ ./deal  -i repro.tcl
tricks on AH lead are 0 (expected 12)
tricks on AH lead are 12 (expected 12)

0

#2 User is offline   barmar 

  • PipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Admin
  • Posts: 21,398
  • Joined: 2004-August-21
  • Gender:Male

Posted 2017-June-26, 08:59

I've moved this to the General Bridge Discussion forum, as DDS is not part of BBO.

#3 User is offline   Mbodell 

  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,871
  • Joined: 2007-April-22
  • Location:Santa Clara, CA

Posted 2017-June-26, 21:01

I've experienced something similar in some instances where the first time a program is run things aren't initialized right and get 0. I solve it by re-running the command in the case that 0 is the answer.
0

#4 User is offline   rvg 

  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 2015-March-20

Posted 2017-June-27, 00:51

Yes, I can reproduce this consistently - when dds is called the first time it returns a zero whenever second hand has a singleton
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users