Group Abstract Group Abstract

Message Boards Message Boards

Generalizing "rules" and an example of generation of 2D-grid

POSTED BY: Malthe Andersen
15 Replies

Thank you Johann-Tobias and Malthe for the interesting post. I rendered a video of Johann-Tobias answer in 3d:

2d grid model example video

Just to examine the layout and the causality of the model.

Thank you again. Tuomas

POSTED BY: Tuomas Sorakivi

Yes. This forum is cursed. I had threads vanish ... just to reclaim them later.

Maybe it becomes necessary to look into alternative places.

POSTED BY: Malthe Andersen
Posted 5 years ago

Nicely done. I used negations in order to differentiate between different kinds of places on the graph, but using hypergraphs like this is a nice way to do that instead. I haven't read every detail of your code, but I think I get the idea, I also think that this idea is more powerful that simply creating 2D-grids.

Maybe one should think about hypergraph parts simply as normal parts of a graph, but with a "flag" placed there telling you, that this area of the graph is to be considered differently than the others. And placing these hypergraph parts correctly is the key to building the graph you want.

POSTED BY: Updating Name

Heureka.

As far as I can see, the code does not include the idea of negations, which is why squares are created where they should not.

You are right. Negations would have prevented it.

If negations should be simulated, it would probably require some updating of the code, since the idea is not implemented yet. But they can still be used as analytical tools. And even though my example ended up being wrong, I hope that some of the ideas could still be of use. Especially the idea about subrules.

I will ask about implementing negations. It seems a good addition. Randomly generating rules with negations is harder though.

The idea about sub rules wasn't new. I already used it in previous designs, however, a few hours before you commented i learned how to express multiple rules independently: WolframModel also takes a list of rules. Your design was the correct one. My previous designs conflated the builder of "coordinate system" with the "filler of space" (r1 vs r2) which is i never ended up with a flat space.

enter image description here

However you still got the problem of long tails.

I found it nicer to pre generate a (partial) pattern using just r1 and then fill is seperatly.

enter image description here

The current rules:

enter image description here

enter image description here

My represenations are not chiral, so i ran into problems with red, which could be solved by understanding that the problem was created by chirality.

enter image description here

The dot always points away from the coordinate axis.

enter image description here

The code looks like that:

WolframModel[{
    {
     {5,6,9,8,5,6},
     {1,2},{2,1},{2,4},{4,2},{4,3},{3,4},{3,1},{1,3},
     {4,6},{6,4},{6,5},{5,6},{5,3},{3,5},
     {6,9},{9,6},{9,8},{8,9},{8,5},{5,8},
     {6,7},{7,6},{7,10},{10,7},{10,9},{9,10},
     {7,11},{11,7},{11,12},{12,11},{12,10},{10,12}
    } -> {
     {4,111,7,6,4,111,4},
     {7,111,4,6,7,111,7},
     {4,111,7,6,4,111},
     {1,2},{2,1},{2,4},{4,2},{4,3},{3,4},{3,1},{1,3},
     {4,6},{6,4},{6,5},{5,6},{5,3},{3,5},
     {6,9},{9,6},{9,8},{8,9},{8,5},{5,8},
     {6,7},{7,6},{7,10},{10,7},{10,9},{9,10},
     {7,11},{11,7},{11,12},{12,11},{12,10},{10,12},
     {4,111},{111,4},{111,7},{7,111}
    },
    {
     {6,7,10,9,6,7,6},
     {1,2},{2,1},{2,4},{4,2},{4,3},{3,4},{3,1},{1,3},
     {4,6},{6,4},{6,5},{5,6},{5,3},{3,5},
     {6,9},{9,6},{9,8},{8,9},{8,5},{5,8},
     {6,7},{7,6},{7,10},{10,7},{10,9},{9,10}
    } -> {
     {4,111,7,6,4,111,4},
     {1,2},{2,1},{2,4},{4,2},{4,3},{3,4},{3,1},{1,3},
     {4,6},{6,4},{6,5},{5,6},{5,3},{3,5},
     {6,9},{9,6},{9,8},{8,9},{8,5},{5,8},
     {6,7},{7,6},{7,10},{10,7},{10,9},{9,10},
     {4,111},{111,4},{111,7},{7,111}
    },
    {{1,2,3,4,1},{1,2},{2,1},{2,3},{3,2},{3,4},{4,3}}->
        {{11,12,2,1,11},{1,2},{2,1},{2,3},{3,2},{3,4},{4,3},{11,1},{1,11},{11,12},{12,11},{12,2},{2,12}}
},{
    {1,2,3,4,1},{2,3,4,1,2},{3,4,1,2,3},{4,1,2,3,4},
    {1,2,3,4,1,2},{2,3,4,1,2,3},{3,4,1,2,3,4},{4,1,2,3,4,1},
    {1,2},{2,1},{2,3},{3,2},{3,4},{4,3},{4,1},{1,4}
}
, 32, "FinalStatePlot"]

Thank You, Malthe Andersen,

