[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I wrote a program that generates Game of Life rules, with those

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 48
Thread images: 7

File: Capture.png (37KB, 513x517px) Image search: [Google]
Capture.png
37KB, 513x517px
I wrote a program that generates Game of Life rules, with those rules being an array of 256 bits, saying if a cell will be on or off for each pattern of neighbours.
Conway's Game of Life isn't possible with this setup, I know, but sometimes some interesting patterns form.
Sometimes it will look like there are rivers within the pattern, and sometimes right-angled structures will form.

But I am but a human, while a computer could look at a thousand patterns in the blink of an eye and decide which are interesting if I told it how.
How should I get it to look for interesting patterns?
One idea is to classify an "interesting pattern" as one where if it samples a bunch of random cells, nearby cells are more likely to be the same state than far away cells, homogenous patterns don't have that trait.

But that won't pick up interesting stuff like non-homogenous behaviour within what looks like noise, such as the "rivers" I described earlier.
>>
Maybe try finding an algorithm to reduce static or snow in images. Those generally work on removing randomness.
>>
I don't know, but post a gif of an interesting world for our entertainment
>>
>>57334004
Maybe you should evolve a neutral network to do this. Might turn out interesting.
>>
>>57334004
The brain is really good at finding patterns to the point of fault. Like, it's absolutely addicted to finding patterns, even when they don't exist. It seems like you've just generated a program to produce a lot of random noise.
>>
>>57334004
Here's my suggestion: check how many steps it takes before each rule set (starting from some random pattern--which is what I assume you're doing) degenerates into a periodic or otherwise stable state. The longer it takes, the more interesting. Should be easy to program that.
>>
>>57334060
None of the ones I've seen so far degenerate.
Well, I think one might have ended up in a periodic state, but I forget it that was before or after the last bugfix.
>>
File: Untitled-1.png (32KB, 1014x948px) Image search: [Google]
Untitled-1.png
32KB, 1014x948px
Oh, I should probably post this, here's several frames of the generated patterns that I thought were particularly interesting.
>>
>>57334610
pretty cool stuff
>>
>>57334610
Pretty fucking boring. I still don't get what exactly you did. Could you describe it in more detail?
>>
Imagine a cell's neighbours labelled from 0 to 7.
When deciding what colour to be, a cell will set a variable to zero, then for each neighbour that is "on" add 2^n to that variable (where n is the label of that neighbour).
This will produce a number from 0 to 255, one possible number for every possible combination of neighbours.
It then uses that number to choose an index of the "rules" array, which is 256 randomly generated trues and falses.
If the index is true, it becomes "on", else it becomes off.
>>
>>57334610
are you using uniform randomness?
>>
>>57337230
You mean equally likely to produce a true and a false?
I was, but I'm experimenting with weighted values right now.
Seems that it tends to produce patterns that simply evaporate into uniformity if I make it only be true (or false) in roughly 10% of cases.

But, you can get patterns where in almost all cases it's false but if a cell is surrounded by false it will be true, therefore you probably get a strobe light.
>>
>>57337220
You really need to learn how to communicate your ideas in a more structured way. I got it eventually, but the way you are mixing up implementation and concept is horrible to read and understand.

Anyway, doesn't sound too interesting to me.
>>
>>57334004
neat

Pattern detection is hard, as it is subjective to assumptions

here are some ideas I thought of, start with some simple checks like

1. randomly picking a spot and seeing how many connecting squares the system can follow till termination (how long the lines are), include check to deal with loops (heck it could check number of loops as another category, but that might be harder)
2. percentage of white to black space
3. try #1, but with a direction dependency, like only connecting diagonals or verticals

make up more rules and adjust values to find patterns, things that match the rule and value should look simpler. So changing the order of checks and values should highlight the more extreme cases.
>>
>>57334004
fuck every other reply in this thread

make it into random QR codes
>>
>>57337284
There is one interesting thing about it.
There's 2^256 possible patterns it can generate.
2^254 if you disqualify patterns that are rotations of each other.
Roughly 2^253 if you disqualify patterns that are mirror images of each other.

Amongst the 2^253 possible patterns, there's probably quite a number that are truly beautiful in comparison to Conway's rules.
With a powerful computer, an algorithm for identifying interesting patterns, and enough time, one could perhaps find one.
One could also very simply extend that to evolve patterns instead of generating them at random, which might speed up the process massively.

