[Staff][Beta] Conway's Game of Life!
Moderator: MaxCoderz Staff
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
[Staff][Beta] Conway's Game of Life!
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:
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:
-
- Sir Posts-A-Lot
- Posts: 245
- Joined: Mon 14 Nov, 2005 9:47 pm
- Location: Getting overwhelmed by everything
- Contact:
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
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:
Left is old, right is new.
Here you can see the difference:
Left is old, right is new.
-
- Calc King
- Posts: 1513
- Joined: Sat 05 Aug, 2006 7:22 am
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
Edit:
Sorry, wrong email address. Use this one.
-jaco_3737@yahoo.com
Last edited by cartj on Fri 02 Mar, 2007 3:14 am, edited 1 time in total.
- tr1p1ea
- Maxcoderz Staff
- Posts: 4141
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: I cant seem to get out of this cryogenic chamber!
- Contact:
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 .
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 .
Last edited by tr1p1ea on Wed 14 Mar, 2007 9:20 am, edited 1 time in total.
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:
(it is full quality so firefox should be used for best viewing)
- 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:
(it is full quality so firefox should be used for best viewing)