Git Product home page Git Product logo

Comments (8)

kchapelier avatar kchapelier commented on April 28, 2024 1

Regarding the C++ implementation, you might want to check the port by Emil Ernerfeldt https://github.com/emilk/wfc

from wavefunctioncollapse.

nanodeath avatar nanodeath commented on April 28, 2024

Not speaking for the maintainer here, but there are a lot of little enhancements that could be made to this codebase, but I'm not necessarily sure that we should make them. I'm treating this repo as a "reference implementation" for how (algorithmically) to do various things, and not how to, uh, actually organize code. If there was another C# version that was usable as a library (along with the inevitable C/Java/whatever ports that spring up), that would be the optimal place to put optimizations like the one you're speaking of, IMO. Just a thought.

from wavefunctioncollapse.

nanodeath avatar nanodeath commented on April 28, 2024

A wild bot appears!

from wavefunctioncollapse.

mxgmn avatar mxgmn commented on April 28, 2024

@petersvp You can try setting periodic="False" for smaller contradiction rate. To decrease them even further I would have to modify the algorithm: adding backtracking or Merrell's heuristic.

from wavefunctioncollapse.

Asmageddon avatar Asmageddon commented on April 28, 2024

@mxgmn I believe what @petersvp wanted to suggest was making the code easier to dissect, which I think is a valid recommendation.

Also, out of curiosity, what is Merrell's heuristic?

from wavefunctioncollapse.

Asmageddon avatar Asmageddon commented on April 28, 2024

Also, would it perhaps be possible to solve contradictions with backtracking not the algorithm, but rather, say, 2^X regions/pixels around the contradiction, and trying to solve again for that?

from wavefunctioncollapse.

mxgmn avatar mxgmn commented on April 28, 2024

@Asmageddon @petersvp I don't see any particular way to make code structure better. If I make I/O completely independent from logic, I would have to sacrifice much in brevity, they are already separated quite well. If you have a specific suggestion, please make a PR.

@Asmageddon Merrell's heuristic is a heuristic Paul Merrell uses in a paper that is the main inspiration for this work, I linked it in the reference section.

2^X regions/pixels around the contradiction, and trying to solve again for that

Yeah, it's a possible alternative. It's easier to implement, but I think that Merrell's method or backtracking will be better, because contradictions have nonlocal nature.

from wavefunctioncollapse.

Asmageddon avatar Asmageddon commented on April 28, 2024

Oh, they do? I suppose that was something to be expected.

from wavefunctioncollapse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.