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

Fix algorithm implementation #2

Merged
merged 6 commits into from
Oct 6, 2023
Merged

Fix algorithm implementation #2

merged 6 commits into from
Oct 6, 2023

Conversation

Toflar
Copy link
Owner

@Toflar Toflar commented Oct 5, 2023

The test StateSetIndexTest::testResultsMatchResearchPaper() which represents exactly the paper (https://hpi.de/fileadmin/user_upload/fachgebiete/naumann/publications/PDFs/2012_fenz_efficient.pdf) is green.

However, as this additional test shows, there must be an error in the implementation. So StateSetIndexTest::testResultsMatchResearchPaper() probably passes by chance.

@ausi
Copy link
Contributor

ausi commented Oct 5, 2023

First issue (I think) I found is

$reachable->add($startState, $currentDistance);

Probably needs to be something like:

$reachable->add($state, $i + $currentDistance);

@Toflar Toflar changed the title Added failing test Fix algorithm implementation Oct 5, 2023
@Toflar Toflar merged commit 27fe48f into main Oct 6, 2023
3 checks passed
@Toflar Toflar deleted the issue branch October 6, 2023 07:27
@Toflar
Copy link
Owner Author

Toflar commented Oct 6, 2023

Thanks @ausi <3

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.

None yet

2 participants