Comments (8)
Regarding the C++ implementation, you might want to check the port by Emil Ernerfeldt https://github.com/emilk/wfc
from wavefunctioncollapse.
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.
A wild bot appears!
from wavefunctioncollapse.
@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.
@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.
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.
@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.
Oh, they do? I suppose that was something to be expected.
from wavefunctioncollapse.
Related Issues (20)
- [not an issue] using this algorithm in a game engine plug-in HOT 1
- potentially erroneous entropy calculation HOT 1
- Java implementation HOT 1
- Neighbor constraints do not always appear to be enforced HOT 6
- Can't run it on Mac OS HOT 4
- Deadlock when collapsing HOT 4
- "Voxel models generated with WFC and other algorithms will be in a separate repo." HOT 2
- Reuse parts of outcome as constraints, and still obtain the same outcome? HOT 5
- Implementation in C HOT 2
- Description of entropy HOT 1
- Return value of Propagate HOT 5
- How to generate an XML data file for simpletiled from an image file? HOT 1
- Unable to get the program to work in Windows 10 HOT 11
- 太棒了!!!
- Please comment the code! HOT 6
- This project is using the name "Wave function collapse" for a process that is not the physics Wave Function Collapse HOT 2
- N values above 3 hang HOT 1
- Suggestion for a different name: Sudoku Collapse HOT 2
- Generate from a pre-defined output image HOT 4
- What is the best way to enforce some tiles (simple tiled model) to not be rotated? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wavefunctioncollapse.