Author: Dann Corbit
Date: 07:55:43 02/07/02
Go up one level in this thread
On February 07, 2002 at 10:45:04, Miguel A. Ballicora wrote: >On February 07, 2002 at 05:20:03, Uri Blass wrote: >>On February 07, 2002 at 04:37:07, Scott Gasch wrote: >>>I don't understand; it's a legal chess position -- any program should be able to >>>handle it... >> >>You are wrong > >In a computer program (chess or whatever), crashing is not an acceptable >behavior. It might be "understandable", but you cannot be happy about it. >If you decide to have a design that does not accept 9 queens, the program should >not accept the FEN and warn the user in the first place. I am sure that everyone agrees about that. The problem comes when we have hardwired limits because "it could never be bigger than 'x'" The EPD description says that 1024 byte EPD strings should be accepted, but very few programs will actually handle such a thing. "16.2.3: Data fields EPD specifies the piece placement, the active color, the castling availability, and the en passant target square of a position. These can all fit on a single text line in an easily read format. The length of an EPD position description varies somewhat according to the position and any associated operations. In some cases, the description could be eighty or more characters in length and so may not fit conveniently on some displays. However, most EPD descriptions pass among programs only and these are not usually seen by program users. (Note: due to the likelihood of future expansion of EPD, implementors are encouraged to have their programs handle EPD text lines of up to 1024 characters long.) Each EPD data field is composed only of non-blank printing ASCII characters. Adjacent data fields are separated by a single ASCII space character." It also says that "descriptions can be 80 OR MORE characters" {emphasis mine} but very few programs will handle tag fields longer than 80 characters. The only limit I can find to a single field is 256 characters: "16.2.4.1: General format An opcode is an identifier that starts with a letter character and may be followed by up to fourteen more characters. Each additional character may be a letter or a digit or the underscore character. An operand is either a set of contiguous non-white space printing characters or a string. A string is a set of contiguous printing characters delimited by a quote character at each end. A string value must have less than 256 bytes of data." Again, I doubt if 50% of the programs can handle an id that is 255 characters long. Even EPD utilities like PGN-Extract by Barnes choke on perfectly legal PGN (I had to make some modifications). It is difficult to find robust implementations that will handle unusual EPD strings. That's not how it ought to be, but that's how it is.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.