after solving this toy problem, we can strive to attack bigger problems. The solution has more potential for optimization to run faster but now we can finaly say that we can build a 2d grid.

That proposal is not quiet right but i got an idea. I am testing

Look at the attached PDF for another proposal.

It is not as lean as your design, but getting it working should be the first priority. Optimization can happen later. Naturally we still run into the problem that filling out the square areas takes longer than growing a line but that will stay around since we are restricted by some notion of causality.

Attachments:

Can you consider this design, where the colored triangle represent a oriented hyper edge which can be distinguished from each other.

enter image description here

enter image description here

enter image description here

Using the first rule alone i got it to evolve like this for 5 generations before funky stuff happens:

enter image description here

Bu i think i screwed up something else since the next step is wrong.

enter image description here

I have an idea how i can salvage your design if you give me a few more minutes,

As far as I can see, the code does not include the idea of negations, which is why squares are created where they should not.

But thanks for sharing this. There is certainly a mistake in my example, since (in my head) I applied the rule everywhere possible simultaneously each time. I will look some more at this when I have the time.

If negations should be simulated, it would probably require some updating of the code, since the idea is not implemented yet. But they can still be used as analytical tools. And even though my example ended up being wrong, I hope that some of the ideas could still be of use. Especially the idea about subrules.

POSTED BY: Malthe Andersen

I have tried to reproduce your work and have written the rules as such. I hope they are free of careless error

WolframModel[{
    {{1,2},{2,1},{2,3},{3,2},{3,4},{4,3}}->
        {{1,2},{2,1},{2,3},{3,2},{3,4},{4,3},{22,2},{2,22},{22,23},{23,22},{23,3},{3,23}},
    {{1,2},{2,4},{4,2},{2,3},{3,2},{4,6},{6,4},{5,6},{6,5},{6,7},{7,6},{6,8},{8,6},{7,9},{9,7}}->
        {{1,2},{2,4},{4,2},{2,3},{3,2},{4,6},{6,4},{5,6},{6,5},{6,7},{7,6},{6,8},{8,6},{7,9},{9,7},{4,111},{111,4},{111,7},{7,111}},
    {{1,2},{2,4},{4,2},{2,3},{3,2},{4,6},{6,4},{5,6},{6,5},{6,7},{7,6},{6,8},{8,6},{7,9},{9,7},{7,10},{10,7},{11,10}}->
        {{1,2},{2,4},{4,2},{2,3},{3,2},{4,6},{6,4},{5,6},{6,5},{6,7},{7,6},{6,8},{8,6},{7,9},{9,7},{7,10},{10,7},{11,10},{4,111},{111,4},{111,7},{7,111}}
}


,{{1,2},{2,1},{2,3},{3,2},{3,4},{4,3},{4,1},{1,4}}
, 5, "FinalStatePlot"]

Those result in this rule plot:

enter image description here

It is distorted by the graph plotting style but the topology looks correct.

This rule with these initial conditions:

enter image description here

follows this cancerous evolution.

enter image description here

enter image description here

enter image description here

enter image description here

The problem it that r1 can make it grow in any direction and can start to grow from any square. I already devised an approach based on hyper graphs to trim the space of allowed extensions in something close to a plane. Do you want to revise your strategy?

Do you have a recent version of Mathematica available?

I was actually inspired by your post to try to generate a 2D-grid. I tried using triangles and squares, but found that no matter what I always needed several different kinds of rules in order to merge or remove some of the triangles or squares that would be produced excessively. And I somehow needed to limit what points (that is, the valency of the vetices) the rules applied to. This is where my idea about subrules and negations came from. The rest of the new notations is simply making life easier.

POSTED BY: Malthe Andersen

I agree that a lack of negation imposes certain restrictions.

I tried to transcribe your rules from the pictures but the results were very unsatisfactory, as nothing prevents it from growing multiple northward arms from the central piece. I will post results soon as the first renders are out.

You might want to look into my "Failing to make a grid" post to get an idea how HyperGraphs might be used as markers to prevent this ill.

About negation: I don't think it has been applied in the model as of yet, but I see no reason why it wouldn't be allowed. The ultimate goal of all of this is to create a physical theory by using abstract graphs and rules to update these graphs. I see no physical reason why negation cannot be part of such a rule. Of course, it might not be needed in the end, but we cannot know that yet. The graphs you can generate without negations is certainly a subset of the graphs you can generate with it, but showing that those two sets are equal or that a physical theory does not need negations would be a nice discovery in my head. Or maybe one can show that negations lead to contradictions (which I doubt).

I do not have a code for that yet, unfortunately. I was only expanding on the current model, and demonstrated that some of these new notations made it easier to generate graphs of your desire.

About the points: I only drew the most crucial of them, while the "open" arrows simply indicate "something more". I tried to do my best to demonstrate the effect of each subrule.

POSTED BY: Malthe Andersen

Cool. I've been struggling to create a grid.

As far as i am aware it is not possible to create a negation in the WolframModel.

Do you have a code which produces those graphs using the WolframModel framework?

Why isn't the upper left point in r2 and r3 drawn?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard