fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
620 stars 197 forks source link

New Piece Types #444

Open PraseodymiumSpike opened 2 years ago

PraseodymiumSpike commented 2 years ago

Hi, I came across a new type of piece that I think would be interesting to add and allow for many interesting variants. These are big pieces that take up more than 1 square, as in this game: https://glukkazan.github.io/elimination/elehunt.htm.

Also, it would be really nice if you could add support for the bodyguards from hiashatar. It's a unique regional variant that isn't supported yet.

ianfab commented 2 years ago

Thanks for the suggestion. However, pieces occupying more than one square does not seem feasible in (Fairy-)Stockfish to me, since the relationship that one piece is on exactly one square and one square can contain at most one piece is a core of the current board representation.

Regarding bodyguards, the code so far generally assumes that the type of a piece does not impact the movements of a piece, but only the occupancy of squares does. The only exception is the Janggi cannon, which uses some workarounds to achieve that. So in principle such side effects of pieces are doable to some extent, but cause performance and maintenance overhead.

PraseodymiumSpike commented 2 years ago

I don’t know how easy this would be to program, but you could make a set of pieces that all move together and would therefore act as a big piece.

On Tuesday, March 8, 2022, Fabian Fichter @.***> wrote:

Thanks for the suggestion. However, pieces occupying more than one square does not seem feasible in (Fairy-)Stockfish to me, since the relationship that one piece is on exactly one square and one square can contain at most one piece is a core of the current board representation.

Regarding bodyguards, the code so far generally assumes that the type of a piece does not impact the movements of a piece, but only the occupancy of squares does. The only exception is the Janggi cannon, which uses some workarounds to achieve that. So in principle such side effects of pieces are doable to some extent, but cause performance and maintenance overhead.

— Reply to this email directly, view it on GitHub https://github.com/ianfab/Fairy-Stockfish/issues/444#issuecomment-1061590096, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXTR5WVWC4WPS7FKJD57ZPLU64OUJANCNFSM5QFAKW2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

PraseodymiumSpike commented 2 years ago

Wait, can you see my real name when I post here? If so, please don't tell anyone! Edit: I am asking this because I could see your real name in my email when you replied.

ianfab commented 2 years ago

Don't worry, it only uses the real name if you have it public on your profile page (as I do), otherwise the username is shown (as in your case).