DannyB2
Joined 10 years ago
Joined 10 years ago
Better advice is to not do something unexpected -- even if that unexpected result is clearly documented, but someone did not read it.
Then I got interested in devising puzzles with multiple solutions. Not too difficult. But making a few puzzles with two solutions was fun.
Experiment_203(
" 1 . . | 2 . 8 | . . 9 "+
" . 8 . | . . . | . 3 . "+
" . . 7 | . 1 . | 2 . . "+
//------+-------+--------
" 4 . . | 1 2 3 | . . 6 "+
" . . 2 | 4 5 6 | 9 . . "+
" 6 . . | 7 8 9 | . . 4 "+
//------+-------+--------
" . . 6 | . 4 . | 8 . . "+
" . 2 . | . . . | . 7 . "+
" 9 . . | 8 . 2 | . . 1 "
),
// Solution #1. Found in 0 days 00:00:00.004.// 245 boards examined so far.
1 6 5 | 2 3 8 | 7 4 9
2 8 4 | 6 9 7 | 1 3 5
3 9 7 | 5 1 4 | 2 6 8
------+-------+------
4 7 9 | 1 2 3 | 5 8 6
8 3 2 | 4 5 6 | 9 1 7
6 5 1 | 7 8 9 | 3 2 4
------+-------+------
7 1 6 | 3 4 5 | 8 9 2
5 2 8 | 9 6 1 | 4 7 3
9 4 3 | 8 7 2 | 6 5 1
// Solution #2. Found in 0 days 00:00:00.001.// 287 boards examined so far.
1 6 5 | 2 3 8 | 7 4 9
2 8 4 | 9 6 7 | 1 3 5 // <-- 9 6 7 instead of 6 9 7
3 9 7 | 5 1 4 | 2 6 8
------+-------+------
4 7 9 | 1 2 3 | 5 8 6
8 3 2 | 4 5 6 | 9 1 7
6 5 1 | 7 8 9 | 3 2 4
------+-------+------
7 1 6 | 3 4 5 | 8 9 2
5 2 8 | 6 9 1 | 4 7 3 // <-- 6 9 1 instead of 9 6 1
9 4 3 | 8 7 2 | 6 5 1
2 total solutions found.
304 total boards examined.
Total time 0 days 00:00:00.041.
Then I got to looking at difficult puzzles on the web. Apparently AI escargot is the world's most difficult. (And the site http://www.aisudoku.com/index_en.html says I can't publish the board). So I'll only publish the stats of applying my solver to it. Solution #1. Found in 0 days 00:00:00.029.
3,906 boards examined so far.
1 total solutions found.
7,832 total boards examined.
Total time 0 days 00:00:00.085.Now for each character c in the input string, simply do an array index and see if it is true (a vowel) or not. This avoids either five conditionals, or a loop over the string 'aeiou'. The vowel test is constant time regardless of the character value.
Please add: Since
How about adding: Bohr
Riker: Shields up!
Knight Night Nite
Knot Naught Not
Lager, Lauger (a last name), Logger
Macs Mac's Macks Maks Max
Tends Tens Tins
Threw Through Thru
Ware Wear (clothing), Wear (diminished by use) We're Where
Your You're Yore
Cents Scents Sense Since
Wot about: cawl ?