BB+ wrote:Chris Whittington wrote:Meanwhile every chess player will give a rook a BONUS for being on the open file, ZERO BONUS for being behind its own pawns, and a POSITIVE BONUS for being behind the enemy pawns
I'm not sure what you mean here by "behind", is it only on the same file? At least in rook endgames, being behind your (passed) pawn is quite useful. If by "behind the enemy pawns" you mean a general invasion criterion, then it seems that an easy implementation would have been to save some "penetration" demarcator in pawneval (either rank or square based, and can also include the openness of files), and then apply this to the rook.
Chris Whittington wrote:OK, your example. you know perfectly well that chess board pattern recognition as implemented by programmers are general purpose. Sure you can disrupt the tendency for the algorithm to put its rook on a specific file behind the enemy pawn chain by inserting a friendly pawn on a very advanced position on that same file. But what you are really trying to disrupt with this quite fanciful positioning (remember, we are discussing heavily blocked pawn frontages, with an open file penetration) is the argument that Rybka has a creative and original algorithm/pattern recognition, which is strongly superior. I''m shocked, Mark, that you stoop to this.
Some of the below (in #1) may have come from a discussion with others, I have put in (largely) my own words.
The feature tests for pawns in front and on the same file.
1) This has positive correlation to a general "penetration" criterion as a rook on the 7th/8th always gets the bonus, but it seems more likely that the "openness" of the file is its primary purpose. With penetration, the location of pawns off the tile would also be apt for consideration.
Consider, wRe1 wPf2 wPh6 bPe6 bPf7 bPh7 is scored the same as wRe5 wPf2 wPh2 bPe6 bPf7 bPh3 though the sense of penetration is quite different. This example can be made expanded, by whether the root pawn of a chain is attacked or attackable by the rook. The gazing only at pawns on the same file in front of the rook in these cases is only very weakly related to penetration. For most cases, determining whether the rook was behind many or all enemy pawns on any files, or just an enemy pawn on the same file, would better approximate penetration.
The claim that this feature is of consequent use on blocked boards is unclear too, for then the question would more often be whether the "invaded" side has any (pawn) weaknesses, and in addition whether said side can counterplay by the "open file" when the invader moves off it. Given the feature is immune to whether the file is actually "open", it doesn't form a sufficient locator for the rook. Also, the rook could more easily be in fact trapped in the situation.
2) I would be more willing to consider that the feature was some attempt at "pattern recognition" (on closed boards) if it had been done by a dopey academic. As it is, Rajlich is typically goal-oriented, and does not care about something like "implementing AI", but rather increasing ELO.
3) In its rook evaluation, Fruit does ABCDE where
- A is a calculation of mobility,
- B is a calculation of semi-open files,
- C is a calculation of open files,
- D checks whether to apply king-danger (material table flag), and if so calculates king safety with respect to semi/open files,
- E is a criterion concerning the 7th rank.
Comparatively, Rybka's rook evaluation is similarly ABCDE with the difference that the bitmasks for "semi/open files" are directional. This gives more weight to the expectation that the BC's are similar in content.
I guess one could similarly call mobility something like "future movement capacity", and note that this is a "different" notion in closed positions, and then argue that some implementation detail (like safe square mobility, or forward mobility) means that should not be classified under "mobility" at all.
Chris Whittington wrote:(remember, we are discussing heavily blocked pawn frontages, with an open file penetration)
I am still not sure of your specific example. As noted above, the weakness of enemy pawns/squares is also of importance with blocked positions in addition to penetration, and there is no test done (in Rybka) to see if in fact the pawn frontage is heavily blocked before applying the feature, which as I say makes it as best a weak correlative.
A number of points.
I'm surprised you need to know the meaning of rook behind pawn. It is common chess player (>patzer) parlance, and forms part of the Tarrasch Rule, for example.
In general, yes it means same file as pawn; is sided depending on pawn colour: bP a4 has "behind" squares a5,a6,a7,a8; wp a4 would use a1,a2,a3.
Perhaps many of "our" differences are due to you're being principally a programmer, whereas I principally think chess?
Your second drift is mostly Hyatt-lite. Querying whether the Rybka coding is of any use, or whether it has anomolies. Fortunately, you don't go so far as to say it's a bug
It is not relevant how effective the code is, how well written, whether or not Crafty gets more or less ELO. The only point is whether or not Fruit == Rybka.
I can see from your programmer perspective that this is "just a little mask change", or from Hyqtt's perpective "it's just a rook lift", or same view from Zach "doesn't happen very often" (he, like Hyatt is thinking only of R along 3rd rank to join in against the King.
From my chess perspective, I see a massive difference. Fruit code (this particular bit we discuss) knows that behind own pawns is not useful, but knows ONLY that open file is useful (I'll ignore half open for ease of less words). Once on the open file, Fruit just wants to stay there.
Rybka knows all this as well, except it doesn't test for open file at all, but it also knows the regions to the sides of the open file, to the rear of the enemy pawns is good to. This is extra chess knowledge. Add in the effect of what you call "half-open" and there's more knowledge, chess.
Can you visualise Rook-square tables, one for each possible pawn formation? I hope so!
Then visualise a typical chess game. Start with 8+8 pawns, then gradually to 7+7, 6+6, 5+5 .... open file count increases from 0 to 1 to 2 etc ... (yes, I know there are imbalances, but ignore for ease of words again). You visualise a heat map for the R-square tables? You'll get dark squares (stuck behind own pawns), red squares and pink squares. Very different Fruit/Rybka in terms of chess, no? Chessically, they don't compare. Chessically and programmer logically it is not even open file and half open file that is being measured. There's no comparison; 0.0 should be your little number. Unless one is total beancounter programmer, when the only focus is the mask (which is a bug hahahahahahahaha!!!).
You are comparing CHESS programs, but omit the chess. imo.
Thirdly, I find your listing ABCDE not logical from a chess perspective.
A is a calculation of mobility. This is basically first order and about the Rook
B is a calculation of semi-open files. Second order, it involves pawns. You can just about get away with listing it under rook (first order) because pawn structure is relatively static.
C is a calculation of open files. Second order, as B above.
D checks whether to apply king-danger (material table flag), and if so calculates king safety with respect to semi/open files. This is majorly other piece type dependent, third order, doesn't belong here.
E is a criterion concerning the 7th rank. First or second order because usually King dependent, but you can just about get away with it, because of relative static nature of the King.
imo, D does not belong in this list. And, how you list things is crucially important for shoehorning (or not) into the Fruit and other programs template. I raise objection therefore to the HOW of the listing decisions. Here and elsewhere, this is just one example.
For Rybka, B and C it does not do. They don't compare as chess playing components.
A is majorly common code, and, as shown many times, by the time the data representation is abstracted away, there's no "code" left, only an equation.
E is majorly common code too.
I don't accept any correspondence Rybka-Fruit as you describe it for the rook and pawns. Either the method falls into the simple and bleeding obvious category, or it is actually very different in a way you three researchers didn't seem to note.