Check out Grant Acedrex, our featured variant for April, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Earlier Reverse Order Later
Mating potential and piece values[Subject Thread] [Add Response]
H. G. Muller wrote on Sat, Sep 22, 2012 09:33 PM UTC:
I made some enhancements to Fairy-Max, to make it pay attention to lack of
mating potential and pair bonuses. This was relatively easy, because it
already contained code to keep a count of the total number of pieces (for
the baring rule in Shatranj) as well as of each piece type (for Spartan
Chess' King counts). So I now added a list of pair bonuses to the piece
info, and each time when after capture there is an odd number of that piece
type, I add the pair bonus for that piece type to the score. I let it
initialize the pair bonus to 1/8 of the piece value if the piece is
'obviously color bound', which for B (325cP) would give 40 cP, which is
about right.

No idea how this would work for other pieces, but this can be tested now.
Interesting candidates would be the Clobberer pieces BD and FAD, which are
worth about a Rook, and Adjutant (BDD), which is worth about 7 (IIRC).

Recognizing lack of mating potential is a bit trickier. I did not have a
very fast algorithm for that, it must loop over piece types to see what
each side has. But as a fast filter I can use the Pawn count of the side
that is ahead: if it is 2 or larger there is no need to worry about lack of
mating potential in your pieces.

The way I evaluate 'drawish' endings is like this:
1) If the leading side has no Pawns, its advantage is divided by 2.
2) If he has one Pawn, and the opponent has Pieces, (non-Pawns!), we assume
the weakest piece is traded for the Pawn.
3) If the strong side has no Pawns and not more than 2 Pieces, and the weak
side not more than one piece, we recognize some cases that are dead draws,
and divide the advantage by a further 2 (if a Pawn has to be traded away
first) or 4 (if the strong side is already Pawnless). The recognized cases
are:
3a) Less than 350cP advantage in Piece material, and no minors with mating
potential. This catches cases like 2 minors vs 1, R vs minor, R+minor vs R,
Q+minor vs Q, but not Q+minor vs RN or RN+minor vs BN
3b) The strong side has only one piece, and it is color bound (seen by the
pair bonus). This catches a lone BD or Adjutant vs weak stuff, which can
easily have an advantage 350.
3c) A 'defective pair', like two Knights. I encode this by giving such a
piece type an insignificantly small negative pair bonus, specified
explicitly in the piece description file. (Mating potential in a minor is
likewise encoded by an insignificantly small positive pair bonus for the
piece.)

So advantages in drawish endings are divided by 2, 4 or 8, so the leading
side will try to avoid them. E.g. KNNK would normally be 2*325 = +750; the
factor 8 trims this to 94, i.e. less than a Pawn, so the program  would
prefer KPK. KNK would score only +47.

I am now running some tests of thei new program ('Pair-o-Max') against
the old Fairy-Max, to see if this extra knowledge would make it indeed play
stronger.

H. G. Muller wrote on Wed, Sep 26, 2012 09:28 AM UTC:
OK, after fixing some bugs, and some testing mistakes, I have the first
valid results. To begin with, I made one change in the engine: the factor
two discount on a Pawnless (but otherwise unsuspect) lead is not applied
when the opponent has a bare King. When you have mating potential (mating
minor, more than a minor ahead and no 'defective pair' or a color-bound
piece, or 3 pieces) there is no reason to shy away from the end-game.
Mating potential is mating potential... This solves problems in KRPKB, here
the advantage can be very high if the Pawn is on 7th rank (and counts for
~2.5, so you are at +4.5), where the Bishop covers the promotion square, so
you cannot make progress other than forcing the BxP trade, to convert to
KRK. But with a 'Pawnless penalty' that would only be +2.5, so the engine
refuses to do it unless the KRK mate is already within the horizon. (Which
it usually isn't at the fast games I do, so this easily won game ends in a
50-move draw...)

With this change Pair-o-Max beat the old Fairy-Max by 53.67% in 409 games
(here the statistical error is 2%), so I don't have to worry that it has
lost strength because the implemented changes slow it down too much (>90%
confidence). The more accurate scoring of the Bishop pair and recognition
of drawishness more than make up for it. The 3.67% excess score corresponds
to a superiority of 25 Elo.

With this version of Pair-o-Max I ran a Commoners vs Knights match,
replacing 2 Knights by 2 Commoners for one side in the FIDE setup. In half
the games I then swapped B and C of the Commoner side, to provide more game
variety. The Commoners player alternately had black and white, to elimiate
the white advantage, and in half the games black was given the first move,
also to drive up game variety.

After 393 games the Commoners are leading by 52.3%. This is just a bit
larger than the standard deviation, so barely significant. But, hen taken
at face value, the 2.3% excess corresponds to 16 centi-Pawn. And because
that is for a pair, it implies the Commoner is 8cP (+/- 7cP) stronger than
a Knight. This is consistent with the value of 333 I programmed for C
(where N=325). In an earlier run I had programmed C at 300, i.e. below N,
but when this run also had the Commoners winning (even more!), I changed
the value to mae it consistent, and redid the run. As usual, this did not
have a dramatic effect on the average score.

The test now runs on to increase the precision. I will start a second test
in parallel (now new-vs-old version is decided), for Commoners vs Bishops.

Jeremy Lennert wrote on Wed, Sep 26, 2012 03:27 PM UTC:
The increased knowledge of mating potential has raised the apparent value
of Commoner, then?

H. G. Muller wrote on Thu, Sep 27, 2012 09:06 AM UTC:
> The increased knowledge of mating potential has raised the apparent value
of Commoner, then?

It seems so. To be frank, I am not entirely sure if the previous value
determination was for 8x8 or 10x8 board. I did a lot of 10x8 measurements
for Great Shatranj, where Commoner is one of the pieces. I also remember
having done some tests with divergent K+N combinations, though, and that
was most certainly on 8x8. But I remember I also found then that 3 of the 4
combinations were equal, and only mNcK was 50cP stronger. [Edit] I looked it up, and the conclusion then was that Commoner was 30cP weaker than Knight. So in that case good handling of the mating potential does seem to have a significant effect. Perhaps I should redo these tests with various aspects of the new knowledge disabled, to see what helps most. [End Edit]

The Knights vs Commoners match is now at 777 games, and the lead of the
Commoners has dropped to 6 points. Which is an excess of only 0.4%. Against
a standard deviation of 1.4%, so totally insignificant.

After 338 games the B-pair vs Commoners is at 57.4%. The excess of 7.4%
(+/- 2.2%) is exactly half of the 15% Pawn-odds score I remember from the
previous version of Fairy-Max. This also points to exact equality of Knight
and Commoner, as B-pair is also worth 50cP more than Knights. (Kaufman
values, confirmed by my tests with the old version. Which in this case
should not matter much, as neither B nor N have mating potential, and
drawing tricks based on KNNK are excedingly rare (plus that Fairy-Max is
not likely to be able to win KBNK either, not knowing in which corner to
drive the bare King)).

Next I will probably do B-pair vs Commoners + Pawn, to check if the sore
eactly reverses. (Doing an implicit determination of the effect of Pawn
odds at the same time as more Bishops vs Commoners comparison.)

Jeremy Lennert wrote on Thu, Sep 27, 2012 04:31 PM UTC:
You might also consider repeating your experiment of adding mating
potential to a bishop.

Another consideration:  does the value of mating potential depend
significantly on how many other pieces already have it?  If you replaced
rooks on both sides with a similarly-valued but non-mating piece, does the
value of commoners relative to knights go up?  If you replaced the bishops
on both sides with a similarly-valued piece with mating potential, does it
go down?  I think Betza suggested once that it was important for a side to
have a piece with mating potential, but not so important how many pieces
had it.

