Go back
Draw due to lack of material...

Draw due to lack of material...

Site Ideas

Ragnorak
For RHP addons...

tinyurl.com/yssp6g

Joined
16 Mar 04
Moves
15013
Clock
19 Nov 06

Needs to be implemented as a matter of urgency.

No point in having a fancy chess site if the rules of chess aren't implemented properly.

D

P
Mystic Meg

tinyurl.com/3sbbwd4

Joined
27 Mar 03
Moves
17242
Clock
19 Nov 06
Vote Up
Vote Down

Originally posted by Ragnorak
Needs to be implemented as a matter of urgency.

No point in having a fancy chess site if the rules of chess aren't implemented properly.

D
Explain an example... besides king vs. king.

P-

SS

Joined
15 Aug 05
Moves
96595
Clock
19 Nov 06
Vote Up
Vote Down

Ragnorak
For RHP addons...

tinyurl.com/yssp6g

Joined
16 Mar 04
Moves
15013
Clock
19 Nov 06
Vote Up
Vote Down

The post that was quoted here has been removed
Its a bit more complicated than I originally thought...
"The FIDE Laws of Chess says in article 9.6:
"The game is drawn when a position is reached from which a checkmate cannot occur by any possible series of legal moves, even with the most unskilled play. This immediately ends the game.""
http://www.e4ec.org/immr.html

To keep the implementation simple, I think RHP should implement only K + B v K, and K + N v K. These are vital.

If Russ and Chris were feeling enthusiastic, I think cases 1 to 4 could be implemented.

The others aren't practical to implement.

K + N + N v K can possibly result in a checkmate, so definately shouldn't be included.

D

SS

Joined
15 Aug 05
Moves
96595
Clock
19 Nov 06
Vote Up
Vote Down

BigDogg
Secret RHP coder

on the payroll

Joined
26 Nov 04
Moves
155080
Clock
20 Nov 06
Vote Up
Vote Down

Originally posted by Ragnorak
Its a bit more complicated than I originally thought...
"The FIDE Laws of Chess says in article 9.6:
"The game is drawn when a position is reached from which a checkmate cannot occur by any possible series of legal moves, even with the most unskilled play. This immediately ends the game.""
http://www.e4ec.org/immr.html

To keep the implementation simpl ...[text shortened]... + N + N v K can possibly result in a checkmate, so definately shouldn't be included.

D
What's the fourth case? I see only three:

K v. K
K+N v. K
K+B v. K

X
Cancerous Bus Crash

p^2.sin(phi)

Joined
06 Sep 04
Moves
25076
Clock
20 Nov 06
Vote Up
Vote Down

Originally posted by BigDoggProblem
What's the fourth case? I see only three:

K v. K
K+N v. K
K+B v. K
KBBK with both bishops being on the same coloured square.

Not likely but a case nonetheless. Isn't it?

BigDogg
Secret RHP coder

on the payroll

Joined
26 Nov 04
Moves
155080
Clock
20 Nov 06
1 edit
Vote Up
Vote Down

Originally posted by XanthosNZ
KBBK with both bishops being on the same coloured square.

Not likely but a case nonetheless. Isn't it?
That's actually two (or many more) more cases. K+B v. K+B and K+B+B (up to 9 Bishops) v. K both cannot end in checkmate if the Bishops travel on squares of the same color.

There are also 'special' cases, such as the following:

Andrew Buchanan
StrateGems 2002

White to play. What was Black's last move?

So it is a question of which cases are practical to code.

Ragnorak
For RHP addons...

tinyurl.com/yssp6g

Joined
16 Mar 04
Moves
15013
Clock
20 Nov 06
Vote Up
Vote Down

Originally posted by BigDoggProblem
That's actually two (or many more) more cases. K+B v. K+B and K+B+B (up to 9 Bishops) v. K both cannot end in checkmate if the Bishops travel on squares of the same color.

There are also 'special' cases, such as the following:

Andrew Buchanan
StrateGems 2002
[fen]Bb1k1b2/bKp1p1p1/1pP1P1P1/1P6/p5P1/P7/8/8[/fen]
White to play. What was Black's last move?

So it is a question of which cases are practical to code.
If you had looked at the link I had provided, you'd see a table of scenarios, from 1 to 8.

1 to 3 you know.

4 is stated as

King + m * Bishops
m > 0
bishops (if more) stand on the same color

v

King + n * Bishops
n > 0
bishop (or bishops if more) stand on the same color as bishop or bishops on the other side

so programmatically, there is an algorithm to cover the many different cases.

Cases 5 - 8 would have been the special cases, like the one you mention, which I suggested would be impractical to implement.

D

BigDogg
Secret RHP coder

on the payroll

Joined
26 Nov 04
Moves
155080
Clock
20 Nov 06
Vote Up
Vote Down

Originally posted by Ragnorak
If you had looked at the link I had provided, you'd see a table of scenarios, from 1 to 8.

1 to 3 you know.

4 is stated as

King + m * Bishops
m > 0
bishops (if more) stand on the same color

v

King + n * Bishops
n > 0
bishop (or bishops if more) stand on the same color as bishop or bishops on the other side

so programmatically, there ...[text shortened]... cial cases, like the one you mention, which I suggested would be impractical to implement.

D
The problem on this site is that links don't look like links. I finally got the linkification extension for Firefox, which fixes this problem.

i

Sydney

Joined
30 May 05
Moves
16100
Clock
21 Nov 06
Vote Up
Vote Down

Initially I thought this would be quite a load on the server, having to parse the fen of every game after a submit. However they could considerably reduce the load by only parsing when they know a draw from lack of material is possible. For instance .. add a new column to the game database called "drawround" .. initially it would be set to 19 (the smallest number of moves to reach one of these situations i think) .. if the number of moves in the game is less than this number then no need to parse the fen. On reaching move 19 the fen is parsed and if a draw is not present then the next possible draw round is calculated from the remaining pieces and the db entry is updated. That way the necessity for the fen to be parsed is greatly reduced .. i think there is even some perl code out there that will tell you if a particular fen is a draw, shouldn't be too hard to convert it to php .. or whatever they are using on the backend.

Also, aren't these also instant draws? Anyone know if it is possible to blunder mate in these positions?
N + K v N + K
nB + K v N + K

David Tebb

Joined
26 May 02
Moves
72546
Clock
21 Nov 06
Vote Up
Vote Down

Originally posted by idioms

Also, aren't these also instant draws? Anyone know if it is possible to blunder mate in these positions?
N + K v N + K
nB + K v N + K
It's possible to mate with K+N v K+N. Therefore that cannot be regarded as an automatic draw. Eg:-

David Tebb

Joined
26 May 02
Moves
72546
Clock
21 Nov 06
Vote Up
Vote Down

The same can be said for K+B v K+N. Eg:-

David Tebb

Joined
26 May 02
Moves
72546
Clock
21 Nov 06
Vote Up
Vote Down

K+B v K+B (if opposite colours) isn't an automatic draw either:-

David Tebb

Joined
26 May 02
Moves
72546
Clock
21 Nov 06
Vote Up
Vote Down

Russ should just write code to check for the 3 basic automatic draws:

K v K
K+B v K
K+N v K

Every other chess site does this. I can't imagine it being difficult to implement.

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.