|
Author |
Topic: A silly game of life (Read 729 times) |
|
Captain_Lobotomy
|
A silly game of life
« on: Sep 12th, 2003, 12:28am » |
|
I've toyed around with 3d extensions of the game of life. This applet has several layers of life running, weakly interacting with each other. A rough beta, too tired to update the graphics. Still, wanted to chare this. http://users.skynet.be/frederikenhermine/ Seeya, FVH
|
|
|
|
benelek
|
Re: A silly game of life
« Reply #2 on: Sep 24th, 2003, 3:24pm » |
|
that's looking really beautiful... but it's really hard to decipher the goings on of the actual game of life.
|
|
|
|
Captain_Lobotomy
|
Re: A silly game of life
« Reply #3 on: Sep 25th, 2003, 7:37pm » |
|
Just like real life anyway, what happens is you have several layers of the traditional 2D game of life running (just switch interaction to 0 to see them). By increasing interaction you allow cells on one level to see their neighbors on the next layer and these count toward active or inactive number of neighboring cells. A high interaction will result in structures in the z-direction. A low interaction gives structures in the plane. Seeya, FVH
|
|
|
|
kmcdonald
|
Re: A silly game of life
« Reply #4 on: Oct 14th, 2003, 7:25pm » |
|
Continuing the topic of "Life"... I decided to play around with some variations on the game after noticing that all the renditions I have seen were boolean (cells are alive or dead). I did a little math and generalized the rules for cells that have a gradient of life (a float between 0 and 1). http://www.rpi.edu/~mcdonk/code/automata/float.html There is a detailed description in the source. The generalization of the rules are relatively boring in "float life", because the "colonies" of cells either die quickly, expand slowly, or remain in stable circles. So, the definition of "neighbors" (as opposed to the 8 surrounding cells) is randmoly defined. That leads to some more interesting results. I did something stupid in this version, it draws in the mousePressed(). I got too interested in the next project to fix it though. I wrote a bool life, just because: http://www.rpi.edu/~mcdonk/code/automata/bool.html You can do almost anything I can think of with respect to modifying Conway's rules. You can change all sorts of variables in real time and see the difference it makes in the "evolution" of the world map. I find this successful, because I have spent more time playing with it than I took planning and writing it ^_^ There is a problem with both pieces, however, that I haven't been able to resolve. The world is supposed to be a hypertorus (top connected to bottom, left connected to right), but sometimes the neighbors aren't identified correctly. For example, if you create a glider, sometimes it dies when it hits the edge of the screen. If anyone can help me out on this, I would be glad to know why this happens. Enjoy... and if this should have been a new topic, let me know (or move it, or whatever).
|
« Last Edit: Jan 13th, 2004, 3:32pm by kmcdonald » |
|
|
|
|
frederik Vanhoutte Guest
|
Re: A silly game of life
« Reply #5 on: Oct 17th, 2003, 5:53pm » |
|
I don't really understand the implementation of your boundary conditions: k=(k<0?k*-1:k)%width; Take width=100, if k were -2, k would be assigned 2%100 = 2 instead of what I would expect k = 98. If speed is not an issue, how about k=(k<0?k+width:k)%width; (although I don't think it's a good idea to do the mod division every time even when it's not necessary). Since you'll never get neighbors more than width away, I would use k=(k<0?k+width:k); k=(k>width?k-width:k); (Same for q) Am I wrong? seeya, FVH
|
|
|
|
kmcdonald
|
Re: A silly game of life
« Reply #6 on: Oct 21st, 2003, 9:37am » |
|
Yes... I was thinking backwards, thanks for pointing that out. It works correctly now! Cool... if you want to watch something fun, spread out the neighbor definitions so that they are a square further away from the center than they should be. You will get 4 games of life going at the same time. Spread it out again and, well... you see ^_^ Thanks!
|
« Last Edit: Oct 21st, 2003, 9:40am by kmcdonald » |
|
|
|
|
|