>>57337308
I could combine 1 and 2 by having it check to see if the only reason it can connect pretty much all the white squares is because it can barely connect any black squares, and vice-versa.
That'd deal with false positives well.
I should probably sleep though, it's 3am.
>>
>>57334004
Try and measure the "length" of structures. Higher length value being more interesting.
>>
>>57337408
Oh, that gives me an idea!
Perhaps the "interestingness" of a pattern could be the maximum black squares it can connect, times the maximum white squares.
On a 100x100 board, if a pattern somehow managed to divide the board into two uniform regions of equal size (which would be very interesting), it would have an interestingness of 25,000,000, and higher than that is mathematically impossible.
Random noise would only get into the hundreds if only orthogonal connections were allowed, thousands if diagonals were allowed.
>>
>>57334004

>How should I get it to look for interesting patterns?

I would guess a pattern is intersting if you have big white areas (tiny white areas means it looks like noise).

So you should try to find the biggest area or at at least line with white dots (horizantally, vertically and diagonally as well.)
>>
>>57337471
Also, if the pattern ended up being white with black dots or black with white dots, as can sometimes happen, it would get an interestingness of 10,000.
Which is more than a lot of slightly interesting but still noiselike patterns would get, but the slightly-interesting-though-noiselike patterns are far more common than the much rarer patterns that are sparse dots.
It's probably one in every several hundred patterns that are sparse dots, compared to one in several that you can see some form of pattern in.
>>
>>57337471

Hah, I didn't read that before answering here:
>>57337544


Great minds think alike..
>>
>>57337568
And fools never differ.
Fucking circlejerkers.
>>
File: 1358803380151.png (745KB, 1348x1275px) Image search: [Google]
1358803380151.png
745KB, 1348x1275px
>ctrl+f
>Fourier
>0 results
>FFT
>0 results
*sigh*
>>
File: 9999999999%FURRYIOUS.gif (495KB, 618x648px) Image search: [Google]
9999999999%FURRYIOUS.gif
495KB, 618x648px
>>57337614
>using a fourier transform on a binary grid
>fourier transform
>binary
>>
>>57337408
>Amongst the 2^253 possible patterns, there's probably quite a number that are truly beautiful in comparison to Conway's rules.
>With a powerful computer, an algorithm for identifying interesting patterns, and enough time, one could perhaps find one.
>One could also very simply extend that to evolve patterns instead of generating them at random, which might speed up the process massively.
Yeah, probably, but 2^253 is a very large number. You need to reduce it significantly if you actually want to brute force the whole thing. Also looking for "beautiful patterns" is not exactly a well defined goal.

Anyway, I suggest you first build conway again and then try to examine its time evolution. Look at the following things:
>black/white ratio against time (meaning steps)
>overall change between a frame and the last frame against time. Change can be quantified by number of flipped blocks.
>A more complicated one: Look at all two blocks in a fixed position two each other. Calculate the probability that one block is black/white when the other black/white. In the case of a completely random distribution it should be 1/2. So calculate the the absolutely value of the probability minus 1/2 and sum over all distances. That should give you a nice quantity that determines how the spatial distribution is different from independently distributed blocks.

Looking at those plots you will see what an interesting evolution looks like. The first quantity will just go down with time, at the end very slowly. The second one will look very similar. The last one I don't know honestly.
>>
>>57337614
Maybe, but you still need some test to check whether the FFT transform contains anything interesting. Note that the result of the FFT is a NxN complex array. It's not exactly simple to think of a good test for that. Just saying "FFT" is not helpful.

>>57337647
You can easily set False = 0.0, and True =1.0 and then you have an array of floats that you can indeed easily Fourier transform.
>>
File: fft.png (317KB, 1498x932px) Image search: [Google]
fft.png
317KB, 1498x932px
>>57337647
>implying

