lichess.org
Donate

Bug report game result

I was playing blitz 3+0. White had two pawns against black with only a bishop. White time was over and black won. Shouldn't it be a draw?
Heh, by far the most common question on here these days.

In the rules used on most chess servers and in the USCF, yes, that is insufficient material.

However, here, they use rules similar to the FIDE rules, which state that the game is only drawn if there is no sequence of legal moves that would lead to your being mated.

In the case you describe, there are such sequences of legal moves, so black won.

For illustration:

Thank you for the answer!
Now I see why i lost that game! thank you =)
Well, it's hard to checkmate with a king only :)

No sequence of legal moves where white mates in that example.
Is it always computationally feasible to determine if a losing sequence exists?
@IRONHIDE123

Probably not if you're just trying to implement something like that for the first time to implement this rule :)

With the right sorts of algorithms (a good proof-number search for example), you could probably actually do it rather efficiently for most positions.

The trick is that "rather efficiently" might not actually be quick enough if people have to wait around for their game result to be determined.

Also, some positions might still take a decent chunk of time (like positions with just kings and immobile pawns with no legal route for either king into the other camp; that would just have to be analyzed till the 50 move rule to realize there is no mate).

I'm sure if this were an interesting enough problem there would be some rather clever hybrid approach that recognizes those sorts of positions as well, but it's not trivial by any means.

This is why I said that the rules used here are "similar" to FIDE rules.

The specific rule I mentioned, which is no more or no less than that when you flag you lose so long as a helpmate exists, is the FIDE rule.

Here, they have hardcoded the result of applying the FIDE rule to certain piece configurations; they'll still differ from FIDE in cases like the kings+blocked pawns example above (FIDE it's a draw, here it's a loss).

So, if you have KR and flag, you draw against KB, but lose to KN. IF you have KB and flag, you lose to KN and to K+opposite color bishop, but draw against K+same color bishop, etc.

I wonder if a "flood-fill" (null-move search) algorithm (checking if either player may capture an opponent's piece such that a pawn may promote) would be clever enough for 99.9999% of positions...

One counterexample is:
White: Bf1, Kh1, Pe2, Pg2
Black: K??, Pe3, Pg3

where Black cannot capture the f1-bishop without causing stalemate, regardless what White plays. In most other positions being able to capture an opposing piece means a pawn (of either color) can promote or at least that checkmate is possible.
@Toadofsky

Yeah, I imagine there are some quick and dirty methods that would capture most.

An elegant solution to the full problem is interesting; the few pieces of software that have had helpmate solving capabilities just used plain search to find them.

It's a fairly unexplored problem, which is itself a bit interesting.

Of course, if we take a further step back to the original problem, which is what to do when players in a game of chess run out of time, I've always favored eccentric approaches anyway.

They would never be implemented anywhere except a server I run, so they're mostly silly thought experiments.

The first is the simplest, which is just to count all flags as losses, period. Sure, you would get a few more silly behaviors (position where people just move pieces back and forth aimlessly) than you do now, but it greatly simplifies the rules (and makes more clear the real solution to weird time adjudications: a small increment) :)

The second is the most interesting (to me). If a player flags, there's a brief pause, and then the player with time remaining must generate a helpmate for his opponent in his remaining time. If it's not accomplished, then draw.

This greatly simplifies the helpmate detection needed, in that there isn't any :)

Of course, both of these have their own flaws (the latter in particular means a lot of bullet and faster flags would just be draws), but other than being really different I'm not sure they're at all actually worse than what is currently done across the chess-playing internet.

At any rate, I'll still be spending time on the idea of a helpmate solving engine. It's rather intriguing.
I do like the second idea! I just wish it would find general acceptance:
"If a player flags, the player with time remaining must generate a helpmate for his opponent in his remaining time. If it's not accomplished, then draw."

This topic has been archived and can no longer be replied to.