Point your Java-enabled browser at:
http://idisk.mac.com/chessnotation-Public?view=web
And you'll see a couple of downloadable FEN files that may be useful with the testing of your program.
The first is named checkmates.fen and it has 100,000 different FEN positions where each is a checkmate.
The second is named stalemates.fen and it has 100,000 different FEN positions where each is (you've guessed it) a stalemate.
Each position is legal and is one that can occur in normal play.
A pair of test files just for you
Moderator: Ras
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: A pair of test files just for you
I guess it is to be able to recognize that you are checkmated or stalemated.sje wrote:Point your Java-enabled browser at:
http://idisk.mac.com/chessnotation-Public?view=web
And you'll see a couple of downloadable FEN files that may be useful with the testing of your program.
The first is named checkmates.fen and it has 100,000 different FEN positions where each is a checkmate.
The second is named stalemates.fen and it has 100,000 different FEN positions where each is (you've guessed it) a stalemate.
Each position is legal and is one that can occur in normal play.
I have found that many programs are balky about analyzing positions that are already checkmates. I'm not sure if it is good or bad.
-
- Posts: 670
- Joined: Mon Dec 03, 2007 3:01 pm
- Location: Barcelona, Spain
Re: A pair of test files just for you
Isn't this an issue that should be checked by the GUI?
Especially concerning the UCI-protocol, where the gui sends a position and then says 'go' if can't be expecting the engine to analyze a 'broken' position.
Especially concerning the UCI-protocol, where the gui sends a position and then says 'go' if can't be expecting the engine to analyze a 'broken' position.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: A pair of test files just for you
The test files are intended to help with testing and performance measurements of:Dann Corbit wrote:I guess it is to be able to recognize that you are checkmated or stalemated.
I have found that many programs are balky about analyzing positions that are already checkmates. I'm not sure if it is good or bad.
1) the FEN file reader,
2) the FEN string decoder,
3) the checkmate detector (false negatives for checkmates.fen),
4) the stalemate detector (false negatives for stalemates.fen),
5) the perft routine (all counts should be zero).
I hadn't seen any test files like these so I thought I'd post them for other authors. The data may be freely reposted, of course.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: A pair of test files just for you
Not every program uses a GUI. Some programs may use a GUI (or two), but still have a non-GUI command mode.Codeman wrote:Isn't this an issue that should be checked by the GUI?
Especially concerning the UCI-protocol, where the gui sends a position and then says 'go' if can't be expecting the engine to analyze a 'broken' position.
Also, GUI programs should themselves be tested.
Re: A pair of test files just for you
Understanding the chess position is by definition the domain of the chess engine.Codeman wrote:Isn't this an issue that should be checked by the GUI?
Especially concerning the UCI-protocol, where the gui sends a position and then says 'go' if can't be expecting the engine to analyze a 'broken' position.
When software that plays matches between two programs detects and acts upon a checkmate or stalemate, it's acting as an arbiter, which is also legitimate. The software playing the matches may also be a GUI, but arbitration and user-interface are separate roles that may be but are not necessarily performed by the same software.
Dave
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
A third test file
I've added another file: matein1.fen, a collection of 100,000 unique positions that have at least one checkmating move.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
Re: A pair of test files just for you
Symbolic does do position checking on search entry just in case of a GUI failure or of a failure is some other part of the program.Codeman wrote:Isn't this an issue that should be checked by the GUI?
Especially concerning the UCI-protocol, where the gui sends a position and then says 'go' if can't be expecting the engine to analyze a 'broken' position.
Specifically, the search returns an enumeration variable, sts (search termination status) that can take one of about a dozen values. One such value is "StsBadParameters" for an invalid position; another is "StsNoMoves" for a checkmate or stalemate position.
-
- Posts: 4675
- Joined: Mon Mar 13, 2006 7:43 pm
A fourth test file
It's not there yet because of service failure at Apple's MobileMe, but I hope you will all soon see:
matein2.fen 100,000 unique mate-in-two positions
These were produced with the assistance of Symbolic's specially coded IsPosMateIn2() routine. This function is used to help implement the program's Capablanca feature that causes a resignation before any checkmate can be delivered. (Jose Capablanca, a long time world champion and likely the greatest natural chess talent, was never checkmated.) Symbolic goes one move further and is designed to resign if it detects an unstoppable mate in two against it, so the program has also never been checkmated (outside of non-event test games).
The idea is that if a program is going to play like a grandmaster, then it should also know when to resign like a grandmaster. Any opponent that can force Symbolic into a mate in two is nearly certain not to miss the mate in two execution.
matein2.fen 100,000 unique mate-in-two positions
These were produced with the assistance of Symbolic's specially coded IsPosMateIn2() routine. This function is used to help implement the program's Capablanca feature that causes a resignation before any checkmate can be delivered. (Jose Capablanca, a long time world champion and likely the greatest natural chess talent, was never checkmated.) Symbolic goes one move further and is designed to resign if it detects an unstoppable mate in two against it, so the program has also never been checkmated (outside of non-event test games).
The idea is that if a program is going to play like a grandmaster, then it should also know when to resign like a grandmaster. Any opponent that can force Symbolic into a mate in two is nearly certain not to miss the mate in two execution.
-
- Posts: 12792
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: A pair of test files just for you
Just as a suggestion:sje wrote:Point your Java-enabled browser at:
http://idisk.mac.com/chessnotation-Public?view=web
And you'll see a couple of downloadable FEN files that may be useful with the testing of your program.
The first is named checkmates.fen and it has 100,000 different FEN positions where each is a checkmate.
The second is named stalemates.fen and it has 100,000 different FEN positions where each is (you've guessed it) a stalemate.
Each position is legal and is one that can occur in normal play.
EPD is a lot more convenient than FEN. Most programs and nearly all chess interfaces can read EPD but a lot less can read FEN.