Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement the autocompletion of the user input? #29

Closed
MatveyK opened this issue Oct 30, 2016 · 5 comments
Closed

How to implement the autocompletion of the user input? #29

MatveyK opened this issue Oct 30, 2016 · 5 comments

Comments

@MatveyK
Copy link

MatveyK commented Oct 30, 2016

Hello, awesome work on this algorithm. Really cool stuff.

I'm still reading the code and getting a grip on what's happening, so I don't understand every part of the code yet. But in the readme you give an example of a human started level completed by the algorithm. So I tried to implement that.

I tried manually creating a wave that has only one coefficient set to true on the tiles that I draw, with the rest set to false. I then set that as the wave in the simple tiled model. But this approach doesn't work as the algorithm always fails after about 19 iterations (using the Castle example). (Basically as soon as the propagation reaches the user defined tiles, the result is unsuccessful).

Could you explain how did you do the autocompletion?

@NikkyAI
Copy link

NikkyAI commented Oct 30, 2016

i hope i can help a little ..
i made myself a little table to understand how it works

as far as i understand you match the right side of the left piece and the left side of the right piece
the left piece can be rotated left by x the L x number pointing to where the side thats compared will end up
the right piece cna be rotated right by x and i marked it using R x

L 3 R 1
bridge L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
component L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
connection L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
corner L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
dskew L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
skew L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
substrate L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
t L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
track L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
transition L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
turn L 2 L 0 R 0 R 2
L 1 R 3
L 3 R 1
vias L 2 L 0 R 0 R 2
L 1 R 3

PS: i am working on a script that generates the neighbor entries based on which faces/connections a tile has.. it also supports things like (circuit example again) connection has to connect to component_internal, component_internal, can connect to components,
essentially circumeventing mini chips if i had only compare equality of face/connection names

i will share the script here probably

@selfsame
Copy link

@MatveyK I believe @mxgmn mentioned you have to call Propagate a few times after manually writing the wave coefficients? Interested in how to set this up as well :)

@mxgmn
Copy link
Owner

mxgmn commented Oct 30, 2016

Hi! After setting up the wave (=observing with predetermined results) you need to propagate the obtained information with while(Propagate());. See, for example, how I set up the ground constraint in OverlappingModel.Clear().

@mxgmn
Copy link
Owner

mxgmn commented Oct 30, 2016

@NikkyAI Yeah, the quickest way to setup adjacency data is just to label the edges of each tile. Then the settings xml files for each tileset would be very short. However, this works only with transitive adjacency data - if tile A can connect to tiles B and C then tiles B and C should also connect. Knots and Circles tilesets are transitive, the others - not.

@mxgmn
Copy link
Owner

mxgmn commented Oct 30, 2016

I explained how to handle constraints in more detail in this issue.

@mxgmn mxgmn closed this as completed Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants