If you have a well-equipped team, it should be clear that opening 20 grates is not the optimal strategy to get through the sewer in Hobopolis the fastest. Rather, you can afford to sacrifice a couple of grates in the hopes that the turns saved will be greater than the number of people who take an additional turn due to missing the grates. But where is the ideal cut-off point? This simple JavaScript application will perform Monte Carlo simulation to tell just what the perfect number of grates is.
Enter the number of runners and the number of glyphs that they have below. You can also tweak some other parameters, including the assumptions on just how the glyph probabilities work. By default, the assumption is n/6 probability of passing the first test, (n-6)/7 probability of passing the second test, and (n-13)/7 probability of passing the third test, but this can be altered below.
For each number of grates, the simulation returns two numbers: the mean (expected) number of turns it will take to get through the sewers, and the standard deviation on the number of turns. So, if you're feeling risk-averse, you might pick something with a slightly higher mean but with less variance, so your risk of being screwed by the RNG is diminished.