Skip to content

Improve bughouse partner coordination#24

Open
Belzedar94 wants to merge 2 commits intomasterfrom
codex/enhance-partner-communication-for-bughouse
Open

Improve bughouse partner coordination#24
Belzedar94 wants to merge 2 commits intomasterfrom
codex/enhance-partner-communication-for-bughouse

Conversation

@Belzedar94
Copy link
Copy Markdown
Owner

Summary

  • add partner piece-flow analysis to share expected captures, drops, and outstanding requests with bughouse partners
  • support parsing new partner commands for requesting or banning pieces and maintain related handler state
  • report sit-status updates during bughouse coordination to improve time management feedback

Testing

  • make -j2 ARCH=x86-64 build

https://chatgpt.com/codex/tasks/task_e_68d12fd4d9c083229503d7da01be9365

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

src/partner.cpp Outdated
Comment on lines +540 to +553
uint64_t incomingMask = counts_to_mask(info.toPartner);
uint64_t deliverMask = incomingMask & partnerNeedsMask.load();
if (deliverMask != lastDeliveredMask)
{
if (deliverMask)
{
std::string deliverPieces = format_piece_counts(rootPos, info.toPartner, ~us, deliverMask);
if (!deliverPieces.empty())
ptell("feed " + deliverPieces);
}
else if (lastDeliveredMask)
ptell("feed -");

lastDeliveredMask = deliverMask;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Detect increases in delivered piece counts

The new piece-flow updater only sends a feed message when deliverMask changes, but deliverMask is a bitmask that loses the actual counts per piece type. If our partner requests two knights and we capture a second knight later, deliverMask remains the same and no new message is emitted, so the partner still believes only one knight is incoming. The logic should track counts (or the formatted string) rather than just the mask to ensure additional pieces of the same type trigger an update.

Useful? React with 👍 / 👎.

@Belzedar94
Copy link
Copy Markdown
Owner Author

@codex fix comments

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

Testing

  • make -j2 ARCH=x86-64 build

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant