Moderator: Andres Valverde
I don't think this is enough. To satisfy most TDs (and the rules) all engines should IMHO also claim draw at KBK and KNK. The last case is KBKB with bishops on same square colour; this is a draw, too, but I don't know if many engines claim it (Surprise not yet, unfortunately but will do it soon ). All these four cases have in common that the material of both sides is not sufficient to build a mate position, even with worst play.Pallav Nawani wrote:Claim Insufficient material draw iff just kings are left on board.
Pallav
peterhughes wrote:Having looked on the internet, there seems to be varied opinion about what consistitutes Insufficient Material. This is a concern, because according to some tournament rules, claiming a draw in error could cause you engine to automatically "lose the game".
Is there an offical definition of "Insufficient Material" that has been agreed on the WinBoard forum, that is used in all the tournaments that people on this forum enter?
Charles Roberson wrote:insufficient material is fairly simple
you just have to know the elementary endgames
a king and pawn vs a king can mate
a king and queen vs a king can mate
a king and rook vs a king can mate
a king and 2 bishops vs a king can mate
a king, bishop and knight vs a king can mate
a king and 2 bishops vs a king can mate
peterhughes wrote:
I guess the main question is, what do WinBoard and Arena count as Insufficient Material? Because, I dont want to go and program some massively completed system of detection, and then find that WinBoard/Arena doesnt recognise, and then have Arena/WinBoard tell that I'm making an illegal draw claim, and me to therefore lose the game!
pedrox wrote:Mate KB vs KB (bishops of opposite color)
7k/5KBb/8/8/8/8/8/8 b - - 1 1
int colorcasilla[64] = {
0, 1, 0, 1, 0, 1, 0, 1,
1, 0, 1, 0, 1, 0, 1, 0,
0, 1, 0, 1, 0, 1, 0, 1,
1, 0, 1, 0, 1, 0, 1, 0,
0, 1, 0, 1, 0, 1, 0, 1,
1, 0, 1, 0, 1, 0, 1, 0,
0, 1, 0, 1, 0, 1, 0, 1,
1, 0, 1, 0, 1, 0, 1, 0,
};
----------------------------------------------------------------------------
int tablas() //comprueba si hay tablas por insuficiencia de material
{
int i;
Evalua_material();
if (peonesblanco == 0 && peonesnegro == 0) {
if ((piezasblanco < VALOR_TORRE) && (piezasnegro < VALOR_TORRE)) {
if ((piezasblanco == VALOR_CABALLO) && (piezasnegro == VALOR_CABALLO))
return FALSO;
else if ((piezasblanco == VALOR_ALFIL) && (piezasnegro == VALOR_CABALLO))
return FALSO;
else if ((piezasblanco == VALOR_CABALLO) && (piezasnegro == VALOR_ALFIL))
return FALSO;
else if ((piezasblanco == VALOR_ALFIL) && (piezasnegro == VALOR_ALFIL)) {
for (i = 0; i < 64; i++) {
if ((color[i] == BLANCO) && (pieza[i] == ALFIL))
alfilblanco = colorcasilla[i];
if ((color[i] == NEGRO) && (pieza[i] == ALFIL))
alfilnegro = colorcasilla[i];
}
if (alfilblanco != alfilnegro)
return FALSO;
else
return VERDADERO;
}
else
return VERDADERO;
}
else
return FALSO;
}
else
return FALSO;
}
Charles Roberson wrote: insufficient material is fairly simple
you just have to know the elementary endgames
a king and pawn vs a king can mate
a king and queen vs a king can mate
a king and rook vs a king can mate
a king and 2 bishops vs a king can mate
a king, bishop and knight vs a king can mate
...
The conditions that I gave were quite sufficient.
By knowing the minimal conditions for mating one can
code tests to see if you have less than those conditions.
If you have less than those conditions, you have insufficient
material.
Charles Roberson wrote:F,G, H and I are easy.
G & H are handled by 50 move rule or 3 fold rep of position.
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 6 guests