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

Scramble Matching With multiple groups in FMC produces unexpected Results #14

Open
Jambrose777 opened this issue Sep 23, 2020 · 5 comments · May be fixed by #16
Open

Scramble Matching With multiple groups in FMC produces unexpected Results #14

Jambrose777 opened this issue Sep 23, 2020 · 5 comments · May be fixed by #16

Comments

@Jambrose777
Copy link
Contributor

Jambrose777 commented Sep 23, 2020

When using the scramble matcher on FMC, if the Delegate has multiple groups of scrambles; instead of producing results with multiple groups of scrambles, the result json will have 1 group with double the scrambles.

Example:
TestingFMC.zip
I generated a Results JSON with 1 round of FMC 3 attempts (TestingFMC (1).xlsx)
I also generated Scrambles for 1 round of FMC 2 groups (Testing FMC.json)
I entered them in the scramble matcher and automatically assigned scrambles. Here is a screenshot of that:
image
The results json is also included in the zip. (Results for testingFMC.json)

On the one hand there should pretty much never be multiple scramble sets used for FMC. But on the other, this behavior of the Scramble matcher will cause errors if that were to ever happen.

If this is fixed on the scramble matcher, I think it would also be nice to include a warning in the Result Submission process so WRT can investigate when the Delegate uploads results. Issue for that: thewca/worldcubeassociation.org#5725

@Jambrose777
Copy link
Contributor Author

FYI: There are 22 scrambles that are of a different group in FMC. WRT will investigate these cases.

@jonatanklosko
Copy link
Member

@viroulep I've just had a quick look and this seems to be the code responsible for that:

} else if (eventId === '333fm') {
// We can't track yet in the WCIF which scramble was for witch attempt,
// so let's just sort them by attempt id and combine them in one
// scramble sheet.
// There is usually only one group for FM, the only case where we would
// like more scramble than expected is when something terrible happened
// and an extra was needed.
return [
{
id: scrambles[0].id,
scrambles: flatMap(
sortBy(scrambles, s => s.attemptNumber),
s => s.scrambles
),
extraScrambles: [],
},
];
}

As far as I can tell the FMC scrambles are internally split into one set per attempt, so given 2 groups of 3 attempts there are 6 internal scramble sets. The above code then merges them all into one scramble set, as if there was just one group. Any reason for handling this differently than MBLD, which handles multiple groups? (directly above the referenced code)

@jonatanklosko
Copy link
Member

I believe this has been fixed in #15. Correct me if I'm wrong =)

@Jambrose777
Copy link
Contributor Author

I don't believe it did. That PR fixed the issue with not being able to have multiple groups of any events due to the UI bugging out. This has to do with how FMC scrambles are generated after they have been properly selected in the UI.

@jonatanklosko
Copy link
Member

Ah, gotcha!

@jonatanklosko jonatanklosko reopened this Oct 7, 2020
@Jambrose777 Jambrose777 linked a pull request Jan 5, 2021 that will close this issue
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 a pull request may close this issue.

2 participants