WandererXII / lishogi

☗ lishogi.org: the forever free, adless and open source shogi server forked from lichess.org ☗
https://lishogi.org
GNU Affero General Public License v3.0
268 stars 41 forks source link

[Variant] Chushogi #472

Closed WandererXII closed 1 year ago

WandererXII commented 2 years ago

[Edit] 4th of October - testing some aspects of the implementation here: https://lishogi1.org/assets/sandbox/chushogi/index.html Please take a look around and if you have any feedback please leave a comment.

Marken-Foo commented 2 years ago

Just an infodump, I'll try to keep it relevant to the topic.

Pieces and information: https://en.wikipedia.org/wiki/Chu_shogi

Example game (Korsner-Hingley), embedded in English site (kifu attached, Japanese notation) korsner-hingley.txt

Chu Shogi Renmei kifu selection (Japanese)

Position editor but Japanese

Position editor but English

The JS that powers all of the above browser chu shogi interfaces: https://www.chushogi-renmei.com/DHTML/kifu/dhtmlcb2.js

Correspondence chu shogi games server (English) (?!) (games there are in western notation)

Of course H. G. Muller has a Chu Shogi AI and by extension, some version of Winboard supports it.

As far as I can tell, there isn't a widely adopted standard... but maybe that's just me being ignorant. As far as I can tell, after 81Dojo's support for chu shogi died with Flash, the current activity (Japanese or otherwise) is mostly on https://sdin.jp/

Oh, and a correspondence group that's somehow going very strong on chesscom, helmed by presumably a fairly strong player (they seem to have many, many years of experience, and are able to comfortably beat just about everybody there).

CouchTomato87 commented 2 years ago

Whenever you feel this is nearing fruition (like 1-2 months), let me know and I can make piece sets. It will be a very, very long project lol.

lk758tmy commented 2 years ago

To differentiate, we usually use black for a rook, and red for a promoted gold (a gold promotes to a rook). And the charaters are usually in different fonts, a part in George Hodges' Middle Shogi Manual shows the difference between the fonts. You can acquire the book from his wife by email george.hodges@talk21.com

Fulmene commented 2 years ago

I think supporting the crown prince mechanic: having multiple royal pieces and marking check on them separately, would be an important shogiground task as well.

ToriethePanda commented 2 years ago

So couch tomato sent me a link to this, and I can answer a few questions if needed.

In terms of notation, it is the same as in regular shogi, the only difference for being the lion. In Japanese notation, all squares that the lion moves to are notated, and the same in Western notation. Similar system for promoted dragon and horse.
So something like

Duplicate pieces aren't usually differentiated, and are treated as the same, though I suppose the promoted pieces can be coloured red if needed.

CouchTomato87 commented 2 years ago

So for Japanese notation it would be natural to use the Kanji. I'm curious is there an existing notation for western style? As Lishogi offers both.

lk758tmy commented 2 years ago

Yes, there is an Western notation on Middle Shogi Manual. A piece is represented by 1 or 2 letters. EG. 'P' for Pawns, 'GB' for Go Betweens, and '+GB' for promoted Go Betweens (which moves like Drunk Elephants). Then, a '-' refers to move, a 'x' refers to capture. Then it's the destination, from '1a' to '12l'. (Note that 1a is on the top-right on the board). Finally, if a piece is able to promote, but chooses not, add a '='. So, if a Vertical Mover captures a piece on b4, but chooses not to promote, then it'll be "VMxb4=".

For Lion, there can be two moves in one turn, such as "Lnx7f-6f". And for an igui move, use "Ln!".

CouchTomato87 commented 2 years ago

I think a potential problem is that somewhere, either the GUI (Shogiground), the engine, or something only accepts single letters for pieces. And in that case, those ones with two letters may require a single letter designation

ToriethePanda commented 2 years ago

Single letters will likely cause quite a bit of confusion, not to mention there aren't enough letters to represent all the pieces and promotions

ToriethePanda commented 2 years ago

As an example both leopard and lion would presumably take the L abbreviation, both horse and horizontal mover would take H, Houou would take either H or P conflicting with horse/pawn, not to mention what would be used for pieces with inconsistent translations like double lance vs reverse chariot and go between vs intermediary.

