I haven't done the math yet but I am testing a modulus 3 coverage of board. It seems to find the Destroyer faster with less shots.

With modulus 2 coverage, you are guaranteed to find all ships including Destroyer in 50 shots or less. With modulus 3 coverage you will find all ships in 34 shots guaranteed, except Destroyer, which could fall between the cracks so to speak and take up to 98 shots to find (edit: even 99!).

So what are odds of going big with mod 3 coverage and winning or playing it safe with mod 2 coverage?

Maybe this code will give you a feel for determining if the risk of M = 3 coverage and possibly needing more than 50 shots is worth it or not.

`_TITLE "m3 34 m2.bas 2018-05-15, press any key to quit..."`

'in 34 shots (m = 3) I should hit all the ships length 3 and up

'and if I haven't hit destroyer yet shift to every other square m = 2

RANDOMIZE TIMER

CONST gsq = 40

CONST gox = 200

CONST goy = 100

CONST nsq = 10

CONST n1 = nsq - 1

CONST xmax = 800

CONST ymax = 600

DIM SHARED rndList(n1)

DIM hits(n1, n1)

main& = _NEWIMAGE(xmax, ymax, 32)

SCREEN main&

_SCREENMOVE 360, 60

WHILE LEN(k$) = 0

CLS

ERASE hits

drawGrid gox, goy, gsq, nsq

shotCnt = 0

Sunk = 0

dx = rand(0, n1 - 1)

dx2 = dx + 1

dy = rand(0, n1)

FOR i = 1 TO 10

IF i MOD 2 THEN COLOR RGB("900") ELSE COLOR RGB("999")

LINE (gox + dx * gsq + 2 * i, goy + dy * gsq + 2 * i)-STEP(2 * gsq - 4 * i, gsq - 4 * i), , BF

NEXT

WHILE LEN(k$) = 0

k$ = INKEY$

y = y + 1

IF y = nsq THEN y = 0

IF shotCnt < 34 THEN

COLOR RGB("009")

modulus = 3

offset = y MOD modulus

maxM = INT((n1 - offset) / modulus)

ELSE

IF Sunk = 0 THEN modulus = 2: COLOR RGB("990") ELSE modulus = 3: COLOR RGB("099")

maxM = n1

END IF

xindex = 0

getRndChoice y, modulus

testx = rndList(xindex)

shoot = 1

WHILE hits(testx, y) <> 0

xindex = xindex + 1

IF xindex > maxM THEN shoot = 0: EXIT WHILE

testx = rndList(xindex)

WEND

IF shoot <> 0 THEN

col = testx

LINE (gox + col * gsq + 3 * (7 - modulus), goy + y * gsq + 3 * (7 - modulus))-STEP(gsq - 6 * (7 - modulus), gsq - 6 * (7 - modulus)), , BF

hits(col, y) = 1

shotCnt = shotCnt + 1

IF Sunk = 0 THEN

IF (col = dx OR col = dx2) AND y = dy THEN Sunk = 1: LOCATE 1, 1: PRINT "Destroyer Hit! in"; STR$(shotCnt); " shots."

END IF

IF Sunk THEN _DELAY .01 ELSE _DELAY .25

END IF

IF shotCnt >= 100 THEN _DELAY 5: EXIT WHILE

WEND

WEND

SUB getRndChoice (rc, modulus)

offset = rc MOD modulus

maxM = INT((n1 - offset) / modulus)

FOR i = 0 TO n1

rndList(i) = i

NEXT

FOR i = 0 TO maxM

n = offset + i * modulus

SWAP rndList(i), rndList(n)

NEXT

FOR i = maxM TO 1 STEP -1

r = INT((i + 1) * RND)

SWAP rndList(i), rndList(r)

NEXT

FOR i = maxM + 1 TO n1

r = INT((n1 - maxM) * RND) + maxM + 1

SWAP rndList(i), rndList(r)

NEXT

END SUB

SUB drawGrid (x, y, sq, n)

d = sq * n

FOR i = 0 TO n

LINE (x + sq * i, y)-(x + sq * i, y + d)

LINE (x, y + sq * i)-(x + d, y + sq * i)

NEXT

END SUB

FUNCTION RGB& (s3$) ' New Color System 1000 colors with 3 digits!!!!!!!!!!!!!!!!

l = LEN(s3$)

IF l THEN r = 28 * VAL(MID$(s3$, 1, 1)) + 3

IF l >= 2 THEN g = 28 * VAL(MID$(s3$, 2, 1)) + 3

IF l >= 3 THEN b = 28 * VAL(MID$(s3$, 3, 1)) + 3

RGB& = _RGB32(r, g, b)

END FUNCTION

FUNCTION rand% (lo%, hi%)

rand% = INT(RND * (hi% - lo% + 1)) + lo%

END FUNCTION

So how is your math or probability intuition? Would you go mod 3 or mod 2?