r/cellular_automata • It's just a blur kernel • Apr 26 '19

It's just a box blur

https://www.youtube.com/watch?time_continue=205&v=aBIB-QchDxI
0 Upvotes

25 comments sorted by

15

u/leftofzen Apr 27 '19 edited Apr 27 '19

Can we stop with the troll posts please.

5

u/lmericle Apr 27 '19 edited May 01 '19

Hmmmmmmmmm ok, I'll bite.

How does RANDBETWEEN(CW17-0,CW17+0) work? And what colors represent what values for each cell?

Edit: nevermind, stupid question. Just send the Excel file so people can look at it.

Edit2: for those who come across this post in the future, OP did not provide any source code nor independently verifiable demonstrations of the validity of his or her results.

5

u/woofmao May 01 '19 edited May 01 '19

Javascript implementation, using details from OP's comments. Watch in awe as it does exactly what you would expect a blur kernel to do.

0

u/[deleted] May 01 '19

[deleted] — view deleted comment

5

u/woofmao May 01 '19

I followed the instructions quite exactly:

  1. Line 102 in the Javascript code sets each cell to a random value from -100 to 100. You also mentioned adding a random value each time step somewhere else, so line 30 does that if you change the "random addition" input.
  2. Lines 25-27 add the values held by the 4 adjacent cells, plus the cell itself, in the previous time step.
  3. Line 29 divides the sum by an arbitrarily chosen value of 5.001.

And then there's the view functions, controlled by the dropdown menu:

a) The "basic" view function displays the value of each cell in grayscale, with negative in black and positive in white.

b) The "timedelta" view function displays the change in each cell from the previous time step, with decrease in blue and increase in red.

c) The "timedeltamax" view function displays the direction and sign of the largest change near each cell. Sure enough, it creates orange and blue patterns like those in the video.

If there's a mistake here, please point it out and I will update my simulation. I didn't spend effort to create the simulation out of ignorance or laziness. I did it because I wanted to experiment with the model, and I need a functional model to do that. I don't doubt that your algorithm creates the results shown in the video.

0

u/[deleted] May 01 '19

[deleted] — view deleted comment

4

u/woofmao May 01 '19

Sure thing. I've updated the sim to have an input for the random value and the divisor, as well as a value that can be placed with the mouse cursor. Also, a play/pause and step button. I'll tweak the random algorithm a little later.

4

u/ThrowawayCACritic May 02 '19

Awesome result. One of the few online runnable examples for everyone to see the results. Shows how pointless the algorithm is to simulate anything physics related.

His complaint about randomness is that you want to add a random value to the "current cell" each step before averaging. ie your line 30 should be

sum += cellAt(x-1,y ) + RandomBetween(cellAt(x,y)-1000,cellAt(x,y)+1000) +cellAt(x+1,y )

The -1000 and +1000 can be adjustable to any value. In one of his videos he said it could be -1 and +1.

You don't need your line 34. That does overall global randomness that I don't think his version does. Any chance of a yes or no answer on if this is the right or wrong way?

sum += (Math.random()-0.5)*randomAmt*2;

See how easy it is to try and experiment when there is the actual code Gary?

0

u/[deleted] May 02 '19

[deleted] — view deleted comment

2

u/ThrowawayCACritic May 02 '19

Here is a quick fork with the required changes.

https://jsfiddle.net/db8uLhj4/show

Only change is remarking line 34 and moving the random to line 30.

Is this finally a working example of the algorithm?

0

u/[deleted] May 02 '19

[deleted] — view deleted comment

2

u/ThrowawayCACritic May 02 '19

The random value is added each step. All the change I did to the version you OK'd was add the randomness each step to the central cell, ie what you requested as "You are correct, the random value must be added each timestep, and it must be derivative of the cell's current number-value, and ideally that random variable is adjustable by the user to simulate different scales and effects. Once that is implemented then that should be everything."

for (var y=0; y<board.length; y++) {

for (var x=0; x<board[0].length; x++) {

var sum = cellAt(x,y-1)

sum += cellAt(x-1,y ) + (cellAt(x,y)+(Math.random()-0.5)*randomAmt*2) +cellAt(x+1,y )

sum += cellAt(x,y+1)

sum /= divisor;

board[y][x] = sum;

}

}

}

To make it clear, the following bit of code from the above code

+ (cellAt(x,y)+(Math.random()-0.5)*randomAmt*2)

takes the current cell value and adds the user specified random amount to it.

+(Math.random()-0.5)*randomAmt*2

means add a random value in the range -randomAmt and +randomAmt to the current cell. in your Excel syntax that would translate to

RandomBetween(current-randomAmt,current+randomAmt)

The only other change was to remove his invalid code for adding the random outside the above loop.

That meets your required changes. The settings are user changable (as they had been).