Ideally two letter notation for the least confusion.

ToriethePanda commented 2 years ago

And finally one last point, Chu shogi promotion rules are quite different compared to regular shogun rules.

  1. Pieces have only one opportunity to promote upon entering the 4 promotion ranks.
  2. If a piece doesn't promote upon initial entering, it cannot promote again until it exits and reenters the 4 promotion ranks, or it captures a non-pawn piece within the promotion zone. That is, moving a piece within promotion zone does not allow that piece to promote.
  3. Pawns, lances, and in some rulesets double pawns / go betweens may promote on the furthest rank if they do not promote upon initial entering of the 4 ranks. If a pawn chooses not to promote on reaching the furthest rank, the pawn is stuck and cannot move.
  4. Captures of king/crown prince cause immediate promotion.
CouchTomato87 commented 2 years ago

We might have enough letters. First of all, let's retains all the letters from standard shogi when possible... Promotions will still be +X. Let's also retain the common letters D and H for Dragon King and Dragon Horse, respectively as those are well known.

So we have:

Bishop (Dragon Horse) - B Blind Tiger (Flying Stag) - T Copper General (Side Mover) - C Dragon Horse (Horned Falcon) - H Dragon King (Soaring Eagle) - D Drunk Elephant (Prince) - E Ferocious Leopard (Bishop) - U Flying Ox - X Flying Stag - Y Free Boar - A Go-Between (Drunk Elephant) - W Gold General (Rook) - G Horned Falcon - F King - K Kirin (Lion) - N Lance (White Horse) - L Lion - O Pawn (Tokin) - P Queen - Q Reverse chariot (Whale) - J Rook (Dragon king) - R Side Mover (Free Boar) - M Silver General (Vertical mover) - S Vertical mover (Flying ox) - V

I tried to incorporate letters when possible, but some were obviously arbitrary.

It might be confusion, but the I suspect an FEN may not allow for double letters.

ToriethePanda commented 2 years ago

I'm not sure I quite understand what you mean. Do you want to keep promoted pieces with +X notation, or do you want a new letter to represent promoted pieces?

If we're doing same letter for both unpromoted and promoted pieces I'd suggest instead

King K Elephant/Prince E Gold/Rook G Silver/Vertical Mover S Copper/Horizontal Mover C Lance / White Horse L Tiger/Deer T Bishop/Horse B Queen Q Dragon/Eagle D Horse/Falcon H Rook/Dragon R Vertical Mover/Cow V Pawn/Gold P

And everything else is arbitrary I suppose

Leopard / Bishop Z Lion X Houou(Phoenix)/Queen U Kirin/Lion Y Double Lance/Whale W Horizontal Mover/Boar F Go Between/Elephant J

CouchTomato87 commented 2 years ago

Yes. promoted pieces will just be +base piece. It also helps separate pieces that redundantly exist as unpromoted and promoted units.

As for the "arbitrary" ones you can still assign letters that match stuff in their name:

Leopard / Bishop J LiOn O (also X can be confused with the capture symbol) HoUou(Phoenix)/Queen U KiriN/Lion N Double Lance/Whale F HoriZontal Mover/Boar Z Go BetWeen/Elephant W

WandererXII commented 2 years ago

Thanks a lot everyone.

Internally two notation systems are relevant:

SFEN

From what I've seen, there is no established standard for this in chushogi. As you guys discussed, it's hard to have pieces represented by more that one letter ('+' is fine, since it always just means promote the following piece letter). For example if for go-between we used GB , we couldn't tell the difference between GB meaning 'gold followed by bishop' and an actual 'go-between'. So for SFEN, we will have to go with single letter abbreviations. I found some (maybe already established) single letter abbreviations - https://www.gnu.org/software/xboard/whats_new/rules/Chu.html (ID columns) and wikipedia also has something similar: image I couldn't find any references to SFEN/FEN being used with chushogi anywhere, some mentions here perhaps: https://github.com/agt-the-walker/shogi-utils/blob/master/cheatsheet.md. If someone is aware of some SFEN standard for chushogi being used, please let me know. It's much easier to do it properly now, that to later refactor this to fit some already existing standard, I was not aware of.

