Six hundred thousand test positions again available

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Six hundred thousand test positions again available

Post by Richard Allbert »

Got them, thank you very much.
Lars
Posts: 12
Joined: Sat Jun 08, 2013 7:13 pm
Location: Denmark

Re: Six hundred thousand test positions again available

Post by Lars »

What is the fun with stalemates.fen?
The few I tested was stalemate rigth on.
I would like to see some sample fen files where the side on move could avoid a loss. Get a Draw by getting into a stalemate.

Fen's like stalemate in 1 or 2 or 3 and so on.

I have only been able to find very few of those.

Anybody has some?

/Lars
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Six hundred thousand test positions again available

Post by sje »

The FEN files are provided to help program authors test their programs for accuracy and speed. Running all the files, a program should detect checkmate with and only with the checkmate file, stalemates with the stalemate file, etc.

I suppose I could generate some stalemate-in-1 data. But I'd first have to find the code that did all the other files as I haven't much interest in writing it all again. And if I did, I'd first generate a 100,000 record mate-in-5 FEN file.
User avatar
Ajedrecista
Posts: 1952
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Six hundred thousand test positions again available.

Post by Ajedrecista »

Hello Lars:
Lars wrote:What is the fun with stalemates.fen?
The few I tested was stalemate rigth on.
I would like to see some sample fen files where the side on move could avoid a loss. Get a Draw by getting into a stalemate.

Fen's like stalemate in 1 or 2 or 3 and so on.

I have only been able to find very few of those.

Anybody has some?

/Lars
I recently opened a thread in the General Subforum:

Draw by stalemate (Campbell, easy position for engines).

It is only one position, but is is better than nothing!

Probably you can find some stalemates problems in the EPD file database of Chest. You can also give a try to Yet another chess problem database, just in case. I also found a few more stalemate positions in a ChessGames collection (link here).

Certainly, it is difficult to find stalemate FEN positions... or we do not know how to find them properly. Good luck!

Regards from Spain.

Ajedrecista.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Stalemate-in-1

Post by sje »

Recipe for finding stalemate-in-1 positions:

1. Build or steal a random game generator.

2. A random game generator can produce about seven thousand games per second. About 6.1% of these games will end in stalemate. So perhaps around 430 stalemate positions per second can be made by a single thread running on a modern CPU.

3. For each stalemate, examine the position which occurred immediately prior to the stalemate. Obviously, it has the stalemate-in-one property.

4. But did it have the force-stalemate-for-a saving-draw property? To determine this, an analysis would be needed to show that all other moves led to an obvious loss. This would take some time, and it is unknown the rate at which the stalemate-in-one positions would survive the selection.

5. The extension of the algorithm to produce stalemate-in-N positions is left as an exercise for the reader.