KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network

Home Page:https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recommendations are not sorted by download count

JonnyOThan opened this issue · comments

image

If you install EnvironmentalVisualEnhancements (eve redux) directly, you get this window recommending a config. For some reason Whirligig World gets auto-selected, even though it has far fewer downloads than AVP or the stock configs.

We applied the sorting to the prompt that chooses mods to satisfy a dependency (#3934), not recommendations, which is a separate screen. (EVE unfortunately recommends the EVE config virtual module instead of depending on it.) Sorting recommendations is questionable since normally they reflect the order specified in the mods' relationships.

I'll look into whether we can control the ordering of providing mods for a given virtual module, at least...

Update, the current ordering is not related to the ordering in the mods' relationships; the recommendations are stored in a dictionary, and the ordering is the pseudorandom ordering of the key value pairs, then sorted by the related mod column.

Sorting by download counts would certainly be an improvement over randomness, but sticking to the original ordering from the mods' relationships might be better, need to consider that for a bit...

Another update, the pseudorandom ordering comes from the HashSet values of Registry.providers, not the dictionary, which seems to preserve the ordering it gets from RelationshipResolver.

Ah interesting. I don't have a strong feeling on whether they should be sorted by download count UNLESS it's via virtual module. Proposal: first level sorting is the order given in the netkan, then if any of those are a virtual module that subset of entries is sorted by download count.

What's the logic behind which one gets auto-selected then? Recommendations would always be auto-selected right? So why is only one entry checked here? Is it because checking all of them would be a conflict? Or is the same logic as described in #3934 coming into play where it's auto-selecting the top entry?

Ah interesting. I don't have a strong feeling on whether they should be sorted by download count UNLESS it's via virtual module. Proposal: first level sorting is the order given in the netkan, then if any of those are a virtual module that subset of entries is sorted by download count.

Yup, agreed. This is what I've tried to move towards in #4007.

What's the logic behind which one gets auto-selected then? Recommendations would always be auto-selected right? So why is only one entry checked here? Is it because checking all of them would be a conflict? Or is the same logic as described in #3934 coming into play where it's auto-selecting the top entry?

Each recommends relationship has one row that's checked by default. If it's a virtual module or an any_of list, it can also have several other rows that are unchecked by default. The KSP-RO folks in particular like this because they can recommend groups of mods that are mutually exclusive without creating confusion. The checked one is the first in the list of candidates, but the candidates for a virtual module were not arranged in any particular order up till now. As of #4007 it will be the one with the highest download count.