### Author Topic: Game of life  (Read 5215 times)

0 Members and 1 Guest are viewing this topic.

#### It's Alive!

• Retired
• Needs a day job
• Posts: 7161
• AKA Daniel
##### Game of life
« on: October 20, 2018, 01:08:56 AM »

(gol '(a b c d e f g h))
a = width
b = height
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 »
Retired

#### It's Alive!

• Retired
• Needs a day job
• Posts: 7161
• 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))
Retired

#### MickD

• King Gator
• Posts: 3513
• (x-in)->[process]->(y-out)
##### Re: Game of life
« Reply #2 on: October 20, 2018, 01:13:37 AM »
must....resist......shiny......object.....

Will have a look as time permits Daniel, looks interesting, thanks.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." — John Johnson

#### It's Alive!

• Retired
• Needs a day job
• Posts: 7161
• 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))
Retired

#### It's Alive!

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

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

lol!
Retired

#### It's Alive!

• Retired
• Needs a day job
• Posts: 7161
• 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
« Last Edit: October 20, 2018, 03:27:45 AM by nullptr »
Retired

#### It's Alive!

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

#### MickD

• King Gator
• Posts: 3513
• (x-in)->[process]->(y-out)
##### Re: Game of life
« Reply #7 on: October 20, 2018, 03:50:07 AM »
this one lives 1700 generations
(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?
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." — John Johnson

#### It's Alive!

• Retired
• Needs a day job
• Posts: 7161
• AKA Daniel
##### Re: Game of life
« Reply #8 on: October 20, 2018, 03:54:50 AM »
this one lives 1700 generations
(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
Retired

#### It's Alive!

• Retired
• Needs a day job
• Posts: 7161
• 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
Retired