So now I can see whether invite/accept thresholds are in the ballpark and whether it is vantageous in terms of score for responder with an invitational strength 5m332 to go through some kind of Stayman (capable of locating a 3-5 major fit) or just bid in NT (using a Range Ask).
The script assumes that opener is vulnerable, that we can find the 3-5 major fit if we wish and that the opponents keep quiet.
First I did a sanity check on invite/accept thresholds, by setting the invite range 8-9 then varying ntmin from 15-17 and looking at the effect on frequency of tricks in NT and spades. At first sight it looks like accepting with any 16-17 is about right, just a little heavy for 3NT (making 45%) and light for 4S (making 64%).
Then I analysed the frequency of a better score in spades or NT by setting the invite range 8-9 and the opening range 15-17 and accepting with 16-17 (I gave this one a 400 hand run because 100 hand runs are not very consistent).
At first sight it looks like the spades score better than NT 60% of the time and worse only 26%, thus seeking a 3-5 fit is clearly advantageous.
# # NT vs Spades comparison # ntmin= 15 ntmax= 17 op_ntrange= hcp(north)>=ntmin and hcp(north)<=ntmax op_accept= hcp(north)>=16 rs_weak= hcp(south)>=4 and hcp(south)<=7 rs_invite= hcp(south)>=8 and hcp(south)<=9 rs_thingame= hcp(south)>=10 and hcp(south)<=10 rs_safegame= hcp(south)>=11 and hcp(south)<=12 rs_5m3S32= shape(south, any 5332) and hearts(south)<=3 and spades(south)==3 rs_xfer= spades(south)>=5 or hearts(south)>=5 or clubs(south)>=6 or diamonds(south)>=5 op_s5 = spades(north)==5 and shape(north, any 5332) produce 100 ##### unquote ONE condition below at a time condition op_ntrange and op_s5 and rs_invite and rs_5m3S32 #condition op_ntrange and op_s5 and rs_safegame and rs_5m3S32 #condition op_ntrange and op_s5 and rs_safegame and rs_5m3S32 xN_tricks= tricks(north,notrumps) xS_tricks= tricks(north,spades) x2N_score= score(vul,x2N,xN_tricks) x3S_score= score(vul,x3S,xS_tricks) x3N_score= score(vul,x3N,xN_tricks) x4S_score= score(vul,x4S,xS_tricks) xN_score= op_accept ? x3N_score : x2N_score xS_score= op_accept ? x4S_score : x3S_score outcome= xN_score == xS_score ? 0 : (xN_score > xS_score ? 1 : -1) ##### unquote ONE action below at a time #action frequency(xN_tricks,6,13) #action frequency(xS_tricks,6,13) #action frequency(outcome,-1,1)
TRICK FREQUENCY WHEN OPENER IS 15-17 =======================================================
Frequency of tricks in NT
Frequency : Low 2 6 5 7 17 8 30 9 28 10 12 11 5 12 1 13 0 Generated 2084813 hands Produced 100 hands Initial random seed 1604670051 Time needed 39.919 sec
Frequency of tricks in S
Frequency : 6 2 7 1 8 10 9 37 10 32 11 17 12 1 13 0 Generated 1903395 hands Produced 100 hands Initial random seed 1604670209 Time needed 34.395 sec
TRICK FREQUENCY WHEN OPENER IS 16-17 =======================================================
Frequency of tricks in NT
Frequency : Low 2 6 6 7 14 8 33 9 24 10 13 11 6 12 2 13 0 Generated 4551999 hands Produced 100 hands Initial random seed 1604670567 Time needed 58.682 sec
Frequency of tricks in S
Frequency : 6 0 7 0 8 8 9 28 10 41 11 17 12 6 13 0 Generated 3549704 hands Produced 100 hands Initial random seed 1604670293 Time needed 50.480 sec
TRICK FREQUENCY WHEN OPENER IS 17 ==========================================================
Frequency of tricks in NT
Frequency : 6 4 7 10 8 26 9 26 10 16 11 15 12 3 13 0 Generated 8974413 hands Produced 100 hands Initial random seed 1604670716 Time needed 89.142 sec
Frequency of tricks in S
Frequency : 6 0 7 1 8 2 9 26 10 47 11 21 12 3 13 0 Generated 8789330 hands Produced 100 hands Initial random seed 1604670866 Time needed 90.899 sec
BETTER SCORE FREQUENCY WHEN OPENER IS 15-17 =======================================================
Score is better in S / same in both / better in NT
Frequency : -1 239 0 56 1 105 Generated 8427254 hands Produced 400 hands Initial random seed 1604671501 Time needed 230.419 sec