@Joerg Oster
What I could advise considering and relatively easy to implement (provided it's not yet in Matefish), are the following possibilities:
* hash table for solved positions (with caution not to compare positions with different castling/en passant capabilities)
* checking for short mate (at least #1, #2 and #3 or even up to #7 depending on position type) - and storing result in hash table
* sorting not only white moves but also black moves (even a very simple approach can give a significant boost, like checking moves first etc.)
All these should give you immediate boost in speed.
Software for solving chess moremovers
Moderator: Ras
-
- Posts: 9
- Joined: Sat Apr 26, 2025 7:01 pm
- Full name: Marcin Sterkowiec
-
- Posts: 969
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
- Full name: Jörg Oster
Re: Software for solving chess moremovers
Well, this is considered invalid input under UCI protocol.msterkowiec wrote: ↑Wed Apr 30, 2025 12:50 pm @Joerg Oster
J.G.Island is for orthodox moremovers, so it assumes e.g.:
* White on move
* any castling that seems possible is possible (the assumption is that there were no earlier moves by king(s) and rook(s))
* no retro analysis (no en passant in the first move is considered)
* right, 50-move rule is not considered either
Thus, only position (partial FEN) and stipulation (#n condition) are needed to fully describe a moremover position.
And I'm not sure I want to waste time sanitizing it.
Jörg Oster
-
- Posts: 969
- Joined: Fri Mar 10, 2006 4:29 pm
- Location: Germany
- Full name: Jörg Oster
Re: Software for solving chess moremovers
I just recently re-implemented a hash table. Zobrist keys should perfectly deal with different castling and en-passant possibilities.msterkowiec wrote: ↑Wed Apr 30, 2025 4:07 pm @Joerg Oster
What I could advise considering and relatively easy to implement (provided it's not yet in Matefish), are the following possibilities:
* hash table for solved positions (with caution not to compare positions with different castling/en passant capabilities)
But very likely there is room for improvements.
I decided to use extensions for the most promising moves.msterkowiec wrote: * checking for short mate (at least #1, #2 and #3 or even up to #7 depending on position type) - and storing result in hash table
I'm already doing this.msterkowiec wrote: * sorting not only white moves but also black moves (even a very simple approach can give a significant boost, like checking moves first etc.)
Thanks for your suggestions.msterkowiec wrote: All these should give you immediate boost in speed.
This already tells me that J.G.Island is very probably way more advanced than Matefish.
Jörg Oster
-
- Posts: 9
- Joined: Sat Apr 26, 2025 7:01 pm
- Full name: Marcin Sterkowiec
Re: Software for solving chess moremovers
Take a look at some sites with chess composition e.g. https://yacpdb.org/#changes/1 or https://pdb.dieschwalbe.de/search.jsp (you can use e.g. such query "creationDATE>=20250423 and g='n#'"). No one bothers with full FEN (the only exception I know is Meson database: example)Joerg Oster wrote: ↑Wed Apr 30, 2025 6:20 pm Well, this is considered invalid input under UCI protocol.
And I'm not sure I want to waste time sanitizing it.
-
- Posts: 12777
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: Software for solving chess moremovers
All the chess positions I posted are not possible in a legal chess game. They all have too many of one or more chessmen.
Many chess programs and even chess provers like Chest will reject positions with more than 8 pawns of a single color, more than 10 chessmen in the categories (R,N,B) of a single color, more than 9 queens of a single color, more than 1 king of a single color, etc.
Often, arrays are used to store the chessmen and the array sizes are based upon the maximum legal possible counts of chessmen.
Be that as it may, I have solved a good number of them and my results are in this file:
It contains the positions with side to move white and assumes no castling rights.
They are sorted by highest to lowest score, and the last position with a known distance to mate is at position 16127.
I guess, because some of the positions are dead lost and proven so by standard play, that they are intended as help mates or some other oddity like that.
This position:
[d]rbkb1b1b/b1b1bPb1/KbRb1b1b/b1b1bPbB/rb1bRbPb/brb1brb1/1brb1b1b/brqrbrbr w - -
is so naughty that I did not even try it because I am pretty sure it will crush the arrays and overwrite memory for most chess solvers and chess playing programs. According to the C language standard, a program exhibiting undefined behavior can even cause a dragon to fly out of your left nostril. No, really, it says that.
Many chess programs and even chess provers like Chest will reject positions with more than 8 pawns of a single color, more than 10 chessmen in the categories (R,N,B) of a single color, more than 9 queens of a single color, more than 1 king of a single color, etc.
Often, arrays are used to store the chessmen and the array sizes are based upon the maximum legal possible counts of chessmen.
Be that as it may, I have solved a good number of them and my results are in this file:
It contains the positions with side to move white and assumes no castling rights.
They are sorted by highest to lowest score, and the last position with a known distance to mate is at position 16127.
I guess, because some of the positions are dead lost and proven so by standard play, that they are intended as help mates or some other oddity like that.
This position:
[d]rbkb1b1b/b1b1bPb1/KbRb1b1b/b1b1bPbB/rb1bRbPb/brb1brb1/1brb1b1b/brqrbrbr w - -
is so naughty that I did not even try it because I am pretty sure it will crush the arrays and overwrite memory for most chess solvers and chess playing programs. According to the C language standard, a program exhibiting undefined behavior can even cause a dragon to fly out of your left nostril. No, really, it says that.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 9
- Joined: Sat Apr 26, 2025 7:01 pm
- Full name: Marcin Sterkowiec
Re: Software for solving chess moremovers
Chess composition typically treats position illegality as a major flaw - however it does not disqualifies such composition completely (e.g. it may have other values overwhelming, at least theoretically).
I think that software developer is free it to take decision how to treat illegal positions.
J.G.Island is written so that it has larger array sizes prepared, although occasionally it may display the following message: "Note: There are more than 9 queens and pawns of the same color. Program is able to properly handle only legal positions (in which no more than 218 moves are possible); otherwise its behaviour may be unpredictable."
However, it is written in C++ (not C), so its behaviour is not THAT unpredictable, at least judging by the language standard ; )
This way or another, I think it may be better to be able to handle a broader range of orthodox moremovers (despite their illegality, they are still orthodox anyway). For example J.G.Island was able to find duals in the aforementioned composition as described here in the comments.
I think that software developer is free it to take decision how to treat illegal positions.
J.G.Island is written so that it has larger array sizes prepared, although occasionally it may display the following message: "Note: There are more than 9 queens and pawns of the same color. Program is able to properly handle only legal positions (in which no more than 218 moves are possible); otherwise its behaviour may be unpredictable."
However, it is written in C++ (not C), so its behaviour is not THAT unpredictable, at least judging by the language standard ; )
This way or another, I think it may be better to be able to handle a broader range of orthodox moremovers (despite their illegality, they are still orthodox anyway). For example J.G.Island was able to find duals in the aforementioned composition as described here in the comments.
-
- Posts: 862
- Joined: Thu Mar 09, 2006 4:50 pm
- Location: Austria
- Full name: Franz Huber
Re: Software for solving chess moremovers
Hi,

A quick info: the program refuses to load the database 'TestSuiteData\TestProblems.cp', because one of the problems (1920) contains an illegal option 'UseVariantsAsSortIndications' - the correct option should be 'UseMainVariantAsSortIndications'.
Regards,
Franz
a really interesting program - the lots of settings and options remind me a little of the ancient matesolver Alybadix.msterkowiec wrote: ↑Mon Apr 28, 2025 11:37 am I would like to invite you to familiarize yourself with a program dedicated to solving chess moremovers. You can download a free version at jgisland.pl.

A quick info: the program refuses to load the database 'TestSuiteData\TestProblems.cp', because one of the problems (1920) contains an illegal option 'UseVariantsAsSortIndications' - the correct option should be 'UseMainVariantAsSortIndications'.
Regards,
Franz
-
- Posts: 862
- Joined: Thu Mar 09, 2006 4:50 pm
- Location: Austria
- Full name: Franz Huber
Re: Software for solving chess moremovers
And here still a few typos in the English menus:F.Huber wrote: ↑Sat May 24, 2025 7:50 pm a really interesting program - the lots of settings and options remind me a little of the ancient matesolver Alybadix.
A quick info: the program refuses to load the database 'TestSuiteData\TestProblems.cp', because one of the problems (1920) contains an illegal option 'UseVariantsAsSortIndications' - the correct option should be 'UseMainVariantAsSortIndications'.
in 'File' menu: defaulf
in 'Advanced' menu (twice): precalulcated