USI

Very similar story to SFEN, I'm not aware of some existing standard, but it seems intuitive to extend standard USI. One problem I see is that having file be two digits is a bit annoying - 10a12j+. Personally I would prefer to go with hex base for the file, but once again - if there is some existing standard, I want to go with that, or with something that is the most intuitive. Another problem is lion move, the obvious solution is to append the between square to the end: ORIG,DEST,[PROMOTION LION_SQUARE] (1a2b2a).

Other notations

For the moves that you can see next to the boards and some other places on lishogi, we are not restricted by anything really, so there I will implement whatever is considered the proper notation. It also isn't stored anywhere so it's easily fixable, if I get something wrong.

WandererXII commented 2 years ago

And finally one last point, Chu shogi promotion rules are quite different compared to regular shogun rules.

  1. Pieces have only one opportunity to promote upon entering the 4 promotion ranks.
  2. If a piece doesn't promote upon initial entering, it cannot promote again until it exits and reenters the 4 promotion ranks, or it captures a non-pawn piece within the promotion zone. That is, moving a piece within promotion zone does not allow that piece to promote.
  3. Pawns, lances, and in some rulesets double pawns / go betweens may promote on the furthest rank if they do not promote upon initial entering of the 4 ranks. If a pawn chooses not to promote on reaching the furthest rank, the pawn is stuck and cannot move.
  4. Captures of king/crown prince cause immediate promotion.

I also found some alternative promotion rules (Chu Shogi Renmei promotion) here: https://drericsilverman.com/2020/04/05/chu-shogi-part-i-how-to-play/. Thoughts on that?

WandererXII commented 2 years ago

I think supporting the crown prince mechanic: having multiple royal pieces and marking check on them separately, would be an important shogiground task as well.

We will have to pass the squares, that are checked to shogiground directly, now we just pass bool and it marks the king automatically. But another thing is that check is something completely different in chushogi. In standard shogi, you cannot move into check and you cannot be in check after your turn ends, that's not the case in chushogi from what I understand. So that's also something to consider.

Some other questions:

lk758tmy commented 2 years ago

For the lion, I've seen 3 different ways. In ZOG, on the first move of lion, you should choose to keep moving or to stop in a pop-up window. In ai ai, when making a move, you only need to click the final position, then you choose the medium position in a pop-up window On sdin.jp, after the first move, you can perform the second move, or click the lion to pass. (For igui, the 3 platforms use the same way, by clicking on the lion)

123

lk758tmy commented 2 years ago

For the promotion, I prefer chu shogi renmei rules. But I think if it's possible, it'll be better to make it an option when creating a room. BTW, I recently found a play-by-forum chu shogi club , and here is the notation they use.

ToriethePanda commented 2 years ago

Regarding the checkmate rules, those only apply if the elephant becomes promoted, which doesn't happen in all games. The concept of checkmate still applies if there is only a single king, or very rarely a single prince left. As for how this interacts with code, i don't really know.

AlexGTrick commented 2 years ago

Hello, guys! Hope, you still continue developing Chu Shogi in the lishogi. @WandererXII could you please tell me, at what stage progress is?

Please correct me if I'm wrong, but does chushogi even has something you can call a checkmate? While some rules mention checkmate, you win after you capture all opponent's royal pieces. What if opponent has both royal pieces checkmated, is it the end, or do we need to capture both the pieces?

In Chu Shogi when some player has two royal pieces, he couldn't be checkmated. To checkmate him you have to capture one of this royal pieces first, and then checkmate by usual rules.

So we can thus have both royal pieces under check, we could even go under check.

By historical rules, in Chu Shogi there are no concept "checkmate", and we just have to capture all royal pieces, but for convenient we could just apply usual checkmate rules, if there is one royal piece on the board.

UI for lion move - how to express to the user that he can make two moves with the 'lion moves supporting pieces', since it's also not mandatory? to make the two moves, how to end the move 'prematurely'? Any ideas, examples?