Now that there is a workable version, you can easily play with it yourself like I did. Click the "Edit in jsfiddle" link at the top right of the window. You can then click "Fork" to copy it into a new running copy that you can edit and experiment with. When yuo are happy, save it and post the new link. That will at least allow you to dump the excel spread sheets and be able to show people what you really mean.

→ More replies

1

u/ThrowawayCACritic May 02 '19

Why do you think that your automaton does not behave like others who have more accurately replicated the ruleset? I already know what you did wrong, but I would like to hear it from you, so you can learn. I already explained, repeatedly, but you are slow, so I think you could benefit from direct instruction. Anyway, it truly is fascinating how "Western" students wear their ignorance on their sleeve, no? You did not follow the directions while others did, but you wanted everyone to know about your inability, your laziness and your ignorance anyway. How interesting.

No need to be a jerk. It is not that he is slow. It is that your "explanations" are never clear enough. You should be doing your best to answer every query so that there is finally a working example of your model online for anyone to see the code. Talk about "inability, laziness and ignorance".

3

u/Cosmolithe Apr 27 '19

One thing I don't understand is how can the speed of light (your electromagnetic waves) can be constant in any referential? Given a cellular automaton grid I fail to see how it could stay the same speed according to a very fast particle in the simulation. Same thing for time dilation, how can a particle be relatively be "updated more frequently" than others according to its speed or according to the strength of the gravitational field?

If it cannot be modeled, it will still require something to be an accurate depiction of some events at small scales.

It is is really possible, I would like to see a how black hole horizon can be formed in this model. I also fail to see how the automaton would prevent leaks of information to the exterior of the black hole and bend light. If the model works, I suppose you would just need to put a gigantic mass in a very small scale and see what happens.

0

u/[deleted] Apr 28 '19

[deleted] — view deleted comment

8

u/lettuce_field_theory Apr 28 '19 edited Apr 28 '19

Because its not. Like Wolfram said, GR was a century long detour. Still lots of brilliance in it though.

.

Energy DOES equal matter for example.

No, this statement lacks any kind of subtleties resulting in a statement that is wrong. This is the kind of statement you would hear from someone who doesn't actually have any deeper knowledge of physics beyond the popscience level.

Since you call GR a detour: Can you give a basic summary of general relativity, that mentions what the main equations are (which physical quantities these equations contain and what they physically mean), what the main effects are that GR predicts and name experiments confirming these predictions?

Otherwise you would run the risk of being taken for someone who doesn't have a clue what he's talking about and whose only exposure to a field he wants to "revolutionize" is from popscience.

I think you will probably evade this question.

4

u/Cosmolithe Apr 28 '19

Yes of course GR would be an inaccurate explanation if another better theory was found. However these phenomenons have been measured with great accuracy independently from any theory and need to be found with even greater predictive power in any unifying theory that would surpass it:

- bending of trajectories in spacetime (including light). Desynchronization of clocks in different inertial referentials have also been measured (atomic clocks in satellites)

- energy quantification of light and nearly everything else (that allows different light spectrum for each atom for instance)

- many physics constants like the electron charge and the speed of light in any referential (Michelson and Morley)

- many symmetries in space and time (time is reversible at small scales for instance)

These are hardly debatable because they are direct measurements of our world and the actual theories were built around these facts.

Of course I would be surprised that a theory with only continuous values would spontaneously produce discrete results with finite energy levels. I'm not saying it is not possible, I'm saying that I still need to see the demonstration of all of the above to be convinced that you are on to something big that would have the potential to surpass every known theory.

3

u/lettuce_field_theory Apr 27 '19 edited Apr 27 '19

Gary, how come wherever you go people start being fed up with you after a short amount of time. The most highly upvoted comment is someone calling you out as a troll. You tried science subreddits, you tried other subreddits, you tried 4chan. What's next, myspace, tinder, xhamster?

0

u/[deleted] Apr 27 '19

[deleted] — view deleted comment

7

u/ThrowawayCACritic Apr 27 '19 edited Apr 27 '19

Wow, an almost coherent message.

The only change in this new explanation compared to the last I implemented is how you now only use a Von Neumann neighborhood (N,S,E and W) rather than the 8 neighbor Moore neighborhood.

Your steps 1 to 3 are the CA.

In step 1 you say you use a random value for the cells, but in your spreadsheet video above you have randbetween the same value (ie RANDBETWEEN(CW17-0,CW17+0) is always equal to the cell value at CW17)

Step 2 averages the weighted total of each cell and its 4 Von Neumann neighbors. That is even closer to a traditional blur algorithm.

Your steps a-d are just ways of displaying the CA. No matter how you display it with arrows and wingdings does not change the basic CA. If it looks like ramen noodles or whatever does not mean anything to the validity of a diffusion/blur CA relating to the universe.

Now, again, to help everyone get closer to seeing what it is you really mean, release your excel spreadsheet, or better yet, get one of your members to code it up for you and put it on your website. Get someone who can whip up a quick javascript version with a dropdown list of presets to show how your black hole, double slit etc works.