Skip to content

Fix LeafMoveMatcherThetaE #393

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pouryafard75
Copy link
Contributor

@pouryafard75 pouryafard75 commented Aug 9, 2025

This PR fixes a bug in the ThetaE optimization logic where adding a new mapping could leave srcToDst and dstToSrc inconsistent.

In certain cases, a new mapping is added without first removing existing conflicting entries. This can cause one of the maps to still hold the old mapping, leading to lost mappings in the final result.

Example commit demonstrating the issue:
pouryafard75/TestCases@fb4498b

Before optimization:
Before optimization

After optimization:
After optimization

My proposed fix:
Before adding a new mapping, clear any existing entries in both srcToDst and dstToSrc that conflict with it. This ensures the maps remain consistent.

@pouryafard75
Copy link
Contributor Author

Before fix:
image

After fix:
Screenshot 2025-08-09 at 2 11 53 AM

@pouryafard75
Copy link
Contributor Author

@jrfaller This one is ready.

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.

1 participant