I prefer that way of handling in UI - I make moves by lion twice. If I want it to stop its move on the second move, I just click on the field where is stopped. Move highlight gives me a hint, if a move is finished or not.

P.S. except the lion, a lion-moves has also two pieces: Horned Falcon and Soaring Eagle (promoted Dragon Horse and Dragon King)

WandererXII commented 2 years ago

Hello, currently working on shogiops to add support for chushogi, shogiground needs very little work to support chushogi, so that should be quick, then I will have to work on scalashogi and integrating all the changes into lishogi. I think I will make some static demo soon and post it here, just to test if all the rules, notations, etc. are correct and UI feels good. I don't want to guess, when I'll have it ready, because I would be wrong anyways.

In Chu Shogi when some player has two royal pieces, he couldn't be checkmated. To checkmate him you have to capture one of this royal pieces first, and then checkmate by usual rules.

So we can thus have both royal pieces under check, we could even go under check.

By historical rules, in Chu Shogi there are no concept "checkmate", and we just have to capture all royal pieces, but for convenient we could just apply usual checkmate rules, if there is one royal piece on the board.

Currently I'm leaning towards enforcing capture of all royal pieces in order for a player to win, it just feels much cleaner to me, together with the fact that a king can move into a check and with multiple royal pieces, the concept of check disappears completely. If these are the historic rules, even better. But I don't know what players are used to and what they prefer, I'm open to implementing checkmate, if that's what people want.

I prefer that way of handling in UI - I make moves by lion twice. If I want it to stop its move on the second move, I just click on the field where is stopped. Move highlight gives me a hint, if a move is finished or not.

This is probably the way I'm gonna go with, problem is it must work both for drag and select only. I haven't started working on this yet, so I will see.

Another thing I wanted to ask about are repetitions, taken this from - https://drericsilverman.com/2020/04/05/chu-shogi-part-i-how-to-play/

  • If the board position is repeating due to one player repeatedly checking the opponent’s King or Prince (placing them under immediate threat of capture), then they must change their move before the 4th repetition of the same position or lose the game.
  • If one side is repeatedly attacking the opponent’s non-royal pieces during the repetitions, the attacking side must change their move before the 4th repetition of the same position or lose the game.
  • If the position is repeating due to both players passing using ‘Lion Power’ pieces, then the first player who passed must change their move before the 4th repetition of the same position or lose the game.
  • If the position is repeating and neither side is attacking, then a draw can be claimed.
  • In cases not covered specifically by the above rules, then whichever side causes the 4th repetition of a board position will lose the game.

Another question, what's a reasonable ply limit? Currently we limit games to 600, which might not be enough for chuushogi?

ToriethePanda commented 2 years ago

It seems Dr. Silverman is not quite correct in describing the rules relevant to repetitions. Preferably all the rules should come from https://www.chushogi-renmei.com/kouza/rule.htm , which is the official rules from the chu shogi association. Unfortunately the rules are in Japanese.

千日手は、仕掛けた側が別の手を指さなくてはいけません。(本将棋では引き分けとなりますが、中将棋では指し直すことと定められています。ただし、これはその時代によって検討が重ねられていくべき部分でもあり、今後どのように変更されるかは分かりません) All repetitions are illegal, regardless of checking, attacking, or passing. If the same board position repeats due to a repetition, then the player that started the repetition sequence must change their move. (Not a direct translation)

I'm not familiar enough with the term "ply"; can you explain what that means?

CouchTomato87 commented 2 years ago

I'm not familiar enough with the term "ply"; can you explain what that means?

A ply is a single player's move. A "move" in chess lingo refers to the set of two players' moves. Whereas a Shogi "move" is more of what chess people would call ply.

ToriethePanda commented 2 years ago

Usually the game averages around 600-800 moves, but it can go up to 1500-2000 moves at the maximum. Since the game simplifies over the course of the game without the drop rule, I don't think it will go much higher.

AlexGTrick commented 2 years ago

But I don't know what players are used to and what they prefer, I'm open to implementing checkmate, if that's what people want.

