Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bughouse options: drop mates, pawns drop ranks, piece stealing #811

Open
amatveiakin opened this issue Jul 10, 2024 · 2 comments
Open

Bughouse options: drop mates, pawns drop ranks, piece stealing #811

amatveiakin opened this issue Jul 10, 2024 · 2 comments

Comments

@amatveiakin
Copy link

Hi,
I am developing a bughouse server (bughouse.pro) and would like to add Fairy-Stockfish to it. Thank you so much for making it BTW, it's awesome!
I was wondering if you would be open to pull requests to support more bughouse rule variants.
Specifically, I would like to add three more options:

  • An option to forbid drop mates while still allowing drop checks. I think it could be a dropMates bool with the additional constraint that dropMates implies dropChecks.
  • More control over where pawns could be dropped. I see that FSF already supports firstRankPawnDrops and promotionZonePawnDrops. There is also a popular variant where pawns must be dropped at least two squares away from promotion. I'm not sure what would be the best way to proceed here. A third boolean flag feels too ad hoc to me. So I thought perhaps just add whitePawnDropRegion / blackPawnDropRegion.
  • An option to steal pieces from the other board on promotion. Since FSF only looks at one board, this boils down to a dynamic restriction on which pieces a pawn can promote to, depending on the pieces available on the other board.

Finally, I would like to extend the UCI protocol to allow adding variants on the fly so that I can actually use these :) Basically just feed a section of variants.ini directly to the engine.

Please tell me what you think about these options and whether you are open to supporting them in the engine.

@ianfab
Copy link
Member

ianfab commented Jul 10, 2024

Hi, thanks for making the site. Regarding your requests

  • Making legality dependent on whether it is checkmate is somewhat tricky, since you need full checkmate detection without actually executing. It might still be possible for a subset of games, but not as a generic option, see e.g. Inconsistent handling of illegal moves #48.
  • Piece type specific drop regions are planned Initial move and promotion region per piece type #618, and there already is a PR for it, but might still take a while to review and merge.
  • Since the numbers of pieces per color is fixed (2 standard sets), the pieces you can grab always are the complement of the pieces you have. Using that as a criterion should be more feasible than having something relying on input. Actually the promotionLimit, e.g., for grand chess works quite similarly, I think it just does not consider pieces in hand.
  • Adding variants on the fly should to some extent be doable, since there is 647853c, although that is of course not very elegant as an "API", but might still be an option.

PS: Not sure if you are aware, but the pychess devs are also working on bughouse since quite some time, so it might be worth getting in touch with them to exchange some ideas.

@amatveiakin
Copy link
Author

  • I was afraid that “no checkmates” would be the tricky one. I was mostly worried about performance, but you are saying it could it in principle impossible in some variants? Well, I guess with so many different options some of them are bound to be incompatible, so I hope this is not a blocker?
  • Re. “Piece type specific drop”: great! I'll wait for Initial move and promotion region per piece type #618 then.
  • Stealing promotion is not that simple unfortunately. First, it's usually only allowed to steal pieces from the board, not from the reserve. Second, you cannot introduce a check by stealing: this would lead to an awkward situation where it's your partner's turn while their opponent king is under attack.
  • Ah, so I can do something like load << [my-bughouse:bughouse] dropMates = false? This sounds perfect.

Yes, a few people told me about bughouse support in pychess since I released my server :) I definitely want to talk to them at some point, thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants