Make an unlocks tree #54

Open
opened 2025-12-16 04:17:17 +00:00 by Ghost · 4 comments
Ghost commented 2025-12-16 04:17:17 +00:00 (Migrated from codeberg.org)
Image
<img width="864" height="137" alt="Image" src="https://github.com/user-attachments/assets/d3081c3d-1aa7-40e2-ade8-b934408117f6" />
Ghost commented 2025-12-16 05:25:07 +00:00 (Migrated from codeberg.org)
Image

we are going to keep the prereqs checker strict, i.e. 15122 and 15150 will NOT return 15251

<img width="861" height="72" alt="Image" src="https://github.com/user-attachments/assets/799091b6-5e1b-4146-a857-465c94c2cd62" /> we are going to keep the prereqs checker strict, i.e. 15122 and 15150 will NOT return 15251
Ghost commented 2025-12-16 09:28:51 +00:00 (Migrated from codeberg.org)

Some other incorrect examples we found that might be useful as testcases:

  • Unlocks 36202 AND 36208 returns 36303 but it has prereqs 36-208 or 36-202 or 36-309 or 36-220 or 36-226 or 36-326 or 70-208 or 36-236 or 36-218
  • Unlocks 76106 AND 76102 returns 76390 but it has prereqs (76-101) or (76-102) or (76-106 and 76-107) or (76-107 and 76-108) or (76-106 and 76-108)
Some other incorrect examples we found that might be useful as testcases: - Unlocks `36202 AND 36208` returns `36303` but it has prereqs `36-208 or 36-202 or 36-309 or 36-220 or 36-226 or 36-326 or 70-208 or 36-236 or 36-218` - Unlocks `76106 AND 76102` returns `76390` but it has prereqs `(76-101) or (76-102) or (76-106 and 76-107) or (76-107 and 76-108) or (76-106 and 76-108)`
Ghost commented 2025-12-24 23:18:58 +00:00 (Migrated from codeberg.org)

Two questions:

  • Theoretically this won't happen, but do we know any cases where the prereq tree would cycle?
  • How do we want "unlock-qualifying" behavior to work? Let's say we had a course A, which has unlock string "(B or C) and D", which courses should list A as an unlock? Is there some general rule I can implement?
Two questions: - Theoretically this won't happen, but do we know any cases where the prereq tree would cycle? - How do we want "unlock-qualifying" behavior to work? Let's say we had a course A, which has unlock string "(B or C) and D", which courses should list A as an unlock? Is there some general rule I can implement?
Ghost commented 2025-12-25 01:11:17 +00:00 (Migrated from codeberg.org)
  1. i don't think that can happen, because prereqs would imply e.g. you need course A to register for course B, but if you needed course B to register for course A...
  2. hmm this is going to be a very weird explanation please ask if you have more questions
    imagine the unlocks tree for a course A is (B or C) and D, it would look something like
           A
         /    \
    [B, C]  D

and then say, for course B, the unlocks are E and F

         B
       /   \
      E    F

so all the unlocks string that A would be in, would be anything that "fits" the "pant legs" of the unlocks tree (or in other words you can overlay it onto the tree)

examples:
B AND D should unlock A
B AND C should not unlock A
(C OR G) AND D should unlock A
E AND D (who knows! please discuss with the rest of us because lowkey we have no idea right now)
E AND F should unlock A

from anish:
Image
Image
perhaps take this into account as well

1. i don't think that can happen, because prereqs would imply e.g. you need course A to register for course B, but if you needed course B to register for course A... 2. hmm this is going to be a very weird explanation please ask if you have more questions imagine the unlocks tree for a course A is `(B or C) and D`, it would look something like ``` A / \ [B, C] D ``` and then say, for course B, the unlocks are `E and F` ``` B / \ E F ``` so all the unlocks string that A would be in, would be anything that "fits" the "pant legs" of the unlocks tree (or in other words you can overlay it onto the tree) examples: `B AND D` should unlock A `B AND C` should not unlock A `(C OR G) AND D` should unlock A `E AND D` (who knows! please discuss with the rest of us because lowkey we have no idea right now) `E AND F` should unlock A from anish: <img width="1500" height="303" alt="Image" src="https://github.com/user-attachments/assets/b102d58d-ff0b-405e-b77c-62075c4689de" /> <img width="884" height="132" alt="Image" src="https://github.com/user-attachments/assets/94a017ed-d93e-4e8e-8a49-84f7c9f9a583" /> perhaps take this into account as well
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/dalmatian#54
No description provided.