Well, there are historical rules, and there are official JCSA rules. I'm not sure about checkmate rules in JCSA, as I don't speak Japanese.

The simplest way to implement is just make game win by capturing all royal pieces, indeed. And that's better, than nothing. Currently there are a few places where we can play Chu Shogi comfortably, so lishogi is our real hope :)

But there is a point why implement check and checkmate, if on the board there is only one royal piece. 1) most people playing chess and shogi got used to concept of checkmate. Even in shogi, if you make a move under check when you're checkmated, or simple ignore a check, that's an illegal move, resulting in immediate loss. 2) new players may be at first time not get used to Chu Shogi rules, in particular, to rules of pieces. The clear hint of checkmate position given by engine would help resolve some of this situations 3) absolute inappropiate are the blitz situations, where someone moves his single royal pieces under check, and his opponent doesn't notice that, so the first player next move takes his royal piece away from check. That's quite a real scenario, if a "blitz" mode is actually byo-yomi play at 40 seconds per move, and players are not so experienced to remember all moves of all pieces.

And that's not mentioning that the case when any player promotes his drunk elephant to prince are quite rare in real Chu Shogi games.

AlexGTrick commented 2 years ago

All repetitions are illegal, regardless of checking, attacking, or passing. If the same board position repeats due to a repetition, then the player that started the repetition sequence must change their move. (Not a direct translation)

@ToriethePanda can you please show this in an example?

Player A makes move, for example, Go-Between up. Player B makes move in reply, let it be Gold to left. And then Player A makes move back - Go-Between down. Now, if Player B makes move Gold to right, that's would be repeating the position.

who is the player that started the repetition sequence, and who is obligaded to change his move?

AlexGTrick commented 2 years ago

Another question, what's a reasonable ply limit?

I got what is "ply", people explained above. But I don't understand, what is the limit? For what is this limit?

gbtami commented 2 years ago

@AlexGTrick see https://lichess.org/forum/general-chess-discussion/lichess-300-move-rule-forced-draw#3

PraseodymiumSpike commented 2 years ago

All repetitions are illegal, regardless of checking, attacking, or passing. If the same board position repeats due to a repetition, then the player that started the repetition sequence must change their move. (Not a direct translation)

@ToriethePanda can you please show this in an example?

Player A makes move, for example, Go-Between up. Player B makes move in reply, let it be Gold to left. And then Player A makes move back - Go-Between down. Now, if Player B makes move Gold to right, that's would be repeating the position.

who is the player that started the repetition sequence, and who is obligaded to change his move?

I would assume that Player B would not be allowed to make the move Gold to the right in that situation. However, I can't read Japanese, so I'm not entirely sure. But that is how most games would do it.

WandererXII commented 2 years ago

https://github.com/WandererXII/lishogi/issues/472#issuecomment-1243018853 - Checkmate:

From https://www.chushogi-renmei.com/kouza/rule.htm:

 一.敵の王将(玉将)を詰める(詰めるというのは、王将が王手をかけられてしまい、なおかつ他に逃げる場所が無くなってしまった状態のことを言います。)、あるいは自軍の駒で敵軍の王を倒した場合(これを「突き落とし」と言います。)に勝ちとなります。<敵将を詰めることが目的の本将棋とは異なります>

If I understand this correctly, this says something like - "Victory is, if opponent's king is checkmated (which means the king is checked and has nowhere to escape) or opponent's king is captured (called tsukiotoshi?). This is different from standard shogi".

I guess both checkmate and capture should therefore be supported. We would have to define checkmate as "having your only royal piece in check and not being able to escape, even if one could move (next turn)". This means that checkmate might happen both on our turn and opponent's turn.

Btw, this is a separate thing from checks, checks can and will be displayed.

most people playing chess and shogi got used to concept of checkmate. Even in shogi, if you make a move under check when you're checkmated, or simple ignore a check, that's an illegal move, resulting in immediate loss.

We don't allow players to make illegal moves on lishogi. But in chushogi moving into check is legal, which makes things a little bit more confusing with checkamates.

