View previous topic :: View next topic |
What's your flavour? |
XML is just swell. Plain Text should be hexed. |
|
18% |
[ 2 ] |
Plain Text is as good as sex. XML can go to hell. |
|
72% |
[ 8 ] |
On my oath I love them both. |
|
9% |
[ 1 ] |
|
Total Votes : 11 |
|
Author |
Message |
| Agent Allen
| Joined: 01 Oct 2005 | Posts: 34 | : | | Items |
|
Posted: Fri Oct 07, 2005 9:36 pm Post subject: File Formats - you know you want to... |
|
|
Let's discuss file formats.
What are the agreed conventions and where are they documented?
I've gone for an xml format because:
It supports 'exotics' (not 9*9) including n*n and [k*l]*[l*k] where l!=k.
It supports pencil marks.
Supports 'givens' and 'founds' for partially solved puzzles.
I could safely acquire other attributes like difficulty, setter and so on.
I could add regions and support killer sudoku next!
However next thing I'll do is also implement plain text.
Plain-text includes (optional) layout bars and so on...
It appears it can't do exotics but can probably be persuaded to do the rest.
Any thoughts or formal specifications anyone?
Who about an dtd or xsd you know and love? _________________ Agent A |
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Fri Oct 07, 2005 10:36 pm Post subject: |
|
|
Yes, I do think both are fine!
Currently, I use plain text with a '#' preceding lines that I use for a special purpose, such as a partial solution, comments, author, date, source (newspaper or website), difficulty and solving tips.
For these, equivalent elements in XML would be a requirement for me.
Since we ARE at a Sudoku programmers forum here, this would be the right place to come up with some standard file formats.
Format 1: Sudoku definition, containing:
- name or description
- author
- puzzle size, symbols & constraints (either predefined code or full definition)
- date
- publisher
- copyright notice (to be ignored by who don't believe in it)
- difficulty level (either coded, a numerical rating, or "par" minutes)
- solution tips
- clues
- program-specific features (like SYSEX in a standard MIDI file)
the file must be capable of containing a single puzzle or multiple puzzles in a "book"
Format 2: Partially solved Sudoku, containing
- Reference to a Sudoku definition (file name [+ book index])
- filled cells (with digit color)
- (pencil)marks
- cell colors
- mark colors
- cursor position
- digits selected for special features (filter/highlight, eliminations)
- program-specific features (like SYSEX in a standard MIDI file)
I would be quite happy if we could standardize this. Plain text or XML is not an issue for me. |
|
Back to top |
|
|
| Agent Allen
| Joined: 01 Oct 2005 | Posts: 34 | : | | Items |
|
Posted: Sun Oct 09, 2005 8:26 pm Post subject: XML would suit you sir |
|
|
Ruud,
If you're interested in all those additional attributes, XML would suit you more than text.
It's far easier to define optional extensions in XML than text formats.
You can even define processing instructions which sound like the SYSEX you're looking for...
The criticism of comments has always been that their informal format doesn't lend itself to them being processed.
It's hard for a filing system to show file properties unless they've got a formal location and/or signage to know where they are...
I started this topic partly to see if there was a standard (or standardising) format for text.
I think I want to code one because its easier to lift puzzles from forums with a plain text interpreter, but I was thinking nice and simple.
For example, does anyone deal with 'exotic' puzzles (i.e. aren't (3x3)x(3x3)) in text? _________________ Agent A |
|
Back to top |
|
|
| dukuso
| Joined: 14 Jul 2005 | Posts: 424 | : | Location: germany | Items |
|
Posted: Mon Oct 10, 2005 5:41 am Post subject: |
|
|
xml means, that you do have to have Exell installed
to open it ?
That's a strange requirement.
Please note also that there are already existing
conventions on file formats containing
QCP,QWH instances which are almost the same
as sudokus without the blocks-constraint.
Most common seems to be "DIMACS" format.
But this is not very suitable, they generate a large graph and
then color it.
A sudoku is also a constraint satisfaction problem
and there are also standardised formats to store these.
There should be an utility to convert between all these formats
rather than an attempt to unify them, which is not possible IMO. |
|
Back to top |
|
|
| Ruud Site Admin
| Joined: 17 Sep 2005 | Posts: 708 | : | Location: Netherlands | Items |
|
Posted: Mon Oct 10, 2005 8:21 am Post subject: |
|
|
dukuso wrote: | xml means, that you do have to have Exell installed
to open it? |
erm... no
xml=eXtended Markup Language, an extension to HTML that deals with the exchange of structured data between applications, web services and clients, etc.
xls=a file extension used by MS Excel
Most Sudoku programs (mine certainly does) allow copy and paste in text format. That would be sufficient to post and pick Sudokus on forums like these. In a file on disk we might want a little bit more info than just the clues. |
|
Back to top |
|
|
| Lardarse
| Joined: 06 Sep 2005 | Posts: 11 | : | Location: Bristol, UK | Items |
|
Posted: Wed Oct 12, 2005 2:21 am Post subject: |
|
|
I think that plain text is fine for a 9x9 puzzle, but I think that the basig 9x9 puzzle has been done to death now. For more interesting puzzles (Samunampure, geometric, NxN, multiple grids, relays, the list goes on and on...) then XML would be needed.
LA
PS: Feel free to ask is you need any of those different types explained to you... |
|
Back to top |
|
|
|