Confusion: Small2 and Owl Min-Path Test

Hello everyone,

I just finished my find_print_min_path function and tested it. For the tests
public.min_path.optimal_path_tall and public.min_path.small1 everything is fine and it works. But for public.min_path.small2 and public.min_path.owl it isn’t anymore… I looked into the reference files and noticed, that the expected output was in the exact mirrored order than the result my program yielded.

First I thought: ok, must be my print order. But then I realized: The order was correct for optimal_path_tall and small1, but wrong for the others? I checked if maybe the references of the first two were maybe like palindromes, so their order wouldn’t matter and the tests would pass for every implementation. But they aren’t.

There are two possibilites, I could think about: The references for owl and tall are maybe screwed for me, OR I messed something up.

To make it more clear, here my results compared to the reference file:

Result comparisons

Correct Case: small1
Expected output:

2
2
1

My program yielded:

2
2
1

Correct Case: optimal_path_tall
Expected output:

1
2
1
0
0
1

My program yielded:

1
2
1
0
0
1

Wrong Case: small2
Expected output:

0
0
1

My program yielded:

1
0
0

Thanks in advance,
David

To check whether the you modified the reference files, type git log --name-only test/ in the project root. This gives you a list of all commits that modified files there, listing which files they modified.

Nope, no changes made by me:

image

Nvm, I was just very dumb.
Here’s what I did:

  • I misunderstood how the min_energy_column was selected. So, I didn’t implement the correct preference.
  • Also, I printed the symbols of seam in the wrong order. By coincidence, this produced for small1 exactly the expected output. But for small2 it failed.

Now it’s working just fine :slight_smile:
Thanks for @johannes for convincing me, that the reference outputs were correct and I was wrong.

Thanks!

1 Like

4 posts were split to a new topic: Proplem with min_path_owl