>>57337708
>you still need some test to check whether the FFT transform contains anything interesting
Kernel density?
>>
>>57337761
>Kernel density?
What do you mean? KDE? That's not a test, that's a method to estimate the PDF from data. Consider writing whole sentences next time.
>>
>>57337811
Look faggot I'm giving you some good ideas.
If you need to be spoonfed at least don't write like an entitled little bitch.
I was implying that you could find whether clusters existed in the FFT, hence denoting patterns in the original image.
Now just go fuck yourself you vapid cunt
>>
>>57337647
>square waves have no frequencies
this is how retarded you sound
>>
>>57334004
>Conway's Game of Life isn't possible with this setup, I know
why not?
>>
File: 37573.png (3KB, 513x517px) Image search: [Google]
37573.png
3KB, 513x517px
>>57334004
Learn how to encode PNG properly fist
bandwidth isn't free
>>
>>57337866
I'm not even OP. You basically said nothing, you just threw "FFT" in the room, completely ignoring that the output of an FFT is not exactly simple to evaluate. It doesn't even reduce dimensionality compared to the original image, it does nothing without a proper test. If you consider looking at a plot of the FFT a test, then OP might just as well look at the images themselves.

Next time you feel like throwing big words around, just don't post, nobody cares for your vague useless ideas. It doesn't make you sound smart either, it just makes you sound like some cunt who read up a few things on wikipedia, which may be correct, but not relevant.
>>
Read about Langton's lambda parameter OP.
http://math.hws.edu/xJava/CA/EdgeOfChaos.html
>Langton defined a simple number that can be used to help predict whether a given CA will fall in the ordered realm, in the chaotic realm, or near the boundary, on the "edge of chaos." The number can be computed from the rules of the CA. It is simply the fraction of rules in which the new state of the cell is living. (The rule in which a cell and all its neigbors are dead is not counted, since Langton assumed that the new state in this rule is always death.) He called this parameter "lambda."
>The lambda parameter of a CA is a number between 0 and 1. If lambda is 0, then all cells die immediately, since every rule leads to death. If lambda is 1, then any cell that has at least one living neighbor will stay alive in the next generation and, in fact, forever. More generally, values of lambda close to zero give CA's in the ordered realm. Values close to 1 give CA's in the chaotic realm. The edge of chaos is somewhere in between.
>>
>>57337899
But I don't think you can do a fourier transform for all patterns with nothing but square waves, even if they are just infinite sine waves.

>>57337911
Conway's rules specify that a cell can survive with two neighbours, but it takes three neighbours to turn a cell alive.
With my rules, there is no distinction between birth conditions and survival conditions; either two neighbours will be able to turn a cell alive, or two neighbours aren't enough for a cell to survive.
>>
>>57337363
This
Iterate indefinitely until you get a valid QR code with your name and the time of your death
>>
>>57337941
you sound mad
and you certainly sound like you haven't even read the part where I tell the OP what to do with the FFT
>>>www.4chan.org/rules#global2
>>
>>57337963
>With my rules, there is no distinction between birth conditions and survival conditions; either two neighbours will be able to turn a cell alive, or two neighbours aren't enough for a cell to survive.
Ah that's right. You could just use 9-bit patterns instead (including the center cell so to say) of course, it should give more interesting/stable results too. You can also look into larger neighbourhoods later (i.e. 4x4 or 5x5 instead of 3x3).

Anyway what I think you want for finding interesting rules is some sort of cycle detection. The longer it takes for a grid to degenerate into a short cycle the more interesting, also even if you get cycles longer cycles are more interesting. You could just test this on an 8x8 wraparound grid if you're concerned about speed/space.
>>
So can we all just ignore this FFT faggot and continue the actual discussion? Shit is fascinating.
>>
>>57338071
Ignore the fft stuff if you don't like it, you salty autist.
>>
I was just looking into making a GoL simulation. Figure I will have to use OpenGL in order to draw things efficiently but I have no idea. I am C#/Python babby.

Any general tips?
>>
>>57338194
>I am C#/Python babby.
Then just use pygame for drawing.
>>
>>57338194

Yeah, kys.
>>
>>57338194
GoL is not particularly computationally expensive, you can just use python + numpy + some python library for graphic output.
>>
>>57338194
>use OpenGL
no man.
as >>57338204 said, use pygame. You don't need efficiency for GoL rendering unless you want to be unable to watch the evolution because it's too god damn fast
You usually want to sleep for 10 ms between each step
>>
File: 1462568594083.jpg (174KB, 1533x961px) Image search: [Google]
1462568594083.jpg
174KB, 1533x961px
>>57337919
How do you properly PNG encode anyway?
>>
>How do you properly PNG encode anyway?
I'm sure there are options in the library you use.
If not, use a better library.
Thread posts: 48
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.