Author: Dieter Buerssner
Date: 14:22:01 04/11/04
Go up one level in this thread
On April 10, 2004 at 12:51:28, martin fierz wrote:
> switch (val) { case 0 : goto KPK;
> case 1 : goto KRK;
> case 2 : goto KNBK;
> case 3 : goto KQKR;
> ...................
> case 99 : goto whatever;
> }
In many cases, this will need one jump more, then
switch (val)
{
case 0: /* code for case 0 */ break;
case 1: /* code for case 0 */ break;
/* ... */
}
It really is like a "computed goto", but in Ed's code, the target will probably
be just a jump instruction, which can be avoided. Of course, the break may also
involve another jump instruction. But then, after the KPK label in Ed's
suggestion, when the kpk code is done, yet another jump will probably be needed,
too.
For ideas, how to get a signature for different material constallations, you
might want to look at Ernst Heinz's site.
http://supertech.lcs.mit.edu/~heinz/node17.html
I think it was in:
E.A. Heinz.
Knowledgeable encoding and querying of endgame databases.
In ICCA Journal, Vol. 22, No. 2, pages 81-97, June 1999.
(published by the ICCA; preprint available from here)
Regards,
Dieter
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.