Page 1 of 2

[Staff][Beta] Conway's Game of Life!

Posted: Wed 28 Feb, 2007 6:51 pm
by tr1p1ea
You may have heard of "Conway's Game of Life" before, if not, well it is possibly the most famous example a cellular automaton. It was initially thought up by the British mathematician John Horton Conway in 1970.

Basically what you do is take every pixel on the screen and apply the following rules:

1: Any live cell with < 2 neighbours dies of loneliness
2: Any live cell with > 3 neighbours dies of overcrowding
3: Any dead cell with exactly 3 neighbours is bought to life
4: Any live cell with 2 or 3 neighours remains unchanged
Note: births and deaths can occur during 1 generation

More information can be found here: http://en.wikipedia.org/wiki/Conways_Game_of_Life

Simply put, you can make patterns that evolve into stuff :).

Sounds easy enough? But testing the 8 surrounding pixels for the 6144 pixels on the calc screen isnt ever going to be lightning fast. Iambian came up with an implementation a little while ago that involved some genius shifting and such, and he managed to get things running at a decent speed.

For some reason he mentioned it on IRC, that he would like to see it faster but didnt know if that was likely. I couldnt get this conway's thing out of my head so i had a go. With the aid of some page-aligned LUT's and some optimising i managed to get an implementation going. Making me happy that it actually works, and even happier that it runs at a decent speed.

I slapped some PIC loading in and a cheap titlescreen and it seems to be all done. I was just wondering if anyone wanted to test it for me? Just indicate in this thread if you do, state your email address and i will send it to you.

Screenshots:
Image Image

Posted: Wed 28 Feb, 2007 8:51 pm
by Liazon
looks good :)

the famous glider maker!

Posted: Wed 28 Feb, 2007 9:20 pm
by Floodkiller
Looks cool!

Posted: Wed 28 Feb, 2007 10:48 pm
by merthsoft
I f-ing love Conways game of life
Mcfall_s
@
denison.
ed
u

I break it up 'cause I don't want spam, not to piss ypou off...

Posted: Thu 01 Mar, 2007 6:25 am
by Dwedit
Your email address is already linked from the Email button at the bottom of your post :)

Posted: Thu 01 Mar, 2007 9:27 am
by tr1p1ea
Okay, so there is this new algorithm that might speed things up. Im also trying to decide on whether or not to include wrapping ... what do you guys think?

Posted: Thu 01 Mar, 2007 11:38 am
by benryves
I'm up for testing, as mentioned in IRC. :)

Posted: Thu 01 Mar, 2007 3:23 pm
by tr1p1ea
I noticed that there was a Conway's game for the 86 by Josh Seagoe that boasted ~6fps. I thought that was pretty impressive as mine get ~5.5fps, but the 86 has a larger screen. His algorithm is actually very ingenious, but the implementation needed improving a bit. So using the best of both algo's i have come up with an implementation that can process a full frame in ~600,000cc's. Which is a significant improvement over my old 1.1million cc's per frame :).

Here you can see the difference:
Image Image

Left is old, right is new.

Posted: Thu 01 Mar, 2007 4:26 pm
by merthsoft
Haha, I thought that was my old email on my profile, time to remove that :D

Posted: Thu 01 Mar, 2007 5:51 pm
by King Harold
It looks like it's twice as fast (11/6 is almost 2 anyway)

It looks cool and those gliders remind me of the origin of the hacker-symbol ;)

Posted: Thu 01 Mar, 2007 7:18 pm
by tr1p1ea
Im pretty sure the accepted hacker symbol is that glider.

Also i optimised it further, its down to ~526,000cc's per frame now :). I still have to special case some things to fix wrapping errors in the corners, but it is lightning on the SE :).

Posted: Fri 02 Mar, 2007 12:03 am
by cartj
I love the game of life! I didn't know what it was the first time I played it but it got really addicting so yeah, I'll test it. Looks great by the way.

Edit:
Sorry, wrong email address. Use this one.
-jaco_3737@yahoo.com

Posted: Fri 02 Mar, 2007 1:07 am
by Liazon
even at 6 fps it still looks awesome!

Posted: Sun 04 Mar, 2007 12:10 pm
by tr1p1ea
Okay, well i think i have pretty much finished it so you can find a pre-release here:

http://www.ticalc.org/archives/files/fi ... 39705.html

(Included is 83 and 83/4+(SE) versions, plus an example PIC)

I would appreciate if people could test it and then provide me with information such as: Your calc type, OS version, any problems/suggestions.

Thanks heaps :).

Posted: Mon 05 Mar, 2007 1:07 am
by cartj
Calc:
- ti-84 plus se
-os 2.21

Comments:
I have not seen any problems at all. It is blazing fast and easy to use. All I can think of that would make it better is an in-game pic-editor if yo have the time. Great job and I'm looking forward to the final release.

Here is a screenshot of my favorite design I've made so far It looks better on the calc though:
Image
(it is full quality so firefox should be used for best viewing)