Talk:Wave function collapse: Difference between revisions
m
→Rebuilt task description: grammar
m (→Rebuilt task description: grammar) |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 18:
: And/or, instead of scanning the full list of unassigned grid locations, we could instead maintain a list of unassigned grid locations for each level of entropy. For the current task example, this would be four lists, corresponding to entropy 2, 3, 4 or 5. Here, we would want data structure support locating a list entry from a grid location, and vice versa, and it would be convenient to also be tracking the length of each list. But the extra storage and data movement weight per-item would tend to be countered by the need to inspect fewer grid locations in each iteration (adding a tile to the grid would change entropy for at most four grid locations).
: There's probably other possibilities (some which might have better performance on large examples due to memory cache structures). That said... for rosettacode, it's probably best to ignore optimizations which
:One thing (which may stem from all the original stuff) I just don't get is why the task description has to redefine "Tiled" to mean "Overlapped[-by-one-matching-pixel]". It turned out very helpful to display things non-overlapping and hence in my mind they should co-exist. All the references are about making tiles from an image, and it should probably be clearer that's not done here, and/or stress those links are ''many times'' more complicated than this task requires. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 00:32, 15 July 2022 (UTC)
:: I believe that that "one pixel overlap" constraint is necessary to satisfy ''(C1) The output should contain only those NxN patterns of pixels that are present in the input'' from https://github.com/mxgmn/WaveFunctionCollapse
:: If the tiles do not overlap, we are introducing a new bit pattern where the the edges lie side-by-side and thus some rows/columns would be duplicated where that never would have occurred in the original.
:: Though, granted, this assumes that there was an original. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 05:26, 15 July 2022 (UTC)
:::Erm, what I was trying to say is you absolutely have to have overlapping, and indeed it defines the final result. What I don't get is why you[/they?] want to call that "Tiled". Not a massive deal. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 06:03, 15 July 2022 (UTC)
:::: Giving things good names is difficult. For that matter, documenting things well is difficult. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 12:10, 15 July 2022 (UTC)
::::: What I really want to say is "Note it is not possible to verify the correctness of an (overlapped) result, unless you highlight any mismatching pixels in some bright colour (or use a different character), or [optionally] display the result in non-overlappng mode." --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 19:35, 15 July 2022 (UTC)
:::::: I think you mean that you do not trust other forms of verification. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 19:43, 15 July 2022 (UTC)
== Vote for deletion ==
We have been getting a bunch of new tasks lately with absolutely no verbiage or explanation of algorithm on the "task" page other than a link to "See the algorithm over there". If you can't be bothered to put summary a explanation of the algorithm, and better yet, an reference implementation, enough for a knowledgeable person to figure out how to do it, it comes across as a low effort attempt to drive traffic to somebodies monetized video / page. Not what RosettaCode is about. As it stands, I vote for deletion on this task. I have similar low opinions of [[Boyer-Moore string search]], [[Knuth-Morris-Pratt string search]] and [[Execute_Computer/Zero]], but those are issues for other discussion pages. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 21:51, 8 July 2022 (UTC)
: <del>Seconded</del> (rescinded 14/7). Also added a clarify task tag to the main page. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 02:44, 9 July 2022 (UTC)
::Thirded? I've added a ref to boristhebrave.com, couldn't not in the current climate. We need to define the input file set. Each tile could be represented by four numbers N S E W. The constraint is N must match S vertically and E W horizontally. The concept of least entropy is essentially Warndorf and I've explored extending that beyond Knights tour elsewhere on RC.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 09:17, 9 July 2022 (UTC)
I've made this task before this video, but based on other videos. https://github.com/darkfrei/love2d-lua-tests/blob/main/wave-function-collapse/main.lua
Line 34 ⟶ 50:
:: 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#. 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)
== Solutions ==
|