But since I want to be as reasonably close as possible to Chu-Shogi-Renmei rules, I'm going to go with implementing checkmate as one way to win.

WandererXII commented 2 years ago

千日手は、仕掛けた側が別の手を指さなくてはいけません。(本将棋では引き分けとなりますが、中将棋では指し直すことと定められています。ただし、これはその時代によって検討が重ねられていくべき部分でもあり、今後どのように変更されるかは分かりません) All repetitions are illegal, regardless of checking, attacking, or passing. If the same board position repeats due to a repetition, then the player that started the repetition sequence must change their move. (Not a direct translation)

Thanks for the translation. So this paragraph on wiki (https://en.wikipedia.org/wiki/Chu_shogi#Repetition) is also wrong?

The Japanese Chu Shogi Association plays by more complex repetition rules. Only a fourth repetition is forbidden, and the burden to deviate is not necessarily on the player that reaches this first. If one side is making attacks on other pieces (however futile) with his moves in the repeat cycle, and the other is not, the attacking side must deviate, while in case of checking the checker must deviate regardless of whether the checked side attacks other pieces. In the case of consecutive passes, the side passing first must deviate, making turn passing to avoid zugzwang pointless if the opponent is in a position where they can pass their turn too. If none of these are applicable, repetition is a draw.

PraseodymiumSpike commented 2 years ago

You guys should really, really get into contact with someone at the Renmei who is English-literate instead of relying on third parties for translation. The rules they have online may be inaccurate.

AlexGTrick commented 2 years ago

You guys should really, really get into contact with someone at the Renmei who is English-literate instead of relying on third parties for translation. The rules they have online may be inaccurate.

The idea is quite good, but the problem is how to contact. I tried once to write them an email, and since that I didn't receive any reponse

AlexGTrick commented 2 years ago

I think, we could at first not to complicate with repetitions and just make a working playground without any repetition rules.

Later, if we'll get more exact information, we could handle it properly.

btw: to read a little more about repetition rules disputes

On this forum where we play Chu Shogi correspondence games, repetition rule at all is handled subjectively, by voting of observers, lol.

That's because the creator of this club strongly disagrees the way JCSA handles many rules, including repetitions.

PraseodymiumSpike commented 2 years ago

For reference: https://www.chushogi-renmei.com/ Japanese Chu Shogi Association's (seemingly) official site

PraseodymiumSpike commented 2 years ago

Could we try Tweeting at them? They'd surely be interested in this if they knew about it as this will probably be the biggest thing to happen in chū shōgi in months. They seem to have an active Twitter.

Fulmene commented 2 years ago

#472 (comment) - Checkmate:

From https://www.chushogi-renmei.com/kouza/rule.htm:

一.敵の王将(玉将)を詰める(詰めるというのは、王将が王手をかけられてしまい、なおかつ他に逃げる場所が無くなってしまった状態のことを言います。)、あるいは自軍の駒で敵軍の王を倒した場合(これを「突き落とし」と言います。)に勝ちとなります。<敵将を詰めることが目的の本将棋とは異なります>

If I understand this correctly, this says something like - "Victory is, if opponent's king is checkmated (which means the king is checked and has nowhere to escape) or opponent's king is captured (called tsukiotoshi?). This is different from standard shogi".

I guess both checkmate and capture should therefore be supported. We would have to define checkmate as "having your only royal piece in check and not being able to escape, even if one could move (next turn)". This means that checkmate might happen both on our turn and opponent's turn.

Btw, this is a separate thing from checks, checks can and will be displayed.

most people playing chess and shogi got used to concept of checkmate. Even in shogi, if you make a move under check when you're checkmated, or simple ignore a check, that's an illegal move, resulting in immediate loss.

We don't allow players to make illegal moves on lishogi. But in chushogi moving into check is legal, which makes things a little bit more confusing with checkamates.

But since I want to be as reasonably close as possible to Chu-Shogi-Renmei rules, I'm going to go with implementing checkmate as one way to win.

Fairy-Stockfish has support for this mechanic. It's called "Pseudo-Royals" in the code. It's used in quite a few variants on PyChess. Basically, if the variant rule says the extinction of the king piece(s) is a loss, the last of those king piece(s) will be susceptible to check, checkmate, stalemate, etc. like an actual king, and moving it into suicide is illegal. You can check it out for code ideas.

ToriethePanda commented 2 years ago

Sorry for my late reply, also I'm not familiar enough with GitHub to be able to know how to quote things.

In Alex's example, the Go Between mover would be required to change his move, or he would be losing due to the repetition rule. In such a case a pass is treated likewise to a move. That is the official rules, although there are dissidenters who would rule such a situation a draw if neither the go between or gold movers were attacking other pieces, and applying a different set of rules in cases involving passes.

Regarding checkmate and check, we would still refer to attacks on a royal a piece as a check or checkmate, even in the case of multiple royal pieces. You would need to checkmate twice in such a situation with a prince and a king. This might just be a semantic difference, so in implementation only a checkmate of the only remaining royal piece results in game end. If there are multiple royal pieces, checkmating one of two royal pieces is still referred to as a "checkmate", just with the game continuing.

I have no familiarity with code, but perhaps one code way of implementation would involve a variable that tracks of there are or aren't multiple royal remaining pieces on a side, and disabling game end as a result?

ToriethePanda commented 2 years ago

Also one last rule variation that may come up: Depending on the ruleset, royal piece captures either have no effect, allow the player to promote, or force the player to promote

AlexGTrick commented 2 years ago

I'm not familiar enough with GitHub to be able to know how to quote things.

On GitHub for formatting Markdown is used. To make quotitation just write > before the text. There is also a "Preview" tab to check the formatting.

In Alex's example, the Go Between mover would be required to change his move, or he would be losing due to the repetition rule.

i.e. if I understand correctly, the sequence is:

Player A makes move, for example, Go-Between up. Player B makes move in reply, let it be Gold to left. And then Player A makes move back - Go-Between down. Now, if Player B makes move Gold to right, that's would be repeating the position.

and then Player A is forbidden to make Go-Between to up, or it results lose of Player A?

AlexGTrick commented 2 years ago

Regarding checkmate and check, we would still refer to attacks on a royal a piece as a check or checkmate, even in the case of multiple royal pieces. You would need to checkmate twice in such a situation with a prince and a king.

I disagree with that approach. See, the point is that the concept of checkmate includes the situation, when a royal piece is under attack, and there are no legal moves in which player can move this royal piece out of attack. This will led to situation, when we make a checkmate to royal piece, it's marked as "dead" (i.e. checkmated), so we are not obligated to capture this royal piece, so it may be left in the board during further game.

That's how a concept of "making a checkmate twice" (or N times for each N royal pieces) works. And applying to Chu Shogi, that sounds like a nonsence (pardon), because there are no single Chu Shogi rules, where are stated that all royal pieces must be checkmated 1 time each.

Every Chu Shogi rules states, that in case of second royal piece, it should be captured first before the another royal piece could be checkmated. At least, if it is not the version of Chu Shogi rules (historical), where in order to win we should just to capture all royal pieces.

AlexGTrick commented 2 years ago

https://github.com/WandererXII/lishogi/issues/472#issuecomment-1245936646

Could we try Tweeting at them? They'd surely be interested in this if they knew about it as this will probably be the biggest thing to happen in chū shōgi in months. They seem to have an active Twitter.

Feel free to contact them :) I don't have Twitter

