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).
Page 1 of 1
Assigning honours to suits
#2
Posted 2021-May-14, 09:38
pescetom, on 2021-May-14, 08:56, said:
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).
condition hcp (north) > 4 and 10 > hcp (north) and hearts (north) == 6 and top3 (north, hearts) > 0
#3
Posted 2021-May-14, 09:52
from the Manual:
for your range in suit question:
or for straight cards in suit:
Note the requirements for condition:
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.
Quote
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.
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:
Quote
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.
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.
When I go to sea, don't fear for me, Fear For The Storm -- Birdie and the Swansong (tSCoSI)
Page 1 of 1