H. G. Muller wrote on Thu, Sep 27, 2012 06:33 PM UTC:
Interesting suggestions. I will keep them in mind. Similar in value to
Rook, (+/- 25cP) but non-mating are Nightrider and the color-bound BD.
Unfortunately Nightrider is a bit troublesome in Fairy-Max, because it
allows mutual perpetual check, which in Fairy-Max leads to infinite
recursion. BD produces the problem that it is a second color-bound type,if
I also keep the Bishops, so that the possibility for color-bound
hetero-pairs will exist. The current drawishness code does not test for
that.

It might be important to add it, because at some point I will certainly
want to test BD to measure its pair bonus.

12-move leapers are usually close to Rook in value. Perhaps the NW would do
it; as a pure alternator it does not have mating potential.

Bishop-valued with mating potential could be a fWFA, or perhaps sWFA.

I stopped the Commoners-nights match at 910 games, with 1.3% advantage for
the Commoner pair. That is about 1 STD, so not really significant.

The B-pair beat the Commoners in 480 games by 56.5%

Jeremy Lennert wrote on Thu, Sep 27, 2012 08:06 PM UTC:
How does the inclusion of Nightriders lead to a mutual perpetual check?

Betza also believed the crooked bishop to be worth about a rook, but
that's also colorbound, so I suppose it would have the same problem as
BD.

The "aanca" (W>B bent rider) might also be close enough to be an
intersting test, if you want a long-range non-colorbound piece.  It's
almost certainly noticeably stronger than a rook, but should still be
closer to rook than queen.

Of course, those both assume your engine can handle nonlinear riders, which
may not be the case...

H. G. Muller wrote on Sat, Sep 29, 2012 08:30 AM UTC:
> How does the inclusion of Nightriders lead to a mutual perpetual check?

Sooner or later the engine encounters this motif in its search tree
(h=Nightrider):

h . . h
. . . .
. k . .
. . . .
. K . .
. R R .

Both kings can then move left-right, discovering checks on the opponent
with their Nightriders and Rooks. As checkks are extended in Fairy-Max
(i.e. it always searches all evasions when in check), it extends to infinit
depth.

Fairy-Max can be configured to do Crooked Bishops, but not Aanca. But I
could always change the code, of course. Yet is seems best to try WN first.
If both sides play with this piece in stead of R, it is not that important
how strong it is.

New results:

Commoners + Pawn vs B-pair (584 games) 58%

So the B-pair had an advantage of 7.5% against 2 Commoners, but when short
a Pawn they see that advantage reverse to -8%. That means they ae pretty
much halfway (and a Pawn is apparently worth 15.5%). This is actually the
same as Knights do against the B-pair. So the Commoners come out pretty
consistently now as exactly equal in value to Knight.

I also tried to test end-game value, by setting up positions like

1m4k1/ppp2ppp/8/8/8/8/PPP2PPP/1N4K1 w - -

with various permutations of k, m and n. This was won by the Commoner  in
932 games by 58.9%. (~56% of he games are draws there.) I have no idea yet
how much an extra Pawn would be worth in such a position, though. But even
a single Commoner seems to have a significant advantage over a Knight, in
such an end-game.

Jeremy Lennert wrote on Sat, Sep 29, 2012 05:35 PM UTC:
> h . . h . . . . . k . . . . . . . K . . . R R .

I'm not sure I follow this diagram, but I think I can now envision an
arrangement with the properties you describe.

Does the same thing still happen if you have nightriders BUT NOT rooks?  I
suppose you could substitute queens for the rooks, though that would
require a promotion...

H. G. Muller wrote on Sat, Sep 29, 2012 06:43 PM UTC:
Indeed, the display of tables is still not fixed, after the overhaul of the
site broke it. I would not be surprised if something similar was possible
with Bishops and Nightriders, though. The important thing is that the
angles between the slider rays are small enough that the Kings can be far
enough apart. With Rooks and Bishops the pattern would only work if the
Kings were on adjacent ranks, checking each other.