PraseodymiumSpike commented 2 years ago

It seems Dr. Silverman is not quite correct in describing the rules relevant to repetitions. Preferably all the rules should come from https://www.chushogi-renmei.com/kouza/rule.htm , which is the official rules from the chu shogi association. Unfortunately the rules are in Japanese.

千日手は、仕掛けた側が別の手を指さなくてはいけません。(本将棋では引き分けとなりますが、中将棋では指し直すことと定められています。ただし、これはその時代によって検討が重ねられていくべき部分でもあり、今後どのように変更されるかは分かりません) All repetitions are illegal, regardless of checking, attacking, or passing. If the same board position repeats due to a repetition, then the player that started the repetition sequence must change their move. (Not a direct translation)

I'm not familiar enough with the term "ply"; can you explain what that means?

I have left a comment on his page asking him to clarify the rules and whether they have changed, so you might want to check soon to see if he has replied.

WandererXII commented 2 years ago

I have left a comment on his page asking him to clarify the rules and whether they have changed, so you might want to check soon to see if he has replied.

Thanks, on chuushogi renmei site I found another set of rules where this rule is described differently from what ToriethPanda posted: https://www.chushogi-renmei.com/kouza/rule2007.htm

PraseodymiumSpike commented 2 years ago

I have left a comment on his page asking him to clarify the rules and whether they have changed, so you might want to check soon to see if he has replied.

