chessjoker

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: chessjoker

Post by hgm »

mcostalba wrote:Once you have some working code, I'd be glad to see your solution. Please only working code, no bla bla. Thanks.
So what would you be willing to consider 'working code'? That it would be part of an engine that is able to beat you at this game? Even that would hardly mean that the code is efficient, or even correct. Incorporating the last to-square always in the hash key would obviously be inefficient if there were no Jokers, and also inefficient in the case of equal piece types, by mapping many identical game states to different hash keys, but the impact of that on playing strength would be pretty marginal... It would only carry a performance penalty, and never make any search errors. And even code that does make the original search error by faulty hash hits might not degrade the playing strength by a measurable amount, as Bob's experiments have shown. Ignoring the problem completely, and just hash positions with a different joker_alias to the same key, would still not be enough to make Fairy-Max crash or play illegal moves. So the standard hash code could already qualify as 'working code'...
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

To pass from 8x8 to 9x9 cells means to increase the complexity exponencially (no surprise for me that yet there aren't strong programs able to play in a 9x9 board :roll: ).

Moreover, the premonition of the jokers skill in, say, 6-7 movements is a extremely difficult matter. For a human player, too, naturally. But often, when the previsions are impossible or almost impossible, the human intuition wins again the logic deduction of a machine...

For this reason I was thinking that, at long time, Chessjoker should favorite the human player (though, after YEARS of human experience: at the beginning, machines will win always!!).

In any case, I think this variant is a big challenge for the algoritms in target to play very well, though the simpleness of the updates.
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

Some clarification of the rules is needed:

- after the move of a white Pawn, does the Joker move as a white or a black Pawn?
- when moving as a Pawn, what decides if the Joker can do a double step? Its location on the board, or whether it moved before?
- Can a Joker move in the first move of the game?
- How does it move if the previous move was with a Joker?

A remark on the board size:
with 9x9 all corners are the same color. So the Bishops are not equivalent, and with one of the KBNK is a win, with the other it is a draw. Are you sure this is what you want?

With 9x8 you would not have this problem, as there are corners of both colors.

The size itself is not really a problem. Chu Shogi is on 12x12, with 46 pieces each, and I also have an engine for that.
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

Ok Harm, I will post in two minutes the complete rules.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: chessjoker

Post by Greg Strong »

hgm wrote:A remark on the board size:
with 9x9 all corners are the same color. So the Bishops are not equivalent, and with one of the KBNK is a win, with the other it is a draw. Are you sure this is what you want?

With 9x8 you would not have this problem, as there are corners of both colors.

The size itself is not really a problem. Chu Shogi is on 12x12, with 46 pieces each, and I also have an engine for that.
I agree that 9x8 is what you want. In addition to the reasons H.G. gives, it is my experience that games with chess pawns don't work as well on boards with odd numbers of ranks (and I have played a ton of different chess variants...
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

Another interesting question is what to do after null move. My first guess would be that in the null-move reply a Joker should not be allowed to move at all. The assumption underlying null move is that you can always do some quiet move without tactical consequences. When the opponent has a Joker, 'activating' one of its undesired moves by moving the corresponding piece is a bit similar to unblocking an undesired opponent move. You just assume that there is something ore quiet you could do in stead. Same with activating the Joker; just imagine you moved another piece that would not have this move. If no such piece would exist (i.e. all conceivable Joker moves are dangerous), it is a form of zugzwang, and null move is not supposed to cope with that.

OTOH, it is a bit unsatisfactory the Joker can be completely frozen this way. That means it could not flee from an attack at all. But I guess that when you have such an attack, and it is really dangerous, you could have played it in stead of the null move anyway. The null move will never have created the attack.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: chessjoker

Post by mcostalba »

hgm wrote:
mcostalba wrote:Once you have some working code, I'd be glad to see your solution. Please only working code, no bla bla. Thanks.
So what would you be willing to consider 'working code'? That it would be part of an engine that is able to beat you at this game? Even that would hardly mean that the code is efficient, or even correct. Incorporating the last to-square always in the hash key would obviously be inefficient if there were no Jokers, and also inefficient in the case of equal piece types, by mapping many identical game states to different hash keys, but the impact of that on playing strength would be pretty marginal... It would only carry a performance penalty, and never make any search errors. And even code that does make the original search error by faulty hash hits might not degrade the playing strength by a measurable amount, as Bob's experiments have shown. Ignoring the problem completely, and just hash positions with a different joker_alias to the same key, would still not be enough to make Fairy-Max crash or play illegal moves. So the standard hash code could already qualify as 'working code'...
Ok, you gave up. I was sure of it.

At least do not blame a possible solution when you are far from able to do somehing better....or even comparable.
Arpad Rusz
Posts: 273
Joined: Sat Apr 17, 2010 2:34 pm
Location: Budapest

Re: chessjoker

Post by Arpad Rusz »

I propose a variant on the 8x8 board with two jokers for each side replacing the a and h pawns.
On the first move jokers move like pawns, so starting moves like 1.Ja2-a3 or 1.Jh2-h4 are legal.
A possible opening is: 1.e2-e4 e7-e5 2.Ng1-f3 Ja7-c6!
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

Ok, here the complete rules of Chessjoker

• Rule 1 (general rule): There is just one piece more for player: the joker. Disposition is that you can see here:

http://www.bubok.es/libros/231097/Chess ... n-giullare

Rule is: the joker moves as the last piece moved by the opponent player. I will say brefly that the joker "imitates" that piece.

Ex: Black has moved a knight, so the joker of the White imitates now a knight. However, White decides to move a bishop. After this movement, the black joker imitates a bishop. After, Black decides to move just its joker. After this movement, the white joker imitates just the actual value of the black joker: a bishop, in this case.

• Rule 2 (castling rule): There is just one type of castling: after the castling, white king will be in b1 or h1; black king will be in b9 or h9. Any other rule about castling descends fron the traditional FIDE rules of castling.

• Rule 3 (pawn imitation). When the joker imitates a pawn (because the opponent player has moved a pawn), it can always do just ONE step forward (even in the first or second raw. This is just to semplify). In the last raw, the joker-pawn does not promote and it remains blocked (because it cannot move, neither eat) until the opponent player moves something different by a pawn.

NO MORE RULES!!

But some important redondances:

• White cannot begin the game moving the joker: its imitation value is undefined.
• When the joker imitates the king, it cannot suffer a check, castling... ; the imitation is just movement imitation, without identification.
• If a player does a castling, the imitation value for the opponent joker will do a king (not a rook).
• If a player plays a joker, he assigns just its actual imitation value to the opponent joker.
• If a player promotes a pawn to a new piece, he assigns to the opponent joker just the imitation of the promoted piece (often the queen, so. Note that this feature is so interesting for the joker skill).
• It is possible to promote a pawn to a joker (in the paper, two cases in which it is the best thing to do). Naturally, the promoted joker will imitate the last piece moved by the opponent. Also, if a player promotes a pawn to joker, he assigns the actual imitation value of its joker to the opponent joker.
• A player cannot move (or promote a pawn with) any piece who assigns to the opponent joker an imitation value able to put in check its king.
This (perfectly consequent) feature is very important in this new game: the joker can "inhibit" very strongly the opponent movement of important pieces: for example queen and rooks at the same time (more in the paper).

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

Re: chessjoker

Post by hgm »

mcostalba wrote:Ok, you gave up. I was sure of it.
It always puzzles me why you draw such insane conclusions out of completely normal request for clarifying your highly vague and ambiguous statements.

What exactly am I supposed to have given up? The hope that you would be able to understand it?
At least do not blame a possible solution when you are far from able to do somehing better....or even comparable.
The superior solution was of course already given by me many posts ago. The perfectly natural one. Encode the extra game-state component, i.e. the current Joker state, into the hash key when there are one or more Jokers that move by it. Just like you encode the e.p.square in the key when there are one or more Pawns that can exploit it. Nothing new, nothing weird, no loop... That you are to thick to understand that, is not my fault!