It starts with [1,2,3,4,5] for the doors.Flannel Jesus wrote: ↑Wed Jul 24, 2024 11:50 am Are you iterating over all possible states and finding the one that matches (or that doesn't contradict, rather) all the given parameters?
Then, there are all the permutations of ["black","brunette","grey","red","blonde"], of which there are 5!=120.
So, you end up with potentially 5 x 120 = 600 partial solutions that look like:
[(1,"black")(2,,"brunette"),(3,"grey"),(4,"red"),(5,"blonde")]
or
[(3,"black")(5,,"brunette"),(1,"grey"),(4,"red"),(2,"blonde")]
...
Even at this stage, with just two properties injected, i.e. door_index and hair_color, quite a few partial solutions will turn out to be invalid.
Next, multiply the solution space by nationality. The solution space will have JavaScript objects with 3 assignments each. And so on.