Thanks, on chuushogi renmei site I found another set of rules where this rule is described differently from what ToriethPanda posted: https://www.chushogi-renmei.com/kouza/rule2007.htm

Perhaps, they are old rules since it says 2007 in the URL.

daxx00 commented 2 years ago

I'm happy to have found this.

1) [Game Length] Games do not tend to last 600-800 moves. If there is an appreciable difference in skill level, normally one player has a resignable position within 200 moves. 600 moves (600 ply) in chu shogi is about as impressive as 100 moves (200 ply) in chess.

2) [Checkmate] The game is over when a player has no more royals (i.e. they have all been captured). No serious entity in the history of chu shogi (JCSA included) disagrees with this. In Japan, I suppose 99% of people would have resigned by the time they are effectively "mated", but the game is not forcibly concluded at that time.

3) [FEN Notation] I don't proclaim to know much about keeping notation this way, but I have thought a fair deal about how to mark each type of piece with just one letter. I don't know how practical this is, considering it makes use of multiple alphabets, or how much simpler working with 1 letter per piece type is compared to 2 letters. At the very least, all the letter selections make at least a little sense. Screenshot_20220930-062712_Office

4) [Repetition] Concerning the previously discussed example: after the go-between and gold have made those first 3 moves, assuming no moves were of an attacking nature, player B would be allowed to bring their gold back to repeat the position. Then player A would be bound by the repetition rule (as the player to make the first move in the repeating sequence) to not move their go-between forward on the next move.

Repetition is the absolute last thing that should be considered, once everything else is perfect. It's messy, complicated, and VERY RARE. Liken this task to squaring the circle. Nobody has yet managed an in-app solution. To avoid implementing the repetition rules wouldn't be so bad.

AlexGTrick commented 2 years ago

Nice written, @daxx00! :)

Could you please also comment the case of illegal moves in Chu Shogi, for example, moving the only royal piece to the field under check? That matters in blitz games

daxx00 commented 2 years ago

It is perfectly legal to move a king or prince onto an attacked square, whether you have one or both of them. It's the player's task to make sure they keep their king safe, and if they make a mistake, it's up to the opponent to notice and capture their king.

A truly illegal move is when you move a piece in a way that it isn't allowed to move. The only place I know online that allows you to make any illegal move (thus losing) is shogi on 81dojo. Consecutive check repetition results in a loss on Shogi Wars, but all other forms of illegal move are not allowed. I understand why they allow it, and why all other places don't.

With chu shogi, there are many piece movements to remember. The desired audience will most likely not be familiar enough with the pieces to be trusted to always make legal moves. To keep it fun for everyone, it's best to have all legal moves highlighted when you click on a piece, and only allow those legal moves. And of course an option to disable the highlighting for those who don't need it.

AlexGTrick commented 2 years ago

It is perfectly legal to move a king or prince onto an attacked square, whether you have one or both of them. It's the player's task to make sure they keep their king safe, and if they make a mistake, it's up to the opponent to notice and capture their king.

Oh, I see. But in an online blitz game I insist at least on separate game setting to make moving the only royal piece under check illegal.

As I mentioned:

absolute inappropiate are the blitz situations, where someone moves his single royal pieces under check, and his opponent doesn't notice that, so the first player next move takes his royal piece away from check. That's quite a real scenario, if a "blitz" mode is actually byo-yomi play at 40 seconds per move, and players are not so experienced to remember all moves of all pieces.