News for hackers. Stuff that matters.
Re:Infinite procedurally-generated city with the Wave Functi... by rntz on Tuesday November 13, 2018 @06:34PM (#18445911)
If this is based on wave-function collapse, what does it do when it hits an impossible/contradictory state?

(See https://github.com/mxgmn/WaveFunctionCollapse where it mentions "It may happen that during propagation all the coefficients for a certain pixel become zero. That means that the algorithm has run into a contradiction and can not continue.")

Re:Infinite procedurally-generated city with the Wave Functi... by marian42 on Tuesday November 13, 2018 @06:40PM (#18445943)
In the algorithm as it's described on that page, nothing is returned in case of a failure. I first implemented it so that single blocks would fail and a white cube would spawn at that position. Now, it uses backtracking. It keeps a history of its decisions and removes some whenever it reaches a contradiction.