chessjoker

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: chessjoker

Post by Pippo »

So Harm, it means that you has already got Chessjoker?
In an 9x8 board? Wonderfull!!

I'll try to download...

Thanks, thanks, thanks Pippo
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: chessjoker

Post by Edmund »

hgm wrote:OK, I posted the Fairy-Max derivative for download at

http://hgm.nubati.net/jokermax.zip

I guess it can only run on the WinBoard development version, where you can simply select 'joker' from the New Variant menu. (I implemented it as an engine-defined variant, so that the engine configures board size and initial position itself.) This WinBoard can be downloaded from

http://hgm.nubati.net/WinBoard-4.8.beta.zip
The engine loads smoothly, the new variant appears in the list as expected and the first few moves are played flawlessly.

two issues:
1) castling (see below)
2) copy paste of games yields "Bad FEN ..."

Code: Select all

[Event "Computer Chess Game"]
[Site "HP"]
[Date "2014.03.16"]
[Round "-"]
[White "Fairy-Max 4.8joker"]
[Black "Fairy-Max 4.8joker"]
[Result "1-0"]
[TimeControl "40/300"]
[Variant "joker"]
[FEN "rnbqkbjnr/ppppppppp/9/9/9/9/PPPPPPPPP/RNBQKBJNR w KQkq - 0 1"]
[SetUp "1"]

{--------------
r n b q k b j n r
p p p p p p p p p
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
P P P P P P P P P
R N B Q K B J N R
white to play
--------------}
1. d3 Nc6 2. Nc3 d6 3. i3 i5 4. Ng3 Ng6 5. Bd2 Bd7 6. e3 Be6 7. f4 Qd7 8.
Jf2 f5 9. Be2
{Xboard: Forfeit due to invalid move: e8b8 (e8b8 via `0) res=24} 1-0
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

To me doesn't work!

In which folder I have to put the jokermax files? I have to run before jmax.exe? Sorry I am new in winboard...
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

This does not logically follow from the rules you posted. When a player passes his turn, logically the Joker should also pass its turn. If that is not what you want you should amend the rules such that it defines what the Joker can do after a turn pass (e.g. always as a King, because a turn pass is considered a null-step of the King, or always as the piece it was imitating before).

The implementation I made follow's Evert's logic. I don't expect that to have much influence on the game, because turn passing is not legal in Chess, and only plays a role in stalemate situations, as a hypothetical last resort that immediately ends the game.

Note I only tested it with a single game, posted above (in self play, so this was actually two games), which can hardly be called thorough. But the changes were so slight that I would still be surprised if it was buggy.

Note you will have to play it with legality testing of WinBoard switched off. Otherwise the GUI will not accept castling, and it would also not accept orthogonal Joker moves, as I used the piece as Joker that normally represents the Archbishop. Perhaps I should have taken the Cobra or Falcon instead (as these are wild-card pieces of which WinBoard would accept any move), but that still would leave the non-standard castling.

Also note that Fairy-Max will never under-promote itself, although it will accept under-promotion by the opponent. (Which then comes as a complete surprise.)
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: chessjoker

Post by Edmund »

Pippo wrote:To me doesn't work!

In which folder I have to put the jokermax files? I have to run before jmax.exe? Sorry I am new in winboard...
place the files into the same folder as winboard.
then run winboard
in the first dialog box replace the two instances of "fmax" with "jmax"
then in the file/new variant select joker
then in options/general deactivate test legality
eventually you can start an engine fight under mode/two machines
Edmund
Posts: 670
Joined: Mon Dec 03, 2007 3:01 pm
Location: Barcelona, Spain

Re: chessjoker

Post by Edmund »

hgm wrote:This does not logically follow from the rules you posted. When a player passes his turn, logically the Joker should also pass its turn. If that is not what you want you should amend the rules such that it defines what the Joker can do after a turn pass (e.g. always as a King, because a turn pass is considered a null-step of the King, or always as the piece it was imitating before).

The implementation I made follow's Evert's logic. I don't expect that to have much influence on the game, because turn passing is not legal in Chess, and only plays a role in stalemate situations, as a hypothetical last resort that immediately ends the game.

Note I only tested it with a single game, posted above (in self play, so this was actually two games), which can hardly be called thorough. But the changes were so slight that I would still be surprised if it was buggy.

Note you will have to play it with legality testing of WinBoard switched off. Otherwise the GUI will not accept castling, and it would also not accept orthogonal Joker moves, as I used the piece as Joker that normally represents the Archbishop. Perhaps I should have taken the Cobra or Falcon instead (as these are wild-card pieces of which WinBoard would accept any move), but that still would leave the non-standard castling.

Also note that Fairy-Max will never under-promote itself, although it will accept under-promotion by the opponent. (Which then comes as a complete surprise.)
Thank you. I forgot about deactivating legality checking. In my second attempt I made it to the endgame before jmax crashed. Anyway, bed time now, I will try again tomorrow.
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

Pippo wrote:To me doesn't work!

In which folder I have to put the jokermax files? I have to run before jmax.exe? Sorry I am new in winboard...
The jmax.exe file is the engine. You can put it anywhere, as long as it is in the same folder as fmax.ini.

The WinBoard development version at the link I gave is a completely unconfigured binary, so getting it to work is a bit cumbersome.

* To run it, you should start WinBoard (winboard.exe), and select 'Just view or edit games' (because you have no engines installed yet).
* After that you move the auxiliary windows out of the way (or close them), and open the Engine->Load 1st Engine dialog.
* There you hit the 'browse' button for the Engine (.exe) text-edit, and select jmax.exe .
* Close the dialog by clicking OK
* Open the File -> New Variant dialog
* At the bottom of the variant choices there should be a radio button maked 'joker'. Tick that.
* Close the dialog by clicking OK.
* The board should now change to 9x8.
* You can then play JokerChess against the engine by playing a move, or let the engine play white by clicking Mode -> Machine White.
* To play two engines against each other you should first load a second engine. Do this through Engine -> Load Second Engine, and select jmax from the list (it should now be there from your first effort). End with OK.
* Then select Mode -> Two Machines.
* You can change the thinking time in the Options -> Time Control dialog.
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

Thank you Edmund! Now it is works!

Anyway, Harm, something is wrong in the game: when the opponent (the engine black) moves a pawn, my joker cannot move like a pawn: really it seems that cannot move at all!!
:?:
Pippo
Posts: 50
Joined: Tue Mar 04, 2014 6:40 pm
Location: Murcia España

Re: chessjoker

Post by Pippo »

Ah ah, understood!! I have to desactive the legality test. Now it seems work fine!

Great Harm, great!!! :D
User avatar
hgm
Posts: 27795
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: chessjoker

Post by hgm »

You are right. Weird, because when I switch to Edit Game mode, so that I can move for both sides, it does allow me to move the white Joker after a black Pawn move. It seems that it does not remember the last-moved piece when the computer moves.

I will check it out tomorrow, as for me it is bed time too now.