From: Adam Skalny shogi sk> Date: 2 jan 2007 Subject: RE: Shogi record file formats? Hallo Adrian, That's very nice idea. If I may give my little bit: do not try to create another "text based" format. Single common format is utopia! There are programs, which will never be rewritten into common SFG based format. Sayin= g "when it works, don't touch it", have very special meaning for programmers :-) So this SFG format of yours would be just another text based format in the existing mess. All text based formats have several "weak-points" (comparing to XML): 1) "no information about encoding provided" or "use only single fixed encoding" -- IMHO in kifu, there should be a place to write a comment. But comments may be written in many different languages (Japanese, English, Russian, Chinese, France etc). Each language uses its own character encoding. For program it's hard, or even impossible to determine correct encoding, when it receive just 'bunch of bytes' that 'somehow represents text'.=20 2) "no standard way of processing" -- there are probably some libraries tha= t parse and construct given kifu format, but in general they are, with all du= e respect to it's writers, immature and probably not very fault tolerant comparing to existing industry standard xml parsers.=20 3) "limited storage options" -- let's imagine for a moment, that we overcom= e encoding problems in some way. Now we have a bunch of chars that have to be= stored in the database. There are basically two possibilities:=20 - storing it as a CLOB is fast and simple, but stored data lost any shogi-meaning, it's just a bunch of character. E.g. you can not search for games that were played on ISF 2007 or won by sente. - another way is to declare tables in database, that follows format structure and e.g. store each move as a single record. This requires parsin= g on store and file composition on load from database -- wasting time. Plus database is very tightly coupled with the defined format, database should b= e only storage.=20 On the other hand, database engines capable of storing and processing xml directly already exist.=20 4) "no or limited support for alternative moves" -- writing down game like = a list of moves is fine until you wish to write an alternative moves. You nee= d tree or graph structure to store alternative moves. There's no "natural" wa= y to write it down as list. One possibility is to put alternative moves into comments, but there's no way for program to process them. E.g. I like Reije= r Grimbergen's "This week in Shukan Shogi" posts very much. Reading commented= game of professional players is great way to enjoy shogi. Sometimes the mos= t interesting moves are written in the comments.=20 XML store tree-based structure and even have support for element references= . Here are some pros for xml based format: - XML is existing, widely accepted standard - Character encoding is covered by standard and it's transparent for application programmer - Expressing tree in XML is natural and with element references, it's possible to write down virtually any hierarchy (not only tree). - Variety of parsers exists for all programming languages - Presentation and conversion to other formats can be done using stylesheet= s (xslt, FO) In my humble opinion "next" shogi format should be designed, discussed and approved by whole shogi community or at least here at shogi-l :-) As laid down in this message, XML extension is IMHO best point to start. Features of shogi format that would be nice: - Modeling language, not just kifu -- game is hierarchy of moves, move is event in which player change position and promotion status of pieces on the= board and in the hand. It should be possible to express this in shogi marku= p language (SHOML?) ;-)=20 - Simple to write -- simplest version should be easy enough to write and understand by human. - Backward compatible -- there should be a simple way to strip all features= and serialize (some) games in PSN KIF or other existing format. - Support for shogi variants -- all game variants should be noted in SHOML.= Records from shogi variants differ only in board size, piece set used and whether drops are allowed. Some sort of central repository of shogi variant= s should be created for this purpose -- to unify piece type names and maybe even rules written in computer understandable language (subset of SHOML?). - Semantic web enabled? -- have no experiences in this field, please help. Any format standardization should IMHO include these "initiatives": - Core language -- discussion about language features, language definition using DTD and other w3 means, language maintenance and next version development. - Compatibility and presentation -- Creating transformations from shogi markup language into existing format. Creating stylesheets that present shoml stored games in human acceptable way (e.g. in 'classical kifu') - Programmer support -- definition of library/libraries that can be inserte= d into existing projects and form a bridge between existing formats and shoml= . - Web and interexchange -- creating and maintenance of game repositories, shogi variant repository, shogi rules repository, shogi piece image repository etc. Definition of web services and other interfaces that may us= e shogi markup language. To summarize it: Adrian common format is great idea, let's use XML, let's talk about it, I am willing to help :-)=20 Best regards, Adam Skaln=FD -----P=F4vodn=E1 spr=E1va----- Od: Adrian Petrescu [mailto:adrianp cogeco ca]=20 Odoslan=E9: 31. decembra 2006 20:09 Komu: shogi topica com Predmet: Shogi record file formats? Hello, Shogi mailing list! I'm a student and a Go player who is new to=20 the world of shogi, but very interested... --^---------------------------------------------------------------- This email was sent to: = shogi-l shogi net EASY UNSUBSCRIBE click here: http://topica.com/u/?a2i6Ys.= aBsjvI.= c2hvZ2kt Or send an email to: shogi-unsubscribe topica com For Topica's complete suite of email marketing solutions visit: http://www.topica.com/?p=3DTEXFOOTER --^----------------------------------------------------------------