| … | … | @@ -92,3 +92,29 @@ different subjects). |
| 92 | 92 | |
| 93 | 93 | Do we need to have explicit "must-form-a-cycle" rules? Can we do this |
| 94 | 94 | statistically? |
| 95 | |
| 96 | |
| 97 | |
| 98 | Literature |
| 99 | ========== |
| 100 | |
| 101 | Wave-function Collapse |
| 102 | ---------------------- |
| 103 | The "wave-function collapse algorithm" described by Marian, "[Infinite |
| 104 | procedurally generated city with the Wave Function Collapse |
| 105 | algorithm](https://marian42.de/article/wfc/)" (2019) appears to be a |
| 106 | good way of assembling pieces in a fixed n-dimensional world. |
| 107 | |
| 108 | It divides the universe into blocks (for sentence generation, this would |
| 109 | be a 1-D universe - a linear string). It selects a location in this |
| 110 | grid, picking the grid-point with the lowest entropy. Naively, this is |
| 111 | the slot with the fewest choices. More formally, its the slot with the |
| 112 | smallest S = -sum_i p_i log p_i where -log p_i is the "cost". A single |
| 113 | probability-weighted choice is made for that slot, and then the process |
| 114 | is repeated. |
| 115 | |
| 116 | It is not clear how to enforce additional conditions, such as |
| 117 | no-links-crossing, with this algo. |
| 118 | |
| 119 | Code for the blocks-world algo is here: |
| 120 | https://github.com/mxgmn/WaveFunctionCollapse |