Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: EPD opcodes and mate scores

Author: Miguel A. Ballicora

Date: 09:41:29 12/18/01

Go up one level in this thread


On December 18, 2001 at 02:15:31, Rafael Andrist wrote:

>On December 17, 2001 at 15:06:09, Dann Corbit wrote:
>
>>On December 17, 2001 at 14:53:12, Rafael Andrist wrote:
>>
>>>In the PGN/EPD specification I couldn't find any human friendly way to indicate
>>>the distance to the mate if it is the side the move which will be mated. I know
>>>it would be possible with the "ce" opcode but this is a little bit more
>>>difficult to read. Is there any way to indicate it in an easy way like the "dm"
>>>it does if the side to move mates the opponent? Should I use e.g. "dm -3" or is
>>>this a bad idea? Any suggestions?
>>
>>From the PGN Standard, we have this:
>>-------------------------------------------------------------------------------
>>16.2.5.7: Opcode "dm": direct mate fullmove count
>>
>>The "dm" opcode is used to indicate the number of fullmoves until checkmate is
>>to be delivered by the active color for the indicated position.  It always
>>takes a single operand which is a positive integer giving the fullmove count.
>>For example, a position known to be a "mate in three" would have an operation
>>of "dm 3;" to indicate this.
>>
>>This opcode is intended for use with problem sets composed of positions
>>requiring direct mate answers as solutions.
>>-------------------------------------------------------------------------------
>>Because of the statement "by the active color" I think negative numbers are out.
>>
>>Unfortunately, *most* implementers of PGN ignore the correct use of the ce
>>opcode (though I think 32767 should be allowed for 'this is a checkmate' rather
>>than used for indication of error).  At any rate, you cannot count on 32767-n
>>being ply distance to mate.  All sorts of values are used, and that is why
>>distance to mate is unclear.  Because people ignore the standard.
>
>32767-n is wrong too... Please have a look at the standard again.
>Most ce-programs are using a 16 bit integer for the score. The range of a signed
>integer is [-32768;32767]

I guess it might depend on the language, but in C the portable range for
a signed integer is -32767 to 32767.

>in the "ce" opcode -32767 is used for illegal position and the effective "ce"
>range for legal positions goes from -32766 to 32766, and -32768/32767 can
>internally used for -/+ infinity.

I will check the EPD standard again but I do not think they contemplate the
possibility of using -32768. Otherwise, it is broken.

Regards,
Miguel


>
>
>>My suggestion is:
>>c0 "Mate in three for the opposing side."
>
>This may be a solution for a single position, but not for a list of 1000 or more
>positions. This would also nearly double the needed disk space.
>
>I think i will use a new opcode "om x" (= opponent mates in x) and then add a
>"ce" opcode to make it clear for other programs.
>
>Rafael B. Andrist



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.