Check out Glinski's Hexagonal Chess, our featured variant for May, 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 ]

Single Comment

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.