| View previous topic :: View next topic |
| Author |
Message |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Fri Mar 02, 2012 1:49 pm Post subject: Decided to code a life sim.. |
|
|
or rather, a cellular automation program. Much like this.
http://www.bitstorm.org/gameoflife/
There are tonns of rule sets to govern cellular automata. The book I'm reading rings it up around 4 billion. The above is an example of only 1. Normally to define new rules means to have a set of 1 five bit binary number and one single bit binary number. The five bit number represents the pixels or cells at East, West, North, South, and the current center. And the 1 bit indicates how the center will change. So say I had the rule:
11000, 1
That means that for every white cell with a black cell to the east and west, it will be replaced by a black cell.
This system is great for making precise rulesets, but no fun for anyone who just wants instant fun results. So if we take the two numbers and combine them into a single 6 bit binary number, we have 110001, which in decimal is 49, which is the ascii character "1." So I can basically use ascii characters as containers for all 64 possible individual rules from 000000 to 111111. This allows the user to type anything, say, their name and it will be a complete ruleset. They can see how their name affects life graphically.
I'll have to play with the range of the ascii stuff a bit. I obviously can't start at 0, because a user can't type a null character that easily. So I'll compensate by shifting the ascii codes a bit. Typing a space character won't translate to 33, or 100001. It'll instead translate as 0 or 000000. So if I wanted the code from earlier, 110001, I wouldn't type "1" I would instead type "Q."
So the Ui will be a big central window that you can draw in, zoom in, etc. Under it will be a text bar, play, pause, restart, clear. If it all works nicely, I'll make it so you can bind rulesets to individual colors, and see how two different forms of cellular automata react together.
Any other ideas? I'm hoping this gives a certain "funness" to cellular automata while still giving the user some experimental abilities without having to type a large series of 6 bit values. Sound good? Also, applet or desktop? |
|
| Back to top |
|
 |
the the the Master Cheater
Reputation: 46
Joined: 15 Jun 2008 Posts: 429
|
Posted: Fri Mar 02, 2012 2:13 pm Post subject: |
|
|
conways game of life
nice |
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Fri Mar 02, 2012 3:12 pm Post subject: |
|
|
| asciicat wrote: | conways game of life
nice |
You could actually remake his ruleset in my program. I'll probably put it in as the default when I make it so people can see what a string should look like. |
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Mar 03, 2012 10:30 am Post subject: |
|
|
What book? _________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Sat Mar 03, 2012 11:08 am Post subject: |
|
|
Fractals, Chaos, Power Laws: Minutes from an Infinite Paradise by Manfred Schroeder
It's a fairly small chapter towards the end of the book. It gives the table to create the HGLASS Cellular automation, and under is an aside saying how many possible there are. |
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Mar 03, 2012 11:53 am Post subject: |
|
|
Recommended reading? _________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Sat Mar 03, 2012 12:07 pm Post subject: |
|
|
| Aviar³ wrote: | | Recommended reading? |
Definitely, and you can pick it up for like 4 bucks after shipping through amazon. |
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Sat Mar 03, 2012 12:08 pm Post subject: |
|
|
Is it actual math equations or just textual explanations with visuals? _________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Sat Mar 03, 2012 1:12 pm Post subject: |
|
|
| Aviar³ wrote: | | Is it actual math equations or just textual explanations with visuals? |
Yes there are math equations aplenty, although I'd say it leans towards a more descriptive approach. In the other sections, the author relies on equations to explain what he can't in words. That how I see it anyway. If it MUST be explained in equation, it is. I skip around and haven't really read even half of it yet, just a few chapters on interesting topics. The cellular automata section is description heavy, as it should be, but getting into fractals like the cantor set, I think he goes into the Mandelbrot too, I see a good bit of equations there. |
|
| Back to top |
|
 |
|