I got the "combinations instead of cross products" optimization into my submarine hunt program. http://www.tiac.net/~sw/math-fun This "optimization" isn't always, because it tries moves in a different order. Here's a comparison of the previous and current methods, showing the number of search moves each took to prove or disprove that problem n could be solved in a certain number of time steps: prove disprove n nsteps old new old new __ ______ _____ _____ _____ _____ 2 3 4 2 2 2 2 3 5 8 8 4 7 9 * 4 7 13 37 * 6 137 91 5 9 19 15 8 2174 1343 6 11 7077 346 10 7072 2748 9 24744 14254 7 13 34 1105 12 6.2e6 1.1e6 8 15 43 64158 * 14 1.3e9 1.0e8 9 17 53 4.1e5 * 16 ? 5.8e9 10 19 4.6e8 1.6e6 18 4.4e8 8.2e7 17 4.0e8 3.4e9 * 16 1.1e11 1.1e10 11 21 76 >1.6e8 * One thing I hadn't anticipated was that because it picks the moves out of time order, if it succeeds in fewer shots than anticipated, the unused shot(s) may be in the middle of the time sequence: n=2, 2 shots, 3 time steps: 0 X 1 n=4, 6 shots, 7 time steps: 0 0 0 X 1 2 3 n=8, 14 shots, 15 time steps: 0 0 0 0 3 1 1 X 1 1 2 4 6 5 7 --Steve