Skip to content

Refactor promotion handling in MCTS logic - #19

Merged
Codex-Crusader merged 1 commit into
mainfrom
Codex-Crusader-patch-1
Sep 16, 2025
Merged

Refactor promotion handling in MCTS logic#19
Codex-Crusader merged 1 commit into
mainfrom
Codex-Crusader-patch-1

Conversation

@Codex-Crusader

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors promotion handling in the MCTS logic by removing redundant code and improving clarity in the promotion value calculation.

  • Removes redundant promotion mapping lookup in the MCTS simulation code
  • Introduces a temporary variable to store the promotion value for better readability
  • Minor formatting adjustment to a comment separator line

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread azlite_portfolio_clean.py
Comment on lines +347 to +348
promo_value = PROMOTION_MAP.get(mv.promotion, 0)
promo_idxs.append(promo_value)

Copilot AI Sep 16, 2025

Copy link

Choose a reason for hiding this comment

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

The removed line 347 in the original code suggests there was a redundant PROMOTION_MAP.get(mv.promotion, 0) call that wasn't assigned to any variable. The refactor correctly fixes this by storing the result in promo_value and using it, eliminating the wasteful computation.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

if adequate approve

@Codex-Crusader
Codex-Crusader merged commit 50ef432 into main Sep 16, 2025
0 of 2 checks passed
@Codex-Crusader
Codex-Crusader deleted the Codex-Crusader-patch-1 branch September 17, 2025 10:47
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

Successfully merging this pull request may close these issues.

2 participants