This code only works on Windows.
source lib/gib.tcl gib::directory "c:/Games/GIB"Note that Tcl uses forward-slash characters, / to seperate directory patchs.
You can also just edit gib.tcl to permanently change the default.
Another thing you might want to change is where the gib library places temporary files. Currently, gib.tcl has the directory C:\temp hard-coded for the temporary files. If you don't have such a directory, and don't want to create one, then you'll need to edit gib.tcl .
source lib/gib.tcl main { accept if {[gib::tricks south notrump]>=12} }finds deals where south can make 12 or more tricks in notrump, double-dummy.
This is going to be slow - each call to gib::tricks can take over a second - so you might try to put some additional conditions:
source lib/gib.tcl main { reject if {[hcp north]+[hcp south]<26} accept if {[gib::tricks south notrump]>=12} }That might miss the occasional freakish slam, but it will be considerably faster.
The gib::tricks procedure caches values, so that multiple calls with the same parameters on the same deal result in quick turn-around.
This is useful if we are using the parscore in our query, or if we use the output format, gibpar, discussed later.
Parscore takes as input the declarer and vulnerability:
set result [parscore north NS] set contract [lindex $result 0] set declarer [lindex $result 1] set score [lindex $result 2] set tricks [lindex $result 3] set auction [lindex $result 4]Vulnerability can be one of None, NS, EW, or All.
The result returned is fairly complex - it consists of a list of elements.
This format is used like any other format:
C:\Deal30> deal -i format/gibpar 36 > myfile.pbnAs with any other Deal format, format/gibpar can be used with filters:
C:\Deal30> deal -i format/gibpar -i ex/1.tcl > myfile.pbnOnce you've generated this PBN file, you can load it into GIB via the "Load Saved Deal" command.
Competing against double-dummy par is grueling work - it's essentially playing a team game where everybody at the other table is an infallible psychic - both your "opponents" and your teammates. That means that any swings are due to errors at your table and/or luck. They will always bid that making 15% grand at the other table, for example.
![]() |
Thomas Andrews
(thomaso@best.com)
Copyright 1996-2002. Deal is covered by the
GNU General Public License.
Plane Dealing graphic above created using POV-Ray. |