An example: https://martinfowler.com/bliki/StaticSubstitution.html
835 karma · joined April 8, 2022
An example: https://martinfowler.com/bliki/StaticSubstitution.html
Code is an artifact, undesired debris.
The fewer lines, the better.
Ahh, my favorite nitpick from C++ not having sane default aliasing rules spills to the CUDA-land.
1. Analyze Rules: Extract valid patterns (modules) and their compatibility rules (adjacency constraints) from input or define them.
2. Initialize Grid: Create an output grid where each cell initially contains all possible modules (maximum uncertainty).
3. Choose and Assign: Select the cell with the fewest valid modules remaining. Randomly assign one compatible module to it.
4. Propagate Constraints: Update neighboring cells by removing modules incompatible with the newly assigned one. If a cell loses all options, a contradiction occurs.
5. Handle Contradiction: If a contradiction arises, either backtrack to a previous choice or restart the process.
6. Repeat: Continue from step 3 until all cells are assigned a module or an unresolvable contradiction occurs.
This is like saying an uninitialized integer has a superposition of all possible values. I find it a very convoluted way of saying "each tile has a set of possible next states" - dragging quantum terms to this is just confusing, in my opinion.
I've always found the name pretty misleading and grandiose, relative to what the algorithm actually does.
This only works if the model and its context are immutable. None of us really control the models we use, so I'd be sceptical about reproducing the artifacts later.
It really isn't.