Jump to content

Assigning honours to suits


Recommended Posts

I am comfortable with preassigning the entire hand of N, or setting an hcp range for the entire hand of N, but is there some way of preassigning just the hearts suit of N, or setting an hcp range for just the hearts suit? Or evaluating if N has say ♥K? This would make simulations more precise (for example ensuring that a weak two opening by N has at least one high honour in the suit).
Link to comment
Share on other sites

I am comfortable with preassigning the entire hand of N, or setting an hcp range for the entire hand of N, but is there some way of preassigning just the hearts suit of N, or setting an hcp range for just the hearts suit? Or even assigning specific honours? This would make simulations more precise (for example ensuring that a weak two opening by has at least one high honour in the suit).
You can try

condition hcp (north) > 4 and 10 > hcp (north) and hearts (north) == 6 and 
top3 (north, hearts) > 0  

  • Upvote 1
Link to comment
Share on other sites

from the Manual:

A player can be pre-dealt any number of cards, e.g. for a play problem it is possible to give dummy and declarer their specific hands and the opening-leader the card he just led. The program then generates hands by dividing the remaining 25 cards over the two other players.

 

An alternate form of predeal specification is (suit)(player)==1 (for example: "spades(north)==1" and variants thereof for different suits, compass positions, numbers); this will ensure that (player) gets exactly the number of spades specified, (in this case, one), but that spade can be any card (except for the ones predealt to other players). predeal (player),(card) will just force the program to give these cards to this player, without any restrictions for the remaining cards. For example, predeal north,S2 will give north the 2 of spades. However, all other spade cards can still be dealt to north, so north will not necessarily have a singleton spade 2.

 

for your range in suit question:

 

condition hcp(hearts, north) > 3

 

or for straight cards in suit:

 

condition hascard(north, HA) or hascard(north, HK) or hascard (north, HQ)

 

Note the requirements for condition:

Note that if more than one condition is specified, this is not diagnosed as an error, but the last condition will override the other(s); to have several conditions apply at once, you have to join them into a single expression, i.e. a single condition statement, joining them with "&&" or equivalently "and".

 

Deals not meeting the condition are considered to be "generated" but not "produced", and no action is undertaken for them.

 

It is very possible to set up a condition such that you have to generate millions of hands to get 10 results. Try to limit in non-condition ways first.

  • Upvote 1
Link to comment
Share on other sites

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...