Fairy-Stockfish janggi (ponder Problem)

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 17 Oct 2020, 13:56

I have tested it several times. There are some problems.
1. When I play with the engine, if I click to "PASS" the clock, the engine does not work after that. (After opening)
2. When I click the clock and do "PASS" while using the openingbook moveing in the beginning, the engine moves incorrectly. Wrong move or stop
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 17 Oct 2020, 15:21

Stockfish did not understand the CECP notation for turn pass (@@@@). I have pointed that out to the developer on GitHub (in the Janggi issue). What you describe suggests that it isn't fixed yet, or that you are still using a version from before it was fixed.
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 17 Oct 2020, 15:53

ok. I remembered. The engine developer has not officially modified it yet.
I have successfully made a book with 25000 games. It works fine. thanks.

i have some question.

1. white: How can I change the Chinese color? (piece center color) It is currently black(font). The official color is blue.

2. Currently, many janggi users are still using winboard with cecp and xaingqi variants. They have a lot of difficulty in making openingbook. Can you help me to make a janggi book in the xaiangqi variant? Currently not working.
=========================================================================
Anyway, we have no choice but to play with the xaingqi variant.
i think janggi variant needs to be considered from a more future perspective.
Perhaps you made the first cornerstone of janggi.
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 17 Oct 2020, 21:32

I have tried an entirely different approach to the book symmetry now, in the latest WinBoard-AA upload: For every access to a '-sym' book (both read and write, also writing to the memory buffer in which it stores positions when building a book from PGN), it decides whether the requested position is 'canonical' or a mirror image. In the latter case it calculates the key after reflection (to get the key of the canonical counterpart). And it reflects the retrieved move after reading, or the move to be written before writing. This should prevent that both members of a mirror-image pair can ever be stored in the book, and thus guarantees that all moves for the position can always be found in the single stored member of the pair. And that probing always immediately requests that stored member.

I tested it with Edit Book; if I played g3g4, there were no moves in the book. If I played c3c4, there weren't any moves either. After c3c4 I added Ke9 and Hg7 to the book. When I then took the move back, and played g3g4 instead, I found that Ke9 and Hc7 had been added for that position. I did not test it with Save Games as Book, but I expect it to work there too.
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 18 Oct 2020, 06:43

When I tested it, there are some errors.

1. In the second move (black), the mirror motion is not applied. (All book movements have been reversed.)
2. 16.7% 1 Hh9f6 {1/0}: The movement division is unknown. (Coordinates overlap with different pieces.) A lot of similar overlapping coordinates occurred, and it indicated an error.

The important point is that there is the same symmetry, and there are different left and right symmetry. At that time, the mirrored pieces is different.
I mean the mirrors are different depending on the starting position.
It seems like a problem occurs when playing the game from the mirrored starting position.
In my opinion, mirrored movements should not affect movements already entered in the book at this time. (The coordinates change.)
Even if i start the game with a mirrored start position, it is not displayed as a converted book movement (edit book)

I have updated 16 starting positions and 25000 game book files to my Google Drive. (janggi start positions and book.zip)

Perhaps you need 16 starting positions and checking in my book. (mirror)

I ran 2 winboards to check this problem, one applied sym and the other did not. And they compared movements with each other in 16 positions. And on the blank book, I used edit to check the movement.
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 18 Oct 2020, 08:33

I don't understand exactly what you did. Most important thing is that we are talking about the same WinBoard version. Unfortunately I again forgot to update the version number, but the date of last modification of the winboard.exe file should be Oct 17, 22:06 (Amsterdam Time).

You don't say what position you were looking at, which book you were using, whether you just added moves yourself to it. And whether you were running WinBoard with or without engine. The move you mention is an Elephant move, but it start from h9, which nominally is a Horse square. Were you probing a position where the Horse and Elephant had been swapped, or is WinBoard now probing totally unrelated positions?
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 18 Oct 2020, 11:35

I used the same Winboard version.

The way I explain this easily is simple.

1. Run 2 Winboards. Apply sym(book).
2. Load each symmetrical Fen file.
(If the number in front of the file I attached is the same, it is a symmetric fen file.)
3. Enter the movement using edit book.
4. And check that each winboard moves in the same symmetry.

When I checked it did make any parsing errors.
and not symmetric move. It was making the wrong move.
The book shows incorrect overlapping and incorrect move of symmetry.
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 18 Oct 2020, 14:51

janggi-korea wrote:I used the same Winboard version.

Same as what? That modified on 22:06?

The way I explain this easily is simple.

1. Run 2 Winboards. Apply sym(book).

What does "Apply" mean here, and what is "sym(book)"? Do you run them with or without engine?

2. Load each symmetrical Fen file.
(If the number in front of the file I attached is the same, it is a symmetric fen file.)

What file? Attached to what? What does "symmetric fen file" mean?

3. Enter the movement using edit book.
4. And check that each winboard moves in the same symmetry.

