26:22 that's an interesting way of doing cyclic permutations, I imagine for such small arrays it doesn't really matter, but you could filter for positions in side1 where the first element of side2 occurs and just consider those offsets (might only be one). So maybe like let matching_start_offsets = (0..6).filter(|i| side1[i]==side2[0]); for i in matching_start_offsets { if (0..6).find(|j| side1[i+j%6] != side2[j]).is_none() { return true; } } return false Also wave function collapse is pretty much equivalent to the method of constraint propagation? Entropy is just counting the number of configurations, so its the same as the policy of setting the most constrained tiles first, to reduce the likelihood of backing yourself into a corner early, the flexible slots can be left until more is determined... P.S. There an MIT open course lecture on this and more by Patrick H. WInston, its really good, there's a bunch of other things like Dijkstra's/A* that you can express as a graph search which you can just do with a cue of nodes to visit and picking things from the queue in different ways...
Ugh what a perfect intersection of all of my interests lol. Thanks for this.
Thanks for sharing your project, and love of Rust!
26:22 that's an interesting way of doing cyclic permutations, I imagine for such small arrays it doesn't really matter, but you could filter for positions in side1 where the first element of side2 occurs and just consider those offsets (might only be one).
So maybe like
let matching_start_offsets = (0..6).filter(|i| side1[i]==side2[0]);
for i in matching_start_offsets {
if (0..6).find(|j| side1[i+j%6] != side2[j]).is_none() {
return true;
}
}
return false
Also wave function collapse is pretty much equivalent to the method of constraint propagation? Entropy is just counting the number of configurations, so its the same as the policy of setting the most constrained tiles first, to reduce the likelihood of backing yourself into a corner early, the flexible slots can be left until more is determined...
P.S. There an MIT open course lecture on this and more by Patrick H. WInston, its really good, there's a bunch of other things like Dijkstra's/A* that you can express as a graph search which you can just do with a cue of nodes to visit and picking things from the queue in different ways...
The DBUS TUI sounds really useful! Can I have a link?