Talk:Wave function collapse: Difference between revisions

Content added Content deleted
mNo edit summary
Line 13: Line 13:
:: Also, ... after thinking about this a bit, it's not clear to me whether "edge of the image" (no adjacent pixels on one side or (for corners) two sides) should be treated as a "tile" (probably not: the other possibility, suggested by "tiling" is that each edge of a tile is connected to the opposite side of the image, meaning that we can select regions of pixels which would appear when repeating the image as a tile). But, ... I think that that kind of detail is an example of information which should go into the task description (if there was a task description). And... this gets back to the lack of any specific task examples presented here. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 07:40, 9 July 2022 (UTC)
:: Also, ... after thinking about this a bit, it's not clear to me whether "edge of the image" (no adjacent pixels on one side or (for corners) two sides) should be treated as a "tile" (probably not: the other possibility, suggested by "tiling" is that each edge of a tile is connected to the opposite side of the image, meaning that we can select regions of pixels which would appear when repeating the image as a tile). But, ... I think that that kind of detail is an example of information which should go into the task description (if there was a task description). And... this gets back to the lack of any specific task examples presented here. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 07:40, 9 July 2022 (UTC)
:: There's probably also a constraint that the replication tiles (e.g. 3x3 sized tiles) are "aligned" on a grid which matches that tile size. And, given the "tiling" concept, ... conceptually if we were generating an 11x11 image with 3x3 tiles we'd do something like construt a 12x12 image and then crop it to 11x11. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 08:14, 9 July 2022 (UTC)
:: There's probably also a constraint that the replication tiles (e.g. 3x3 sized tiles) are "aligned" on a grid which matches that tile size. And, given the "tiling" concept, ... conceptually if we were generating an 11x11 image with 3x3 tiles we'd do something like construt a 12x12 image and then crop it to 11x11. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 08:14, 9 July 2022 (UTC)
:: After playing with some implementations, I'm wondering if maybe there's a bit of smoke and mirrors in the implementation at https://github.com/mxgmn/WaveFunctionCollapse#. (I'm getting contradictions -- empty results -- so far for every attempt I've made, running my version of wave function collapse. This suggests that I am imposing a constraint which was not present in the github implementation. I have yet to determine what it is about my interpretation of the algorithm description which differs from that github implementation.)
:: After playing with some implementations, I'm wondering if maybe there's a bit of smoke and mirrors in the implementation at https://github.com/mxgmn/WaveFunctionCollapse#. Edit: no smoke and mirrors -- but the adjacency constraint is only one layer of pixels deep. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 10:00, 10 July 2022 (UTC)
:: For example, with a starting bitmap of:
::1 1 1 1 1 1 1 1 1 1 1
::1 1 1 1 1 0 0 0 0 0 1
::1 1 1 1 1 0 1 1 1 0 1
::1 1 1 1 1 0 1 1 1 0 1
::1 1 1 1 1 1 1 1 1 0 1
::1 0 0 0 0 0 0 0 0 0 1
::1 0 1 1 1 1 1 1 1 1 1
::1 0 1 1 1 0 1 1 1 1 1
::1 0 1 1 1 0 1 1 1 1 1
::1 0 0 0 0 0 1 1 1 1 1
::1 1 1 1 1 1 1 1 1 1 1
:: and generating a 6 by 6 bitmap using 3x3 pattern tiles, I want to generate a 2 by 2 collection of pattern tiles. I randomly pick the first tile, and it's a 3 by 3 collection of 1s. But (unless I've goofed horribly) there's no 3x3 pattern tile which can have that pattern both above it and below it. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 10:27, 9 July 2022 (UTC)
:::And, if I relax the tile condition at the borders, that works for small examples like this, but larger examples still tend to run into contradictions. So maybe to make this work we need a mechanism to ignore contradictions? (Or perhaps my implementation is flawed? .. what would be a test case for correctness here?) --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 14:10, 9 July 2022 (UTC)
::::Ah, I see one issue -- I should not be matching against the whole tile, I should only be constraining on the tile borders. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 09:09, 10 July 2022 (UTC)