What does "moves" mean? You have an engine loaded, and let it play a move? Or just that it displays a move in the Edit Book window?

When I checked it did make any parsing errors.

Parsing what, and when? Did it complain a book move was illegal when it tried to play it for an engine? If you enter an illegal move during Edit Book it should just reject it, and nothing will be added to the book.

and not symmetric move. It was making the wrong move.

What does "wrong" mean here? Illegal? Did you have legality testing on?

The book shows incorrect overlapping and incorrect move of symmetry.

Which book? What does "incorrect overlapping" mean? What would be "correct overlapping"? Are you saying that moves are not correctly reflected?
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 18 Oct 2020, 15:46

1. 2020-10-17 PM 10:06

2. use book-sym.bin and 25000 game book-sym.bin (Google Drive)
Engine use and edit mode same position error.

3. Google Drive FEN file : (0-1position,0-2position)/(1-1position,1-2position)/(2-1position,2-2position)....

4. Move = Move entered in book OR edit book move.

5. E.g 99.9% 1 Eg9f7 : Message: "could not parse move"
The same error occurs in engine loading or editing mode.

6. Wrong move: test legality doesn't matter. The problem is that the mirrored moving coordinates (book) did not change the symmetrical movement (left and right inversion).
Sorry. It is difficult to explain this accurately with my English skills. I'll explain it in a video later.

7. Incorrect duplicate coordinates: E.g 99.9% 1 Eg9f7: Message: "could not parse move"

When I enter a move in the book and check it in the mirror start position, the duplicate coordinates like this Eg9f7 are displayed in the book.

I am sorry. I have been talking to you for a long time, but I still can't speak English well
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 18 Oct 2020, 21:44

Well, I really must know the FENs of the positions that you used for probing the book, to be able to reproduce this. Can you please post those FENs here?
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 19 Oct 2020, 05:08

As I said earlier, this problem is very simple.
You just need to check whether the symmetrical movements are correct.

* sample fen (2 types of starting positions)
1-1. Left : rhea1aher/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1
1-2. Right : reha1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1

2-1. Left : rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/RHEA1AHER w 0 1
2-2.Right : rhea1aehr/4k4/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/4K4/REHA1AEHR w 0 1

* check point
1.Only pieces moving vertically from the center of the board have the same coordinates.
2.At each FEN position, you must check the movement status symmetrically and accurately, and check the coordinates where different objects overlap.
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 19 Oct 2020, 16:57

Mueller, i want to play janggi in uci mode. Currently cutechess can play janggi in uci mode. However, there is no editing function and analysis function. Could you change the janggi variant coordinates? If that officially matters, just want to get a test version.
Is it a serious problem for us to change the current coordinates? but cutechess have already changed the coordinates.
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 20 Oct 2020, 18:07

Sorry, I had to tend to other matters these past days.

I would rather just fix the ponder problem in Stockfish. Doesn't seem that the developer himself is interested in doing that any time soon. I posted some ideas there to solve that issue, but there is absolute zero response.

You told me you could compile Stockfish. Unfortunately I never succeeded in doing that with the compiler I have. If I would send you two or three modified cpp files, with some changes in it that I expect to solve the ponder issue, would you be willing to try those out?
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Fairy-Stockfish janggi (ponder Problem)

Postby janggi-korea » 20 Oct 2020, 18:36

Yes. After replacing the files, i will compile and test. Please upload it to my email or Google Drive or
janggi-korea
 
Posts: 30
Joined: 18 Aug 2020, 12:12

Re: Fairy-Stockfish janggi (ponder Problem)

Postby H.G.Muller » 22 Oct 2020, 20:30

OK, I have prepared something. I needed to modify 3 source files; they are at http://hgm.nubati.net/Stockfish.zip .

If there are compiler errors, please post the error messages here. (Or, when they are trivial typos, correct them yourselves.) I hope there are none.

This was a bit difficult for me, because I had no idea how Stockfish normally works, and it is written in a programming language I am not familiar with. If it compiles, first try to run it with pondering switched off, and using the -debug option in WinBoard. I had to change what happens there too; originally the move played by Stockfish would be printed by the search routine itself (in search.cpp), when it terminated. I could not keep it that way, because then it would also print a move when you abort a ponder search. And this would confuse the GUI.

So I used a trick: at the end of the search it only sends an erroneous command to the GUI, to which WinBoard will reply with an error message. That error message is then received by the Stockfish input thread (running the code in xboard.cpp), where it is known whether Stockfish is pondering or not. And if it is not, it then sends the move to the GUI. We must first test whether this works as I intended. If it doesn't, please post the contents of the winboard.debug file that was created here.

If it does, we can start testing with pondering switched on. Sending the move Stockfish plays would then be immediately followed by starting a ponder search (which should be noticieable by the output Stockfish would produce). The question then is whether this ponder search will be terminated in a correct way when the expected move arrives, and when another move arrives.
User avatar
H.G.Muller
 
Posts: 3260
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Previous

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 10 guests