Looking for C developper

Discussion of chess software programming and technical issues.

Moderator: Ras

Ralph Stoesser
Posts: 408
Joined: Sat Mar 06, 2010 9:28 am

Re: Looking for C developper

Post by Ralph Stoesser »

carldaman wrote: Only human players will care about and benefit from improved play in closed positions.:)
Nooo. Why do you think so? In a perfect world where that knowledge is correctly implemented and doesn't slow down eval, engines that have that knowledge would always benefit. They would destroy engines that don't have the knowledge in a much more sophisticated way than humans are able to do, because they are much stonger players overall. They would not always try to end up in closed positions, because they don't have knowledge about their opponent's weaknesses, but for sure that knowledge would help them to make more points in a direct engine to engine competition. F. i. sometimes they would end up in a KID-like position (on purpose or from book) and you know what that means ... :)
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: <improved play in closed positions>

Post by carldaman »

Ralph Stoesser wrote:
carldaman wrote: Only human players will care about and benefit from improved play in closed positions.:)
Nooo. Why do you think so? In a perfect world where that knowledge is correctly implemented and doesn't slow down eval, engines that have that knowledge would always benefit. They would destroy engines that don't have the knowledge in a much more sophisticated way than humans are able to do, because they are much stonger players overall. They would not always try to end up in closed positions, because they don't have knowledge about their opponent's weaknesses, but for sure that knowledge would help them to make more points in a direct engine to engine competition. F. i. sometimes they would end up in a KID-like position (on purpose or from book) and you know what that means ... :)
Of course, I agree -- it would be better if engines improved their play in closed positions AND gained overall Elo at the same time, with better play in engine-engine AND engine-human play. (My point was that humans would benefit from a more well-rounded engine, even if it didn't gain Elo overall.)

In fact, I'm seeing that Stockfish now destroys other engines in the KID, from both sides of the board! Some of its attacks with Black are pure masterpieces. The only catch is that this happens in test suite matches (such as the Noomen KID suite) and SF still needs better eval to guide it INTO these positions from where it can outplay its opposition with impunity.

The pattern I see is that SF initially rates Black's position as worse in the KID, but then, interestingly, SF can gradually improve Black's position through its deep search, and before you know it, the other engines have no idea what hit them.

So, for now, SF is still relying a bit too much on its search to overcome some deficiencies in eval, although the eval has been definitely improving over the last few months. What I'd like to see is continued improvement in eval, to the point where SF will rate Black's chances in the KID higher, so it can actually steer the game into this type of positions earlier and more frequently.

Regards,
CL
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Marseillais Chess

Post by Greg Strong »

Sven Schüle wrote:
Greg Strong wrote:
hgm wrote:
Greg Strong wrote:The stated rule from the Encyclopedia makes sense to me, and was credited, at least partially to Alekhine, so I'd be inclined to go with that.
So what if the e.p. square was occupied in the second leg? Can you capture both the piece on in and the Pawn in your first step?
Good question! That situation isn't mentioned, but I'd say yes. It doesn't say you can't, and I think this goes along with the spirit of the rule. If a player really wants to make sure his pawn isn't captured e.p. he can still do it but it costs him both moves (making two single-steps.)
The spirit of the rules of Marseillais chess could also be understood such that each single move itself ("leg" to use HGM's wording) is a standard chess move. But after White's d2-d4/Qd1-d3, for instance, Black's e4xd3 e.p. would capture two pieces at once: Pd4 (captured en passant) and Qd3 (captured just because the queen happens to be on the e.p. target square), and this is not like standard chess. You can define the rule like that, or you can define it differently, but at least you need to define it (and there needs to be consensus about it of course) otherwise the rules are ambiguous and leave room for interpretation. That was the main point of the "chessvariants" link I quoted in a previous posting: clean up ambiguities.

Would the following be a possible "compromise solution" (text based on Wikipedia entry, with my additions in bold)?

"En passant capture is allowed even if the opponent moved the corresponding pawn on the first move of the previous turn. However, en passant capture must be made on the first move of the turn. When two pawns can be captured en passant after opponents move, both of them can be captured. As a further restriction, en passant capture is not allowed if its target square is not empty."

This would keep the "spirit of the e.p. rule" in general while avoiding to add a "non-chess move" that captures two pieces at once. In case of my example above, Black could still capture the Qd3, of course. And the blocking piece is always at least a minor piece, so capturing "only" a minor piece but not an additional pawn should not hurt.

What do you think?

The other proposal of allowing en passant capture after pawn double steps in the second leg only is fine for me as well, and even more simple than my proposal.

EDIT: Maybe this sub-thread should become a separate thread about Marseillais Chess, provided the OP agrees?

Sven
I've been mulling this over and I don't think I agree. I certainly agree that, in the spirit of Marseillais Chess, each "leg" should, ideally, be Chess-like. Unfortunately, where it meets en passant, it becomes difficult. I think the origination of the problem is that en passant itself is fundamentally un-chesslike (capture not by replacement.) The rule was made from necessity because, with the two-space pawn move, to allow a pawn to "run by" the enemy pawn unopposed was even more un-chesslike. It was considered a necessary concession to allow the two-space pawn move.

Now we add double moves, also inherently un-chesslike, but we go with it because it because it's a fun variant :) But when we combine double-move with en passant, I guess it's not surprising that we get more un-chesslike results. The fundamental purpose of en passant is to prevent pawns from running past the opposing pawns. It doesn't make sense to me to now allow a player to get away with running past the opposing pawns by exploiting another un-chesslike element, (a second move.) Yes, en passant in this probably very unlikely scenario would allow capture of two pieces at once, the second capture is capture-by-replacement, which is totally chesslike. Because one move happens to capture two pieces at once, both of which are the normal results of that one move in standard chess, it is illogical to me to ban it on the basis that capturing two pieces at once is un-chesslike. There is no rule in chess forbidding capturing two pieces at once - the rules just happen to be such that it isn't possible. Your talking about adding a new rule, increasing the complexity of Marseillais Chess. I think we should avoid this unless necessary and in my mind it's not only unnecessary but also undesirable as it weakens en passant.
User avatar
hgm
Posts: 28402
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Marseillais Chess

Post by hgm »

A similar problem of poorly defined rules occurs in Chu Shogi. There are several approaches to this:

* Use the historically correct rules
* Use the rules that the current community of players is using
* Make up your own rules
* Support several rule sets as a user-configurable option

As to the logic of the matter: note that e.p. capture most-likely originated as the right to veto the second step of a double move. A PxP capture was apparently seen as an even of so much importance that it should not be possible to dodge it by double moving. The same applies to the other double-move (or is it really a triple move?) in Chess: during castling you are not allowed to pass through check.

Now in Marseillaise Chess double moves have become the standard. But we see exactly the same happen: you are not allowed to move into check in the first leg, even when you planned to move out of it again in the second! It also works the other way: when you check the opponent in the first leg, it ends your turn. King-capture is considered such an important an event that it prevails over the right to play more legs.

E.p. capture applies the same logic to normal Chess, with the extra restriction that the capture now is optional. (No one would of course refrain from capturing a King.) Extending this logic to Marseillaise Chess would make it such that Pawn double pushes should be broken into two steps, so that you can have 3- or 4-leg moves, but that when in any stage of this you subject the moved Pawn to PxP the opponent has the right to jump up, and say "stop here, I want to capture it". In other words, when the first Marseillaise leg exposes you to e.p. capture, and the opponent wants to make it, you should not get a second leg at all. And when he does a double-push in the first leg where he could be taken on the final square of that leg through PxP, he should also not get a second leg if the opponent wants to capture.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Marseillais Chess

Post by Greg Strong »

hgm wrote:A similar problem of poorly defined rules occurs in Chu Shogi. There are several approaches to this:

* Use the historically correct rules
* Use the rules that the current community of players is using
* Make up your own rules
* Support several rule sets as a user-configurable option

As to the logic of the matter: note that e.p. capture most-likely originated as the right to veto the second step of a double move. A PxP capture was apparently seen as an even of so much importance that it should not be possible to dodge it by double moving. The same applies to the other double-move (or is it really a triple move?) in Chess: during castling you are not allowed to pass through check.

Now in Marseillaise Chess double moves have become the standard. But we see exactly the same happen: you are not allowed to move into check in the first leg, even when you planned to move out of it again in the second! It also works the other way: when you check the opponent in the first leg, it ends your turn. King-capture is considered such an important an event that it prevails over the right to play more legs.

E.p. capture applies the same logic to normal Chess, with the extra restriction that the capture now is optional. (No one would of course refrain from capturing a King.) Extending this logic to Marseillaise Chess would make it such that Pawn double pushes should be broken into two steps, so that you can have 3- or 4-leg moves, but that when in any stage of this you subject the moved Pawn to PxP the opponent has the right to jump up, and say "stop here, I want to capture it". In other words, when the first Marseillaise leg exposes you to e.p. capture, and the opponent wants to make it, you should not get a second leg at all. And when he does a double-push in the first leg where he could be taken on the final square of that leg through PxP, he should also not get a second leg if the opponent wants to capture.
I think we should, ideally, go for option 2 - "Use the rules that the current community of players is using" and I think this is best decided by the active community of Marseillais players. Unfortunately, I know of no such community. Chessvariants.org might be the more appropriate place to decide this (despite the fact that that site has dwindled down to only a few prolific inventors and virtually no players of established games such as this.)

I agree with your logic, H.G., but this puts us squarely in the "Make up your own rules" category which I don't like and don't see as necessary. Your suggestion also has the problem of being (probably) not implementable without xboard protocol changes and very complicated for engine developers. It would be cleaner to just forbid making a two-space pawn move subject to en passant with a player's first move, and I think this is logical and sensible. But there's no history of this that I'm aware of so we would basically be making a different game.

P.S. For an interesting example of a revised Marseillais that restricts the moves a lot more, see Fergus Duniho's Extra Move Chess.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Marseillais Chess

Post by Sven »

Greg Strong wrote:
Sven Schüle wrote:Would the following be a possible "compromise solution" (text based on Wikipedia entry, with my additions in bold)?

"En passant capture is allowed even if the opponent moved the corresponding pawn on the first move of the previous turn. However, en passant capture must be made on the first move of the turn. When two pawns can be captured en passant after opponents move, both of them can be captured. As a further restriction, en passant capture is not allowed if its target square is not empty."

This would keep the "spirit of the e.p. rule" in general while avoiding to add a "non-chess move" that captures two pieces at once. In case of my example above, Black could still capture the Qd3, of course. And the blocking piece is always at least a minor piece, so capturing "only" a minor piece but not an additional pawn should not hurt.
[...] There is no rule in chess forbidding capturing two pieces at once - the rules just happen to be such that it isn't possible.
That is your interpretation. It might as well be the other way round: the chess rules are intentionally made such that capturing two pieces at once is not allowed. That is another possible interpretation - not necessarily mine, just to show that a statement "there is no rule forbidding ..." is practically useless. You often have two ways to understand rules: either "everything that is not explicitly forbidden is allowed", or "everything that is not explicitly allowed is forbidden". In games like chess, with very strictly defined rules as far as the moving of pieces is concerned, you definitely meet the second way. So the chess rules in their entirety form a system that describes (almost) exactly what is allowed, and then nothing else is allowed. You could say that there is no rule forbidding to move a queen from d2 to c6 on Tuesday morning at 5 a.m. Well, you would be right in general since exactly that phrase can't be found in the rules, but there is a rule that describes how a queen moves, and that rule is made just to ensure that the queen moves horizontally, vertically or diagonally but never like d2-c6. So that is implicitly forbidden, even on Tuesday morning at 5 a.m :-)
Greg Strong wrote:Your talking about adding a new rule, increasing the complexity of Marseillais Chess. I think we should avoid this unless necessary and in my mind it's not only unnecessary but also undesirable as it weakens en passant.
It is necessary in order to avoid having to allow a capture of two pieces at once with one move. In fact you would even allow to capture up to three pieces in one "double" move of Marseillais Chess, e.g. d2-d4/Qd1-d3, e4xd3/d3xc2 (or any other capture in the second leg). And I do not see why you think that disallowing en passant in this very special case "weakens" anything. Let me repeat: the case we are talking about means that White (in this example) makes a double pawn step and then blocks the newly created en passant target square with a minor or major piece (it cannot be a pawn obviously). So while the "double capture" would win the pawn (e.p.) and the minor or major piece, the "restricted" capture is not much restricted at all since it captures the minor or major piece. In my example e4xd3 would be still allowed, it just would not be en passant and normal capture at the same time but "only" a normal capture. So where is the downside? What is weakened? Black wins a piece, so there is not much relevance of not being allowed to also capture en passant. It would be most obvious to play like that. "En passant" to a non-empty square appears ugly and very unusual to me, and due to the fact that the non-empty square holds at least a minor piece there is no need for the "double" capture. "En passant" wants to avoid that the opponent double-steps his pawn and gets away with it. In our case you do not get "en passant" but you get more instead!

The other proposals, e.g. to disallow en passant after a double step in the first leg (as mentioned on the chessvariants page) or to disallow the second leg at all after a double pawn step so that the en passant ambiguity can't occur (as I understood HGM), seem to be much more restrictive than my proposal.

Sven
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Marseillais Chess

Post by Greg Strong »

Sven Schüle wrote:That is your interpretation. It might as well be the other way round: the chess rules are intentionally made such that capturing two pieces at once is not allowed. That is another possible interpretation - not necessarily mine, just to show that a statement "there is no rule forbidding ..." is practically useless. You often have two ways to understand rules: either "everything that is not explicitly forbidden is allowed", or "everything that is not explicitly allowed is forbidden". In games like chess, with very strictly defined rules as far as the moving of pieces is concerned, you definitely meet the second way. So the chess rules in their entirety form a system that describes (almost) exactly what is allowed, and then nothing else is allowed. You could say that there is no rule forbidding to move a queen from d2 to c6 on Tuesday morning at 5 a.m. Well, you would be right in general since exactly that phrase can't be found in the rules, but there is a rule that describes how a queen moves, and that rule is made just to ensure that the queen moves horizontally, vertically or diagonally but never like d2-c6. So that is implicitly forbidden, even on Tuesday morning at 5 a.m :-)
Ok, trying to read inferences about double-capture into standard chess rules is philosophical and maybe pointless, but I don't think that was the major component of my argument (at least I didn't mean it to be.) But I would say the current rule for Marseillais stated in Pritchard's Encyclopedia says that en passant is allowed, and in chess this move would certainly capture the other piece by replacement. I consider the Marseillais en passant rule given to be consistent with both the spirit of orthodox chess and en passant, so I personally consider the capturing of both pieces perfectly consistent with a double-move extension of orthodox chess.
Sven Schüle wrote:
Greg Strong wrote:Your talking about adding a new rule, increasing the complexity of Marseillais Chess. I think we should avoid this unless necessary and in my mind it's not only unnecessary but also undesirable as it weakens en passant.
It is necessary in order to avoid having to allow a capture of two pieces at once with one move. In fact you would even allow to capture up to three pieces in one "double" move of Marseillais Chess, e.g. d2-d4/Qd1-d3, e4xd3/d3xc2 (or any other capture in the second leg).
Yup. It would allow capture of three pieces in this convoluted case where the opponent played a really, really bad move that one one would ever make.
Sven Schüle wrote:And I do not see why you think that disallowing en passant in this very special case "weakens" anything. Let me repeat: the case we are talking about means that White (in this example) makes a double pawn step and then blocks the newly created en passant target square with a minor or major piece (it cannot be a pawn obviously). So while the "double capture" would win the pawn (e.p.) and the minor or major piece, the "restricted" capture is not much restricted at all since it captures the minor or major piece. In my example e4xd3 would be still allowed, it just would not be en passant and normal capture at the same time but "only" a normal capture.
It weakens en passant in the sense that the player would be able to get the pawn past the enemy line without the possibility of recapture by sacrificing a different piece.
Sven Schüle wrote:So where is the downside?
You are proposing making a new rule to prevent something that no reasonable player would allow to happen in the first place. Don't get me wrong, I'm not totally opposed to your proposal - it just seems pointless to me and I don't personally consider your argument that capturing two pieces must be strictly forbidden to be all that convincing.
Sven Schüle wrote:The other proposals, e.g. to disallow en passant after a double step in the first leg (as mentioned on the chessvariants page) or to disallow the second leg at all after a double pawn step so that the en passant ambiguity can't occur (as I understood HGM), seem to be much more restrictive than my proposal.
Agreed, and I'm not suggesting we go with them. If I could go back in time and suggest to the creators any rule it would be this: A player cannot make a two-space pawn move for his first move if it would be subject to en passant capture. That would solve this issue and further eliminate the need for the extra rule that the other player can perform an en passant capture with his second move if he is performing two en passants. This is the fix that is most pleasing to me, but there is no historical basis for it. I would still suggest it if a significant community of Marseillais players was debating this and we could get a majority of the community to agree. But as it is it appears to be just the three of us. If we are going to make a Marseillais engine, we need to nail it down, but I don't see a strong case for us to make any rules.
User avatar
hgm
Posts: 28402
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Marseillais Chess

Post by hgm »

Another question we could ask is: "what is the purpose of e.p. capture, why is such a relatively complex rule needed at all?". In orthodox Chess this is clear: you don't want a (white) Pawn on the 2nd rank that is stopped only by a (black) 4th-rank Pawn on a neighboring file to be a passer.

In Marseillaise Chess this case is much weaker. If I can push the Pawn one step in the first leg, and another step in the second leg, and I have passed it. Either form of the e.p. rule (modern or historic) does not prevent that, and can thus be considered a failure. In fact the problem does not only occur for 2nd-rank Pawns, but for more advanced Pawns as well. They can slip by an oposing Pawn in a neighboring file that is a Knight jump away.

Of course you can argue that the range of Pawns is larger in Marseillaise Chess, and that it is normal that when you can capture an opposing Pawn, you can also pass it. But then e.p. capture in orthodox Chess is needed because a double-push is only allowed as two successive non-captures, and not as non-capture followed by capture. In Marseillaise Chess you could do that (although it would cost you both legs of your turn). In Marseillaise Chess a 2nd-rank Pawn could even capture a 5th-rank Pawn in two legs. So one could argue that it is quite normal if you passed one. Conventional e.p. capture thus seems to serve no purpose at all in Marseillaise Chess. This suggests it should simply be dropped altogether.

This leads me to another ambiguity of the historic e.p. rule: What if I do a double-push followed by a non-capture of the same Pawn (e.g. e2-e4-e5). Am I now still allowed to capture that Pawn e.p., through f4xe3? What if he captured something in his second leg (e2-e4xd5)? When I e.p.-capture d5 now through f4xe3, will I get the captured piece back on d5?
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Marseillais Chess

Post by Evert »

hgm wrote:Another question we could ask is: "what is the purpose of e.p. capture, why is such a relatively complex rule needed at all?". In orthodox Chess this is clear: you don't want a (white) Pawn on the 2nd rank that is stopped only by a (black) 4th-rank Pawn on a neighboring file to be a passer.

In Marseillaise Chess this case is much weaker. If I can push the Pawn one step in the first leg, and another step in the second leg, and I have passed it. Either form of the e.p. rule (modern or historic) does not prevent that, and can thus be considered a failure. In fact the problem does not only occur for 2nd-rank Pawns, but for more advanced Pawns as well. They can slip by an oposing Pawn in a neighboring file that is a Knight jump away.

Of course you can argue that the range of Pawns is larger in Marseillaise Chess, and that it is normal that when you can capture an opposing Pawn, you can also pass it. But then e.p. capture in orthodox Chess is needed because a double-push is only allowed as two successive non-captures, and not as non-capture followed by capture. In Marseillaise Chess you could do that (although it would cost you both legs of your turn). In Marseillaise Chess a 2nd-rank Pawn could even capture a 5th-rank Pawn in two legs. So one could argue that it is quite normal if you passed one. Conventional e.p. capture thus seems to serve no purpose at all in Marseillaise Chess. This suggests it should simply be dropped altogether.
Exactly what I was thinking myself.

I would actually argue that the reason it exists in normal chess (so a second-rank pawn is not a passer as long as there is an enemy pawn on a neighbouring file and on the fourth rank) isn't a very strong reason at all - if I know that the pawn becomes a passer once I push my own pawn to (my) fifth rank, I'd better keep it on (my) fourth rank, hadn't I? Of course, that changes the game (I need to hold back on advancing my pawns as much as I might like, I get less space, etc), but it's not immediately obvious to me that it would change it for the worse. That's an entirely orthogonal discussion though.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Marseillais Chess

Post by Evert »

Greg Strong wrote: I think we should, ideally, go for option 2 - "Use the rules that the current community of players is using" and I think this is best decided by the active community of Marseillais players. Unfortunately, I know of no such community. Chessvariants.org might be the more appropriate place to decide this (despite the fact that that site has dwindled down to only a few prolific inventors and virtually no players of established games such as this.)
I think chessvariants.org could benefit from a facelift and technology upgrade, because it's a great resource and it seems such a shame that it's as dormant as it is.

Having a proper discussion forum, a (better) interface for playing games and maybe wikifying (and unifying) the entries could really help. It'd be an aweful lot of boring work though (especially considering that it should probably be done without losing either the functionality that is there, or breaking existing links to articles).