View previous topic :: View next topic |
Author |
Message |
| Bob Hanson
| Joined: 05 Oct 2005 | Posts: 187 | : | Location: St. Olaf College | Items |
|
Posted: Mon Nov 07, 2005 3:32 am Post subject: What is the best way to present puzzles within this forum |
|
|
I've noticed quite a variety of methods of displaying puzzles --
9 rows:
Code: | 9.6.83..2
1.56.9...
..3..7.69
75439.62.
3...6..95
.69.5...4
59.83.2..
6...759.3
43.91....
|
various variations of the above with -, ?, or 0 instead of "."
various variations of the above with boxes and rows indicated with ----+---- and such
linear:
9.6.83..21.56.9.....3..7.6975439.62.3...6..95.69.5...459.83.2..6...759.343.91....
906083002105609000003007069754390620300060095069050004590830200600075903430910000
Tables with possibilities shown
(you know what I mean)
etc.
I suspect this is just because lots of us have devised our own particular schemes that look good to us.
I'm just wondering what people think. Should we try to standardize this -- not to prescribe -- not to request anything from anybody -- but merely to make it more possible for others to clip the puzzle and try it in one solver or another? I'm just wondering if I PERSONALLY show a puzzle, what's the best format for others to use?
Maybe the question is, is there a standard format that most solvers in use can read? I've had fun making Sudoku Assistant, http://www.stolaf.edu/people/hansonr/sudoku read just about anything thrown at it, but I'm not sure other browsers are as flexible, and I can make it's output anything anyone wants. What do you want? _________________ Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr |
|
Back to top |
|
|
| dukuso
| Joined: 14 Jul 2005 | Posts: 424 | : | Location: germany | Items |
|
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Mon Nov 07, 2005 12:41 pm Post subject: |
|
|
The "pasting" routine in Sudo Cue does the following:
1. Count the digits 1-9 in the string
2. Count the occurrences of other characters
3. Designate the character that occurs (81 - #digits) times as the empty cell char.
4. When there are more such characters, the character that appears more frequently between 2 digits with no other characters is chosen.
5. Ignores the remaining characters as formatting.
When more than 81 digits are found, checks the string to see if there are 81 groups of digits. The string is then interpreted as a candidate diagram.
Output in the "copy" routine can be formatted according to user defined settings.
No standards required. Just a little intel.
We should not forget that this forum exchanges info between humans, so a little formatting is always nice.
Ruud. |
|
Back to top |
|
|
| Bob Hanson
| Joined: 05 Oct 2005 | Posts: 187 | : | Location: St. Olaf College | Items |
|
Posted: Mon Nov 07, 2005 6:42 pm Post subject: |
|
|
That sounds quite clever. Excellent. So in that sense it pretty much doesn't matter how they are presented -- in terms of that program?
I've set up the Sudoku Assistant
http://www.stolaf.edu/people/hansonr/sudoku
now so that
a) you can input just about any format, including (interesting?) tables such as we have seen with possibilities and AaBb, for example, listed.
b) switch between a number of display formats, including tables such as the above, linear strings, 9x9 blocks, and such. I'll add any additional formats anyone wants.
Comments appreciated. Again, my goal is to provide a service with this site that others will benefit from using.
(On that note, by the way, Sudoku Assistant can read any file from anywhere on the web that consists of lines of 81 digits as a sequences of puzzles and display them in a selection box. This has been very useful to me; perhaps others can use this.)
Bob Hanson _________________ Bob Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr |
|
Back to top |
|
|
| MadOverlord
| Joined: 01 Jun 2005 | Posts: 80 | : | Location: Wilmington, NC, USA | Items |
|
Posted: Mon Feb 13, 2006 2:47 am Post subject: |
|
|
I personally feel that the possibility list representation, ie:
Code: | +----------------+----------------+----------------+
| 57 4567 2467 | 26 457 8 | 9 3 1 |
| 9 8 2467 | 1 3 2456 | 245 27 45 |
| 3 1 247 | 9 457 245 | 6 27 8 |
+----------------+----------------+----------------+
| 4 2 1 | 5 6 7 | 8 9 3 |
| 6 3 8 | 4 1 9 | 7 5 2 |
| 57 57 9 | 8 2 3 | 1 4 6 |
+----------------+----------------+----------------+
| 2 46 5 | 36 9 1 | 34 8 7 |
| 1 47 347 | 23 8 245 | 2345 6 9 |
| 8 9 346 | 7 45 2456 | 2345 1 45 |
+----------------+----------------+----------------+ |
is the best for several reasons. First, it gives more info than a straight 81-digit representation, because it describes an intermediate state of solving the puzzle. Second, it's easier for humans to read and understand when discussing complex patterns. And finally, it's trivial for a program to unambiguously parse and understand, since it always contains 81 groups of digits. So it can be annotated with letters and still read.
At a minimum, a program should be able to read this, the 1-line 81 character representation, and the standard 9x9 block with arbitrary whitespace. Where it gets a bit insane is arbitrary grids with extra spacing between blocks and blank rows or columns. I actually programmed the Susser to be able to figure these out but it's not pretty. |
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Mon Feb 13, 2006 1:46 pm Post subject: |
|
|
I do agree with you, it is the most useful format.
There is an addition I would like to suggest:
When we have a way to recognize given digits vs. user supplied digits, the original puzzle can also be retrieved from the information. This is important when a sudoku state is given in which wrong placements have been made. It is useful to know which placements were fixed, and which were made by the user.
In the "Sudoku Progress"(*.sdx) format I use in SudoCue, I write the letter 'u' before the user digits. When processing sudokus from the clipboard, the program does also recognize these 'u'-designated digits.
Ruud. _________________ Meet me at sudocue.net |
|
Back to top |
|
|
| angusj Site Admin
| Joined: 18 Jun 2005 | Posts: 406 | : | | Items |
|
Posted: Mon Feb 13, 2006 1:56 pm Post subject: |
|
|
MadOverlord wrote: | At a minimum, a program should be able to read this [grid with candidates], the 1-line 81 character representation, and the standard 9x9 block with arbitrary whitespace. |
I agree, so I've just updated Simple Sudoku to handle grids with candidates that are pasted into it from the clipboard. |
|
Back to top |
|
|
| MadOverlord
| Joined: 01 Jun 2005 | Posts: 80 | : | Location: Wilmington, NC, USA | Items |
|
Posted: Mon Feb 13, 2006 1:57 pm Post subject: |
|
|
Ruud wrote: | In the "Sudoku Progress"(*.sdx) format I use in SudoCue, I write the letter 'u' before the user digits. When processing sudokus from the clipboard, the program does also recognize these 'u'-designated digits. |
A useful idea, but I wonder if it doesn't get in the way of seeing patterns, at least when used in the forum context.
One alternate way to get the same effect might be to surround the initial square possibilities with _underscore_ characters, which are visible but less intrusive. |
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Mon Feb 13, 2006 2:18 pm Post subject: |
|
|
MadOverlord wrote: | One alternate way to get the same effect might be to surround the initial square possibilities with _underscore_ characters, which are visible but less intrusive. |
Sounds great to me, but a single underscore would do nicely.
This avoids confusion for a user digit between 2 fixed digits. When blanks are compressed out of it (HTML does that sometimes) it would not be clear whether or not the middle digit is fixed or user supplied.
I suggest to place an underscore before the fixed digit.
Ruud. _________________ Meet me at sudocue.net |
|
Back to top |
|
|
| MadOverlord
| Joined: 01 Jun 2005 | Posts: 80 | : | Location: Wilmington, NC, USA | Items |
|
Posted: Mon Feb 13, 2006 3:35 pm Post subject: |
|
|
Ruud wrote: | I suggest to place an underscore before the fixed digit. |
Actually, it is unambigious, because any single digit surrounded by _ is an initial digit.
Here are 3 possible styles (double_underscore, single_underscore, and "underscore that uses up the entire width of the column"). Which one is easier to differentiate? Not saying you are wrong, just think it is open to discussion...
Code: | +-------------------------------+-------------------------------+-------------------------------+
|_4_ 269 239 |_7 58 1 | 39 2368 2368 |
| 127 _5_ 1279 |_6 48 3 | 149 128 248 |
| 16 _6_ 8 |_2 4 9 | 134 _5____ _7____ |
+-------------------------------+-------------------------------+-------------------------------+
+-------------+-------------+-------------+
|_7_ 25 59 |_1 4 3 |_8__ 29 _6__ |
| 39 6 _8_ | 2 _7 59 | 35 14 14 |
| 23 14 14 | 6 _8 59 | 7 29 35 |
+-------------+-------------+-------------+ |
|
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Mon Feb 13, 2006 3:54 pm Post subject: |
|
|
You can also consider the following 2 alternatives:
Code: | +-------------+-------------+
| 7_ 25 59 | 8__ 29 6__ |
| 39 6 8_ | 35 14 14 |
| 23 14 14 | 7 29 35 |
+-------------+-------------+ |
Let's wait and see what others think about this...
Ruud. _________________ Meet me at sudocue.net
Last edited by Ruud on Mon Feb 13, 2006 6:41 pm; edited 1 time in total |
|
Back to top |
|
|
| daj95376
| Joined: 05 Feb 2006 | Posts: 349 | : | | Items |
|
Posted: Mon Feb 13, 2006 5:59 pm Post subject: |
|
|
As one of the others, I think the candidates format should be left alone ... EXCEPT .... to maybe add the original layout enclosed in braces first. Braces could signify a de-facto comment field that could be included with any puzzle.
Here is easy1.ss from Simple Sudoku after a few squares have been filled.
Code: | {.6.1.4.5...83.56..2.......18..4.7..6..6...3..7..9.1..45.......2..72.69...4.5.8.7.}
*-----------------------------------------------------------*
| 39 6 39 | 1 278 4 | 278 5 789 |
| 149 179 8 | 3 27 5 | 6 249 79 |
| 2 357 345 | 6 78 9 | 478 348 1 |
|-------------------+-------------------+-------------------|
| 8 1259 159 | 4 3 7 | 25 129 6 |
| 149 19 6 | 8 5 2 | 3 19 79 |
| 7 235 35 | 9 6 1 | 258 28 4 |
|-------------------+-------------------+-------------------|
| 5 189 19 | 7 14 3 | 48 468 2 |
| 13 138 7 | 2 14 6 | 9 48 58 |
| 6 4 2 | 5 9 8 | 1 7 3 |
*-----------------------------------------------------------* |
|
|
Back to top |
|
|
| crazyblue
| Joined: 14 Feb 2006 | Posts: 1 | : | | Items |
|
Posted: Tue Feb 14, 2006 10:36 am Post subject: |
|
|
I've only just started playing with programming Sudoku, but what I've been using is two main formats. A simple grid with single-space separation:
Code: |
9 . 6 . 8 3 . . 2
1 . 5 6 . 9 . . .
. . 3 . . 7 . 6 9
7 5 4 3 9 . 6 2 .
3 . . . 6 . . 9 5
. 6 9 . 5 . . . 4
5 9 . 8 3 . 2 . .
6 . . . 7 5 9 . 3
4 3 . 9 1 . . . .
|
And for looking at candidates I like to have square brackets []... just a personal fetish, it's something I often use for looking at output from programs on the command line, like this:
Code: |
[123 ] [456 ] [143 ] [789 ] [124 ] [567 ] [246 ] [359 ] [468 ]
... and so on
|
However looking above I can see that aligned formatting seems to be clear enough.
Incidentally I wrote a command line perl program that converts between a number of popular text formats. _________________ my place |
|
Back to top |
|
|
| foxglove
| Joined: 04 Feb 2006 | Posts: 42 | : | Location: Portugal | Items |
|
Posted: Thu Feb 16, 2006 1:02 pm Post subject: |
|
|
I like the idea of the given puzzle before the candidate list better then cluttering with an underscore or whatever. It would work very well in all circumstances I can imagine this morning.
On the other hand I like the idea of cluttering the candidate list with brackets because it's not so easy to read it even when nicely spaced. It makes you count, even if it's only 1 to more than 1. I was ready to add that to #9, actually with curly braces, when this topic came up so I'll let things settle down. This doesn't interfere with reading routines as explained before. There will still be 81 groups of contiguous digits.
The two ideas together suggest pasting candidate lists into a previous puzzle, namely the initial puzzle, but also step by step. Then some kind of interface, even just Undo / Redo, will allow seeing easily the removed candidates. Specially because these lists are more about what is not there and that is difficult to see no matter how well formatted.
Some standard for opening and closing comments would be lovely! And that standard is needed before the whole ASCII is used somewhere else!
I suggest: ! bla bla !
Greetings from an other. |
|
Back to top |
|
|
|