H. G. Muller wrote on Sun, Sep 30, 2012 11:29 AM UTC:
I now ran an end-game test of Commoner + 5 Pawns vs Knight + 6 Pawns (same
setups as with 6 vs 6 Pawns, but with the c- or f-Pawn deleted for the
Commoner (M) side. This ended in a 69.4% victory for the Knights. So N+P
have an advantage of 19.4%, while just a Knight has a disadvantage of 8.9%.
It seems a Pawn makes a difference of 28% at this late stage of the game,
and the Commoner is twice as close to N as it is to N+P. So
Commoner(end-game) = Knight + 0.33 Pawn (or ~360cP on the Kaufman scale).

So the value of the Commoner rises appreciably compared to that of the Knight when you reach the end-game. Perhaps this is what should be expected from a piece with mating potential. Or perhaps it is just because the Commoner  is so much more effective in annihilating Pawns.

I am now testing the same end-game setups, replacing the Knight by a Bishop.

H. G. Muller wrote on Mon, Oct 1, 2012 05:28 PM UTC:
Result for the Commoner vs Bishop end-game:

6 Pawns each: 61.7% (+/-0.9%) in favor of Commoner (879 games)
Commoner + 5 vs Bishop + 6: 63.4% (+/- 1.35%) in favor of B + P (729
games)

Again, the extra Pawn swings the result by about 25%. The Commoner seems
nearly 0.5 Pawn stronger than a Bishop. The statistical error is ~6 cP. 

So against a Commoner a Bishop seems less successful than a Knight in the
end-game. This could be because it has more difficulty winning games when
it creates an advantage, due to its color binding: two Pawns are easy to
stop by King + Commoner. if they just position themselves in front of the
Pawns on a color the Bishop cannot reach. This is unbreakable defense even
when the attacker calls both its King and its Bishop to the aid, because a
King cannot approach a Commoner either. (And there is no zugzwang, as you
can do moves with the King / Commoner in front of the Pawn that has no King
support.

So the defense is even easier than with unlike Bishops, because there you
have to worry that the Bishop might not be able to stop a Pawn supported by
its King, so the defending King has to keep opposing the attacking one.
Which it can usually do, as the Bishop can control squares in front of both
Pawns. A Knight can also not stop K+P, but if your King aids it in the
defense, there is nothing stopping the other Pawn, as the Knight usually is
too far away. So a defending Knight cannot easily exploit the color-binding
weakness of the Bishop, but a defending Bishop or Commoner can.

This is another case where the unapproachability of a Commoner makes it a
very strong defender. (The other is in KQKM, which is draw if King and
Commoner can protect each other before the Queen snipes off the Commoner
through a fork.)

Jörg Knappen wrote on Tue, Oct 2, 2012 03:14 PM UTC:
Here's an idea how to switch on the can-mate property without changing the moves of a given piece:

Can-mate Knight: Moves and captures as a normal FIDE Knight; but when the endgame KN vs. lone K is reached, it gives immediate check (and checkmate, if the lone King cannot capture it).

Switching off the can-mate property is not so easy. Just defining a Cannot-mate Rook as normal Rook, but when the endgame KR vs. lone K is reached, it it automatically a draw, unless the last capture gives checkmate -- seems to work, but in practice the stronger side will be keen to keep a pawn or two on the board and perform the mate with the full Rook before it is too late.


Jeremy Lennert wrote on Tue, Oct 2, 2012 05:39 PM UTC:
I wondered about that possibility, but I was concerned about endgames where
there are a couple of pawns stuck somewhere such that they couldn't
interfere with a normal mating strategy but where a weak piece that has
been artificially designated "can-mate" cannot capture them safely, and
therefore the game is technically not a KXK endgame.

Jörg Knappen wrote on Sun, Oct 7, 2012 10:39 AM UTC:
Here's the position for mutual perpetual check with bishops and
nightriders. You need two bishops on the same field colour (or a queen and
a bishop); a position with bishops on different colour does not exist
because the kings come too close to each other.

Bishop's team: Ba2, Bb1; K b3/c2

Nightrider's team: NN f8, NN h6; K e6/f5

... it just fits on an 8x8 board.

15 comments displayed

Earlier Reverse Order Later

Permalink to the exact comments currently displayed.