Skip to content

Define equality of MCState#21

Open
ruddyscent wants to merge 4 commits intodavecom:masterfrom
ruddyscent:ruddyscent-patch-1
Open

Define equality of MCState#21
ruddyscent wants to merge 4 commits intodavecom:masterfrom
ruddyscent:ruddyscent-patch-1

Conversation

@ruddyscent
Copy link
Contributor

@ruddyscent ruddyscent commented Oct 29, 2023

While debugging missionaries.py, I discovered that the explored set accumulates duplicate MCStates.

To solve this problem, I've overridden the __eq__ and __hash__ of the MCState.

This patch resolves the issue [#22]

If __eq__ and __hash__ are not defined, duplicated MCStates will be piled up in the explored set.
A base number should be bigger than a digit.
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