Author Topic: Game of life  (Read 448 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Game of life
« on: October 20, 2018, 01:08:56 AM »
BricsCADv19 and Acad2019

(gol '(a b c d e f g h))
a = width
b = height
c = lifetime or iterations
d = begin row
e = begin col
f = end row
g = end col
h = 0 = don't erase, h > 0 = erase;

d,e,f,g set the initial state

(gol '(20 30 10 0 0 5 6 0))
(gol '(100 100 100 0 1 5 9 0))
(gol '(100 100 100 0 1 5 9 1))

edit: new version, disabled undo recording
edit 2: attached source
edit 3: attached new source, draws center screen
« Last Edit: November 17, 2018, 11:17:24 AM by nullptr »

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #1 on: October 20, 2018, 01:13:10 AM »
 pulsar ? (gol '(50 70 100 0 0 5 6 0))

MickD

  • Gator
  • Posts: 3232
  • !false...it's funny 'cause it's true!
Re: Game of life
« Reply #2 on: October 20, 2018, 01:13:37 AM »
must....resist......shiny......object.....
:D

Will have a look as time permits Daniel, looks interesting, thanks.
A programmer's wife tells him, "Run to the store and pick up a loaf of bread. If they have eggs, get a dozen."

The programmer comes home with 12 loaves of bread.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #3 on: October 20, 2018, 01:23:44 AM »
a rocket  (gol '(100 100 100 0 1 5 9 0))

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #4 on: October 20, 2018, 01:23:56 AM »
must....resist......shiny......object.....
:D

Will have a look as time permits Daniel, looks interesting, thanks.

lol!

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #5 on: October 20, 2018, 03:00:11 AM »
these are pretty awesome
(gol '(100 100 1000 0 1 5 19 0))
(gol '(100 100 500 1 3 9 23 1))
(gol '(100 100 500 0 1 49 52 1))
(gol '(100 100 1750 0 3 49 53 1))// best yet
goes for a while before turning into oscillators  :laugh:
« Last Edit: October 20, 2018, 03:27:45 AM by nullptr »

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #6 on: October 20, 2018, 03:38:05 AM »
this one lives 1700 generations  :roll:
(gol '(100 100 1750 0 3 49 53 1))
« Last Edit: November 13, 2018, 07:35:10 AM by nullptr »

MickD

  • Gator
  • Posts: 3232
  • !false...it's funny 'cause it's true!
Re: Game of life
« Reply #7 on: October 20, 2018, 03:50:07 AM »
this one lives 1700 generations  :roll:
(gol '(100 100 1750 0 3 49 53 1))

cool!

do you have any 'sleep' time in there to keep the animation watchable, I'd imagine you'd need a bit even given the latency of the dwg database interactions etc?
A programmer's wife tells him, "Run to the store and pick up a loaf of bread. If they have eggs, get a dozen."

The programmer comes home with 12 loaves of bread.

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #8 on: October 20, 2018, 03:54:50 AM »
this one lives 1700 generations  :roll:
(gol '(100 100 1750 0 3 49 53 1))

cool!

do you have any 'sleep' time in there to keep the animation watchable, I'd imagine you'd need a bit even given the latency of the dwg database interactions etc?

yeah, like 50ms each generation, otherwise the end of the world comes too fast

It's Alive!

  • BricsCAD
  • Needs a day job
  • Posts: 6905
  • AKA Daniel
Re: Game of life
« Reply #9 on: October 20, 2018, 06:53:42 AM »
well enough fun for today, attached the source.
I need to add fortune and trek, make it more useful  :yes: