Author Topic: [Lua] Cellular Automata  (Read 11790 times)

0 Members and 1 Guest are viewing this topic.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: [Lua] Cellular Automata
« Reply #15 on: January 16, 2013, 09:19:26 am »
Relayed to the community at TI-Planet, like I did with your Uno game several weeks ago: http://tiplanet.org/forum/viewtopic.php?t=11117 .
How about adding a Cellular Automata item to the image in your signature ? :)
Thanks :)
And that uno game will be updated, just some more time..

I didn't know that other forms of cellular automata were possible, i only heard of conway's game of life.
It's nice to have done this, as you say in you french post, it really is a good exercise, but I learned the most about the different types and their function, I never realised there's such a wide range of useful applications...

edit: check this out :)


A stormtrooper!!!! (with some imagination)
« Last Edit: January 16, 2013, 11:18:02 am by Nick »

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: [Lua] Cellular Automata
« Reply #16 on: January 16, 2013, 10:22:11 am »
Interesting, now we only have to wait until the nspires themselves start reproducing :o Good job :)

Some people need a high five in the face... with a chair.
~EC

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [Lua] Cellular Automata
« Reply #17 on: January 16, 2013, 12:44:45 pm »
Very cool, that looks nice, Nick!

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: [Lua] Cellular Automata
« Reply #18 on: January 16, 2013, 03:42:26 pm »
Lol it does look like a Storm Trooper, nice! :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Lua] Cellular Automata
« Reply #19 on: January 16, 2013, 11:38:56 pm »
Nice update Nick :)

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: [Lua] Cellular Automata
« Reply #20 on: January 17, 2013, 12:50:07 pm »
Thanks :)

I plan on adding these features in the future:
 - More standard/known rules
 - 'Build' your own rules by setting Born and Survive numbers (1)
 - Add save and recall feature for patterns, right now it kinda sucks that you lose it when you quit...
 - Do not reset generation when going back to edit as long as you don't change anything.
 - be able to set a generation directly without being drawn. E.g. you want to know the 1500th generation of a pattern, but you don't want to wait until everything is calculated and drawn, then I'd make it just calculate, and only draw it when generation 1500 is reached, that should save a lot of time.

(1) a rule is basically just a set of numbers that equal the amount of living tiles from the Moore neighborhood (A cell has 8 neighbors)
+++
+O+ ==> + is neighbor, O is self
+++
So when you design your own rules, you say for example: B3S23 or B3/S23. This means:
When 2 or 3 neighbors are alive, Survive (if dead it stays dead).
When exactly 3 neighbors are alive, a dead cell is 'Born' (which means it gets lit)
So if you look closely you can see that B3/S23 is Conway's game of life rules set of a cellular automata.

Offline Ranman

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1354
  • Rating: +83/-0
    • View Profile
Re: [Lua] Cellular Automata
« Reply #21 on: January 17, 2013, 01:04:36 pm »
edit: check this out :)


A stormtrooper!!!! (with some imagination)

I see a dragon looking directly at me... a hungry dragon!

I remember doing a Conway's Game of Life project in one of my undergrad courses. I really enjoyed that exercise.

Nice job Nick!  :)
Ranman
Bringing Randy Glover's Jumpman to the TI-89 calculator. Download available at Ticalc.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [Lua] Cellular Automata
« Reply #22 on: January 17, 2013, 05:42:32 pm »
- 'Build' your own rules by setting Born and Survive numbers (1)
 - be able to set a generation directly without being drawn. E.g. you want to know the 1500th generation of a pattern, but you don't want to wait until everything is calculated and drawn, then I'd make it just calculate, and only draw it when generation 1500 is reached, that should save a lot of time.
I have always liked being able to play with my own rules (that was an awesome advantage in Iambian's program). And that second idea should be much faster O.O

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: [Lua] Cellular Automata
« Reply #23 on: January 18, 2013, 02:28:52 pm »
I've implemented the startgeneration, so you don't have to wait to get to generation 2000 for example. "Don't have to wait" is not exaclty true, it takes time of course, and the optimization is less than i expected.

example 3 sliderguns (smallest version) in a 50x75 field, generation 100
01:09 seconds with [enter]
00:53 seconds from startgeneration

as you can see it's not that big a deal, but it's something...