chessjoker

Discussion of chess software programming and technical issues.

Moderator: Ras

Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

Great Harm,

I will test the game in these days and after I will tell you my impressions. Now for me is better the bed...

Thank you very much again!
Grazie moltissime sei un genio!!:wink:

Pippo
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

Actually this is seems a bug in the WinBoard development version. It sends a spurious 'go' command to the engine, because of which it changes side, (as it should), produces a move, which is then refused by WinBoard because it wasn't the engine's turn. After which things are completely stuck, because GUI and engine no longer agree on whose turn it is.

I thought I fixed that bug some time ago, but apparently it is still in the version I have on my website.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: chessjoker

Post by Evert »

Pippo wrote: no, Evert! joker cannot SUFFERS a check (when it imitates the king) because it isn't the king. It can normally give check to the opponent king. Imitation value of jokers always is known!
How does that work then? I'm only in check if you would be able to capture my king if it were your turn. Because I haven't moved yet, you don't yet know how the joker will move on your next turn, therefore you don't yet know whether you would be able to capture my king.

You can say that the move of the joker persists to the beginning of your next turn rather than the beginning of mine, but that is an extra rule that needs to be defined explicitly. Personally I think it would be a mistake...
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

OK, you should download the new version of

http://hgm.nubati.net/WinBoard-4.8.beta.zip

This solves the problem of the spurious 'go' command, that was sent because WinBoard thought that the engine was in force mode after setting up a position, while that was in fact the case in the previous game. (It forgot to reset that condition when sending a 'new' command.)

Machine White, Black and Two Machines now all seem to work. After a Pawn move from the machine the Joker can be moved as a Pawn, as it should be.
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

Evert wrote:
Pippo wrote: no, Evert! joker cannot SUFFERS a check (when it imitates the king) because it isn't the king. It can normally give check to the opponent king. Imitation value of jokers always is known!
How does that work then? I'm only in check if you would be able to capture my king if it were your turn. Because I haven't moved yet, you don't yet know how the joker will move on your next turn, therefore you don't yet know whether you would be able to capture my king.

You can say that the move of the joker persists to the beginning of your next turn rather than the beginning of mine, but that is an extra rule that needs to be defined explicitly. Personally I think it would be a mistake...
Hello Evert,

until you don't move, my joker persists in the last imitation value. This is ok, it isn't?

Now: you cannot move a piece that assigns to my joker an imitation value able to put in check your king!

Ex: my joker, imitating a bishop, is in front your king (for example: my joker is in b3, your king in b8 with no pieces between). It is your tourn: you cannot move the queen, neither a rook! This is what I call "inhibition"; it is very importan: if I attack your queen at next movement (with immutate situation joker-king) you lost your queen because she does not escape.

Is it clair now?

Saluti, Pippo

PS I did not previde the "null movement" because it is not legal!!
User avatar
hgm
Posts: 28353
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

Evert wrote:How does that work then? I'm only in check if you would be able to capture my king if it were your turn. Because I haven't moved yet, you don't yet know how the joker will move on your next turn, therefore you don't yet know whether you would be able to capture my king.
There is another subtle consequence of the checking rules, which is castling. In the current Fairy-Max implementation (which follows Evert's interpretation) a black Joker that just moved Je5-g3 (imitating B or Q) would not suspend white's right to castle, because after Ke1-b1 the Joker will imitate a King, and can thus not move to e1. The same would hold for a Joker that would be 'looking at' b1 after Jb5-d3: you can safely castle to b1. In this interpretation Jg3 merely pins all white B, Q and J, but does not deliver check.

The other interpretation would say Jg3 is attacking e1 and thus checking, and moves with P, N, R or K merely resolve the check. In this interpretation the castling should be forbidden.

Similar, but even more controversial situations can occur when the Joker would (after a B imitation) be on f3 or e3, looking at d1 or c1, respectively. Would castling then be 'passing through check', and thus forbidden? Note that white has already started moving his King by the time it reaches d1 or c1. So would the imitation value of the Joker change when I pick up my piece, or when I put it down?

If the imitation value would change only on releasing the piece, the most ambiguous of all would be when Jc3 looks at b1. After releasing the King it could be safely on b1, but in order to get to the release point, should it be considered passing through check on b1, like it would have when the Joker had been looking at d1 or c1?

Note that the 'change on release' rule would also affect regular pins. Suppose white's King is on e1, a Joker imitating a Bishop on g3, and I have a white Pawn on f2. Can I now move f2-f4? If the Joker is a Bishop until after I pick up the Pawn, it would have free view on my King, so I would be 'passing through check' during this move. Although after the move I am of course safe, as the Joker now imitates a Pawn.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: chessjoker

Post by Michel »

Now: you cannot move a piece that assigns to my joker an imitation value able to put in check your king!
Ok this is clear. A joker move does not give check by itself. But it inhibits enemy moves that would put the enemy king in check due to the imitation behaviour.

EDIT: I would vote for the change on release rule.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: chessjoker

Post by Evert »

Pippo wrote: until you don't move, my joker persists in the last imitation value. This is ok, it isn't?
It works, but you need to explicitly define it this way - and as I said, I think it's a mistake because it leads to very strange and counter-intuitive situations. In short, I think it makes the rules not be self-consistent.

Say I move my queen, then you check me with your joker. You say the joker still moves as a queen, therefore I am in check and need to do something about it. So I move a knight somewhere on the other side of the board. Now your joker moves as a knight, and therefore I am no longer in check. In fact, the only way I would still be in check (thus making my last move illegal) would be if I moved a queen (or rook, or bishop) in such a way that your joker still attacks my king - but then it doesn't matter at all if it was also moving as a queen on the last move.

Perhaps it only makes a practical difference in things like the KJvK ending.
Ex: my joker, imitating a bishop, is in front your king (for example: my joker is in b3, your king in b8 with no pieces between). It is your tourn: you cannot move the queen, neither a rook! This is what I call "inhibition"; it is very importan: if I attack your queen at next movement (with immutate situation joker-king) you lost your queen because she does not escape.

Is it clair now?
You cannot put yourself in check, that's obvious. But that isn't the situation I'm referring to.
Michel
Posts: 2292
Joined: Mon Sep 29, 2008 1:50 am

Re: chessjoker

Post by Michel »

I do not see why you consider this a problem. It is no different from a joker "attacking" a queen. The attack is only virtual since the joker will change into a different piece after the enemy moves.
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

hgm wrote:
Evert wrote:How does that work then? I'm only in check if you would be able to capture my king if it were your turn. Because I haven't moved yet, you don't yet know how the joker will move on your next turn, therefore you don't yet know whether you would be able to capture my king.
There is another subtle consequence of the checking rules, which is castling. In the current Fairy-Max implementation (which follows Evert's interpretation) a black Joker that just moved Je5-g3 (imitating B or Q) would not suspend white's right to castle, because after Ke1-b1 the Joker will imitate a King, and can thus not move to e1. The same would hold for a Joker that would be 'looking at' b1 after Jb5-d3: you can safely castle to b1. In this interpretation Jg3 merely pins all white B, Q and J, but does not deliver check.

The other interpretation would say Jg3 is attacking e1 and thus checking, and moves with P, N, R or K merely resolve the check. In this interpretation the castling should be forbidden.

Similar, but even more controversial situations can occur when the Joker would (after a B imitation) be on f3 or e3, looking at d1 or c1, respectively. Would castling then be 'passing through check', and thus forbidden? Note that white has already started moving his King by the time it reaches d1 or c1. So would the imitation value of the Joker change when I pick up my piece, or when I put it down?

If the imitation value would change only on releasing the piece, the most ambiguous of all would be when Jc3 looks at b1. After releasing the King it could be safely on b1, but in order to get to the release point, should it be considered passing through check on b1, like it would have when the Joker had been looking at d1 or c1?

Note that the 'change on release' rule would also affect regular pins. Suppose white's King is on e1, a Joker imitating a Bishop on g3, and I have a white Pawn on f2. Can I now move f2-f4? If the Joker is a Bishop until after I pick up the Pawn, it would have free view on my King, so I would be 'passing through check' during this move. Although after the move I am of course safe, as the Joker now imitates a Pawn.
Ok Harm, your doubts indicate that you are in the right way...:D

In fact all your doubts vanish if you consider the classic FIDE rules.
In effect, change occurs when the piece is released. But it is should not exagerate, just as in FIDE interpretation!

1. Under check (of a joker or not) you can't castling.
2. If an opponent joker "looks at" a cell in which the king is passing when castling, castling is also forbidden. Just as it were a real bishop: this is forbidden in FIDE, though the castling could stop the check.
3. If the opponent joker-bishop looks at b1, effectively, castling is possible!! Really, I did not consider this case before! But it is so, we can't change! We have to attend to the three new rules+FIDE.
4. Similar situation to 3.: Joker in b3, imitating rook, check the opponent king in b8 (no pieece between). The king can stop the check just doing one step forward in b7!! Because, now, the joker is transformed in a king-like and does not check anymore. There are many other courious situation that I describe in the paper: I have to translate urgently it!
5. The last doubt you solve with a easy standard situation. Consider a rook that check your king and you wants to stop the check putting a bishop in shield. While you move the bishop, the check persists but you can do the movement. Or you should eat the queen with a knight: while it is moving the check persists, but the matter is the final situation.
So it is legal to move that pawn. Weird situations only exist in castling.

Resuming: always we have to consider the final situation (I mean: "released piece"). Except in the case of castling (as is in FIDE).

Best regards, P.