Conway's Game of Life for Atom, Beeb, Elk?

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Tue Oct 25, 2016 2:13 pm

Very relaxing!

While I'm here, I did see another life for 6502 fragment at Rosetta code:
https://rosettacode.org/wiki/Conway%27s ... 2_Assembly

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Life on a second processor

Post by BigEd » Wed Oct 26, 2016 8:21 am

Just a few half-baked thoughts about a Life running on a second processor. I think there are several successive levels of sophistication:
- Use VDU calls to send a whole screen update after each generation
- Use VDU calls to send only pixel changes
- Extend the VDU protocol, as Tube Elite does, to send pixel changes using fewer bytes
- Do something clever to interleave or buffer the screen updates while computing the next generation
- Run the GUI on the host to allow parallelised interaction and computation.

In all cases the Life engine runs on the second processor using local data structures or bitmap(s). If the display is smaller than the computed grid, or if the display is updated only on a subset of generations, the engine need not be limited by the display speed.

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Wed Oct 26, 2016 11:47 am

For reference, here are a few articles explaining the HashLife algorithm:

An Algorithm for Compressing Space and Time - Dr Dobbs Journal (Tomas G. Rokicki, April 01, 2006) (also some implemetation notes)

The Game of Life, part 2: HashLife - The Lowly Programmer (Eric Burnett, May 10, 2011)

Gosper's Algorithm (Hashlife) - Jenny Owen (part of her Master's thesis)

Hashlife - Tony Finch's blog

Tridecenary frustum tree - (23 Oct, 2016)

I think I'm slowy starting to "get it" but not quite there yet....

I'll add more links as I come across them.

I think an implementation of this on a Beeb Co Processor would be amazing

Dave
Last edited by hoglet on Wed Oct 26, 2016 12:10 pm, edited 4 times in total.

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Wed Oct 26, 2016 11:56 am

It certainly would! I think it's space-intensive, but I'm not sure how much space. As it happens, there's a recent post about it:
http://11011110.livejournal.com/336685.html

litwr
Posts: 189
Joined: Sun Jun 12, 2016 8:44 am
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by litwr » Wed Oct 26, 2016 12:34 pm

lurkio wrote:For ease of access, here's the version of Life from Acorn User (archived by JGH here):
Play online:
I would like to use the similar emulator for Atom. :)
I've just made the video for this pattern with Xlife-8 - https://youtu.be/jpqzaQfz6EI. :) It is less than 59 seconds.
hoglet wrote:For reference, here are a few articles explaining the HashLife algorithm:
I think an implementation of this on a Beeb Co Processor would be amazing
Xlife uses hash life algorithm. IMHO it is absolutely impossible for 8-bit systems. It requires hundreds MB of RAM or just megabytes for the small patterns.

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Wed Oct 26, 2016 12:38 pm

15 generations per second on a 1MHz 6502 - that's very impressive!

(If indeed hashlife needs lots of space, perhaps it joins Fuzix in getting benefit from paged memory? There's a branch of the matchbox copro which implements that. To do it on the Pi... that would mean getting the MMU involved, I would think.)

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Wed Oct 26, 2016 12:55 pm

There is also the potential for 16MB on the 32016 Co Pro in PiTubeDirect.

I'd like to get some data on memory consumpution for different sized patterns.

Dave

litwr
Posts: 189
Joined: Sun Jun 12, 2016 8:44 am
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by litwr » Wed Oct 26, 2016 2:40 pm

BigEd wrote:15 generations per second on a 1MHz 6502 - that's very impressive!
Thanks. :) However the mentioned Yagol for Amstrad CPC is 2-3 faster for the patterns of this size. Yagol has other problems. It becomes slower with bigger patterns and can't handle the patterns which cover (almost) all universe.
[hashlife] It is natural to realize it with unlimited universe. It is much more difficult to implement it for the given grid size.

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Thu Oct 27, 2016 7:56 am

Litwr, could you perhaps explain in a few sentences the algorithm used in your xlife, and perhaps also in yagol? Or indeed links to explanations, if you have them. (I found xlife 3.5 source on github)

I recall back in the 80s running a large life with my friend - I think he must have written it. My dim recollection is that it was an algorithm without a fully populated grid. Instead, the state of play was a list of populated lines, with each line being a list of populated cells. By convention, negative numbers are Y ordinates and positive numbers are X ordinates. So the whole world is just a list of ordinates, so for example the r-pentomino is just 8 numbers:
-1,2
-2,1,2
-3,2,3
Almost certainly he'd have used two bytes for each ordinate, so that's 16 bytes, and the universe is 32k by 32k because of the sign conventions.

To construct the next generation, you make a new list. You use a three-line window, with three pointers, and you scan across with a cursor in each. The clever bit is that sometimes one or two of your line pointers points to a non-existent line, and your cursor skips blank spaces - it has to visit n-1, n, and n+1 for each n that's in the list. Both blank lines and gaps in lines are skipped naturally, and you spend time only in and around live cells.

I have no doubt this algorithm was described in some article we found.

(I am beginning to doubt that hashlife is appropriate for our case, because it starts slow and speeds up as it builds hashes, and that's good for huge patterns but I'm not it's good for quick demos. I still haven't got to grips with the data structures and therefore the memory footprint. On the other hand, it seems the implementation is small.)

As a bonus, here's a treatise on spaceships, from 1993:
http://web.archive.org/web/200009300419 ... s_toc.html

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Thu Oct 27, 2016 9:11 am

(I should add, Dave had rather a good idea, which is to use a changelist for two purposes - to update the screen efficiently, and also to determine which cells to recalculate. Only cells in the neighbourhood of changed cells need to be recalculated. This changelist would be another example of a dense encoding of a sparse structure, and could perhaps use the same idea of lists of ordinates. The algorithm then would traverse the changelist structure for coordinates but inspect the universe structure for cell status.)

litwr
Posts: 189
Joined: Sun Jun 12, 2016 8:44 am
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by litwr » Thu Oct 27, 2016 7:59 pm

Xlife has long and uneasy development history. I had email contacts with its last developers (Eric S. Raymond and Achim Flammenkamp). So I may give more details about it.
Xlife algorithm was developed by CMU student Jon Bennett. Xlife was the fastest GoL with GUI almost for 10 years. This algorithm uses 8x8 tiles and big tables for the calculation of the next generation. It was a bit improved to the end of 90s. Xlife-8 uses it too. IMHO the best way to come in is to look at its source code.

The key structure is a cell box.

Code: Select all

typedef struct box {
    UNS32 x,y,   /* upper left box coordinates, multiple of boxsize */
		  live1,live2, /* packed bitmap, each succesive 8 bits a row */
		  olive1,olive2, /* packed bitmap of old cells */
		  dead;  /* number of generations box is empty and not in use */
    UNS32 on[8];
    struct box *up, *dn, *lf, *rt,  /* pointer to neighbourboxes */
			   *fore, *next, *hfore,*hnext;   /* pointers for listlinks */
}
cellbox;
Every cell box has its x,y cooordinates, 2 unsigned 32-bit integers represent 8 cells in a line. If an empty box is not used for some number of generations (10, for example) then it is destroyed. The on-field contains information about the neighbors. The algorithm uses 2 passes. The 1st pass is used to fill the on-field, the 2nd performs the calculation.

Yagol uses the algorithm from a very good book about the code optization - http://www.jagregory.com/abrash-black-book/. Look at chapter 18. I have noted above that it has some disadvantages. Another disadvantage of Yagol is the problem with the cell counter.

Your algorithm reminds me - http://dotat.at/prog/life/life.html.

The article about spaceships missed the biggest one - Caterpillar. Such pattern is impossible to use without hashlife algorithm. Xlife may run it. :) BTW Xlife-8 standard library contains 87 spaceships.

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Thu Oct 27, 2016 8:59 pm

Thanks for the info! It led me to this article in BYTE, which is interesting but turns out not to be the algorithm I was remembering:
https://archive.org/stream/byte-magazin ... 1/mode/1up

There are so many algorithms, but unfortunately most of my searching keeps turning up today's best. There is no history of software!

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Thu Oct 27, 2016 9:39 pm

Ah, I found a post by Tony Finch, from 1994, where he describes an algorithm he wrote for an Archimedes, only a little unlike the one I was thinking of:
The list of live cells is stored in order by rows. Since each row has the same Y coordinate throughout, that is stored once per row. To distinguish Y coordinates from X coordinates, Ys are negative and Xs are positive. This saves time as well as space since the program does not have to deal with Y coordinates when looping along a line.

The inner loop scans along 3 adjacent lines together, maintaining a small (3x3) bitmap in one of the registers. This bitmap is the neighbourhood of the cell that is being examined. Because this bitmap takes only 512 different values, the operations of counting up the live neighbours and deciding whether the cell should live or die can be done by a simple table lookup and compare with 0.

Blank areas are skipped by comparing the bitmap with 0, then seeing which coordinate from the 3 lines is next and continuing from there. This is when the program checks for the end of the line. Because the X coordinates are sorted into decreasing order, the program just finds the maximum of the next coordinates on the three lines (which values are cached in the registers). If this value is less than 0, then the line is complete.

The algorithm does special things to handle X loops where less than three lines are occupied. These cases could be handled by the 3 line loop by leaving the relevant next-coordinate-cache register negative, but special case code is quicker.
- https://groups.google.com/d/msg/comp.th ... kLPYcb0a0J

Edit: more discussion and pointers here.

litwr
Posts: 189
Joined: Sun Jun 12, 2016 8:44 am
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by litwr » Fri Oct 28, 2016 9:56 am

I'd tested Tony Finch's algorithm. It showed itself a bit slower than Jon Bennet's algorithm.
Hashlife is not always the best choice. It has very poor speed for the chaotic patters like Seeds or Brian's Brain. The best for speed cellular automaton simulators use graphic cards hardware. For example, this WebGL Brian's Brain shows performance impossible for the best CPU. Yagol uses video too. It uses the graphic mode 0 for Amstrad CPC, 4 bits per pixel, 2 bits for the current generation and 2 bits for the next. BBC Micro graphic mode 2 is almost the same...

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Fri Oct 28, 2016 2:14 pm

Is there perhaps a number of stopping off points, between the purist list life I remember, which puts in one ordinate for each live cell, up to say a 16x16 grid for each tile? It did strike me that it might be interesting to try 8x1 or 8x2 tiles, or even to try slightly unpacked tiles with 4 cells per byte or even only 2 cells per byte, to make evaluation quicker.

I think the three things I'd like in a 8-bit Acorn life are:
- co-pro
- universe bigger than a screen
- enormous speed especially for small or sparse patterns
but I don't know what tradeoff I'd ideally like between speed and size.

What size of lookups do you do at eval time?

(I note with interest that the Brian of Brian's Brain also invented Wireworld and made the transistor level chip simulations at 4004.com and visual6502.org)

User avatar
SimonSideburns
Posts: 275
Joined: Mon Aug 26, 2013 8:09 pm
Location: Purbrook, Hampshire
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by SimonSideburns » Fri Oct 28, 2016 10:51 pm

When I first saw this post about GoL I immediately recalled a version that used MODE 7 on the Beeb that was on one or two of the Disk User disks. I was going to post about it and then promptly forgot.

I believe the programs were called Life and Super Life, and they were possibly on successive issues' disks. The magazine had a screen shot of a hires menu screen where you could choose one version or the other, but I recall it didn't get supplied as it took up too much room on the disk (remember that back then it had to be only a 40 track disk to cater for as many people and drives as possible).

Might be worth digging out?
I'm writing a game where you can change your character from a Wizard to a monkey to a cat.

Well, Imogen that!

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Sat Oct 29, 2016 2:38 am

Thanks Simon - they were on TDU issue 8 and issue 10, according to
http://8bs.com/cgi-bin/catalogue/catalogue2.cgi
where both the magazines and the disks can be downloaded. (Search for TDU-08 and TDU-10)
http://www.8bs.com/tdumags.htm
Ecosoft Superlife (full screen high resolution) is described by Nathan Williams on page 9 of issue 8
Fastlife (full screen mode 7) is described on page 14 of issue 10 (also mentioned there, a Life disk by Nathan Williams including source)

litwr
Posts: 189
Joined: Sun Jun 12, 2016 8:44 am
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by litwr » Sat Oct 29, 2016 1:32 pm

BigEd wrote:Is there perhaps a number of stopping off points, between the purist list life I remember, which puts in one ordinate for each live cell, up to say a 16x16 grid for each tile? It did strike me that it might be interesting to try 8x1 or 8x2 tiles, or even to try slightly unpacked tiles with 4 cells per byte or even only 2 cells per byte, to make evaluation quicker.
There are many opportunities. I have to say that the idea about 8x1 or 8x4 tiles looks wrong. It is wrong to make too big tiles. It is also wrong to make them too small. The small tiles require more work with their borders. The on-field is calculated mainly by tables but borders require bit-by-bit "hairy" (according to Erik S. Raymond) code. The idea to mix cell states and on-field looks good, it could make faster the second pass but it could slow down the first pass.
BigEd wrote: I think the three things I'd like in a 8-bit Acorn life are:
- co-pro
- universe bigger than a screen
- enormous speed especially for small or sparse patterns
but I don't know what tradeoff I'd ideally like between speed and size.
Is it worth to try to compile the original Xlife of 1989? Xlife GUI is mouse based so it will require some work.
BigEd wrote: What size of lookups do you do at eval time?
The original Xlife uses 1 MB table to calculate 4 cells simultaneously at the second pass. However, the size maybe reduced to 64K. The best tables will be for a square block of cells, for example, 3x3 block will require 2²⁹ elements, 4x2 block - 2²⁸, 8x1 - 2³², ... For the cells with more than two states the tables will be a bit bigger.
Xlife-8 uses 256 bytes in the table to calculate 2 cells at once. It also uses 2K tables at the first pass. The sources are open and I am ready to answer to any question.
BigEd wrote: (I note with interest that the Brian of Brian's Brain also invented Wireworld and made the transistor level chip simulations at 4004.com and visual6502.org)
I missed this fact. Thanks. Brian's Brain patterns are very vivid - I may look at them for long time, it is like a dynamic mandala. :)
BigEd wrote: http://www.8bs.com/tdumags.htm
Ecosoft Superlife (full screen high resolution) is described by Nathan Williams on page 9 of issue 8
Fastlife (full screen mode 7) is described on page 14 of issue 10 (also mentioned there, a Life disk by Nathan Williams including source)
There are so many Life implementations there. It will be a hard work to list them all.

BTW I have found only few sport events in this thread. I'd made fishy pattern run, lurkio had made its run, ... Somebody could provides the results only. :wink:

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Sun Oct 30, 2016 9:18 pm

I ran a few versions of life at a few different CPU speeds - video here:
Image

The fishy fish is in there somewhere! The main event is the new list life Dave is working on, ported from Tony Finch's C source, running on the fastest copro we have, using dp11's and hoglet's latest improvements.

It should be possible to read off the speeds from the video, but Dave has also taken some timings:
hoglet wrote:I just ran a few R-Pentomino (to generation 1100) benchmarks:
- the 225MHz PiTubeDirect (Co Pro 0) = 4.10s
- the 64MHz Matchbox = 7.84s
- the 20MHz PiTubeDirect (Co Pro 2) = 23.58s
- the 3MHz PiTubeDirect (Co Pro 1) = 162s
- the 3MHz Acorn 6502 Co Pro = 161s

Just to 200 generations
- your video = 17.3s
- the 3MHz Acorn 6502 Co Pro = 24.2s

What's interesting is it scales linearly up to 64 MHz, but at 225MHz screen updates become significant, probably accounting for about half of the total time.
Note that Dave is running with the offical Pi-based fast copro (PiTubeDirect) running at 225MHz whereas I was running a slightly faster experimental branch. Note also that Dave's port of Tony Finch's List Life is still a work in progress, so the speed is subject to change.
hoglet wrote:I just tried to do a comparison on the Pi Zero's 225MHz 6502....

R-Pentomino (to 1103 generations):
- Atom Life (no wrapping) runs to completion in 7.83s (average 140 generations/s)
- List Life runs to completion in 4.29s (average 257 generations/s)

I tried Rabbits (17331 generations) and found that Atom Life incorrectly stabilizes after 4200 generations.

Rabbits (to 4200 generations):
- Atom Life gets to 4200 generations in 41.62s (average 100 generations/s)
- List Life gets to 4200 generations in 26.87s (average 156 generations/s)

Here's the nice bit: List Life runs to completion (17331 generation) in 187s (average 92.68 generations/s). As does Acorn.

So this is ~50% faster, and more accurate, with a 32K x 32K sized world.

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Sun Oct 30, 2016 10:33 pm

Here's a few more details of these experiments.

"Atom Life" was originally written for the Acorn Atom by Laurence Hardwick , and was disassembled, commented and ported to the Beeb:
https://github.com/hoglet67/6502Life/bl ... m_life.asm

The dimension of the Universe is 256x256, and it's possible to run this with the topology of a plain, or a torus (with edges wrapping).

The universe is stored as a simple bit map (one bit per cell, 8KB total).

"List Life" was conceived by Tony Finch, and is best described here:
http://dotat.at/prog/life/life.html

I started with this C implementation:
http://dotat.at/cgi/cvsweb/things/life.c?rev=1.8

and ported it to 6502 machine code using 16-bit signed arithmetic:
https://github.com/hoglet67/6502Life/bl ... t_life.asm

The dimension of the universe is 32767x32678 (the sign bit is used to distinguish X and Y values in the list).

The universe is stored in an array, with one coordinate (2 bytes) per live cell.

There are currently two 23KB list buffers, allowing patterns of just over 10,000 cells.

The display driver is joint work with Ed (last week). It allows just the changes between one frame and the next to be sent over the tube, in a compressed format to eliminate all blank space. This seems to work really well for the sparsely populated screens in Life.

With List Life the universe is much bigger than the display area, and its possible to scroll around (slowly at the moment) using the cursor keys.

This is very much a work-in-progress but if anyone wants to play here's a snapshot:
listlife_20161030.zip
(3.15 KiB) Downloaded 24 times
As usual, all the code (including tools and build scripts) is in github:
https://github.com/hoglet67/6502Life

One of our next goals is to see if we can run a Gosper Breeder, probably for the first time ever on a Beeb???
https://www.youtube.com/watch?v=ZZTQ_UcPZ4g

Dave
Last edited by hoglet on Thu Nov 10, 2016 12:07 pm, edited 2 times in total.

User avatar
lurkio
Posts: 1564
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by lurkio » Sun Oct 30, 2016 11:23 pm

hoglet wrote:"Atom Life" was originally written for the Acorn Atom by Laurence Hardwick , and was disassembled, commented and ported to the Beeb: https://github.com/hoglet67/AtomLife/bl ... m_life.asm
Thanks. Any chance you could upload the Beeb port as a .SSD for those of us who don't know how to use BeebAsm?

:?: :oops:
hoglet wrote:"List Life" ... This is very much a work-in-progress but if anyone wants to play here's a snapshot: listlife_20161030.zip
Probably worth mentioning again that this one needs the 65C02 Second Processor menu option to be selected in BeebEm.

=D>

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Mon Oct 31, 2016 7:54 pm

lurkio wrote:
hoglet wrote:"List Life" ... This is very much a work-in-progress but if anyone wants to play here's a snapshot: listlife_20161030.zip
Probably worth mentioning again that this one needs the 65C02 Second Processor menu option to be selected in BeebEm.
Yes, absolutely this is the case.

I would go further and say this is only becomes captivating with a fast 6502 Co Pro, either the Matchbox, or the PiTubeDIrect.

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Mon Oct 31, 2016 8:48 pm

... see if we can run a Gosper Breeder, probably for the first time ever on a Beeb???
Looks like we can indeed! But although we may never know, I think it's possible my friend's Life was able to run it, back in 1988. (Remarkably enough, he's still got backups from that time, and we might yet be able to get the program running again.) He was even able to point out our source for the photoenlarging - it was p253 of this book by Martin Gardner...
My 1970 column on Conway's "Life" met with such an instant enthusiastic response among computer hackers around the world that their mania for exploring "Life" forms was estimated to have cost the nation millions of dollars in illicit computer time.

User avatar
lurkio
Posts: 1564
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by lurkio » Mon Oct 31, 2016 9:15 pm

lurkio wrote:
hoglet wrote:"Atom Life" was originally written for the Acorn Atom by Laurence Hardwick , and was disassembled, commented and ported to the Beeb: https://github.com/hoglet67/AtomLife/bl ... m_life.asm
Thanks. Any chance you could upload the Beeb port as a .SSD for those of us who don't know how to use BeebAsm? :?: :oops:
Anyone got a .SSD of this?

:?:

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Mon Oct 31, 2016 9:30 pm

lurkio wrote:
lurkio wrote:
hoglet wrote:"Atom Life" was originally written for the Acorn Atom by Laurence Hardwick , and was disassembled, commented and ported to the Beeb: https://github.com/hoglet67/AtomLife/bl ... m_life.asm
Thanks. Any chance you could upload the Beeb port as a .SSD for those of us who don't know how to use BeebAsm? :?: :oops:
Anyone got a .SSD of this?
:?:
For what it's worth, here is the last build of BLIFE that used the Atom Life engine by default:
atomlife_20161028.zip
(2.28 KiB) Downloaded 24 times
Ignore the ALIFE program, it does nothing. It was there just to allow me to check I was able to rebuild the original Atom machinecode without any differences.

The newer List Life engine is both faster, and gives and much larger universe.

My next step will be to improve the statisics, and add loading of patterns from RLE files on disc.

Dave

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Tue Nov 01, 2016 6:55 pm

Hi Guys,

Here's a slightly updated version of List Life:
listlife_20161101.zip
(9.04 KiB) Downloaded 29 times
A 6502 Co Pro is required, and a fast one is strongly recommended. It really rocks on the PiTubeDirect. :D

And some piccies:
IMG_0750.JPG
IMG_0751.JPG
IMG_0752.JPG
There are now a few more patterns built-in, and I've made it quite a bit more memory efficient, so larger patterns (about 22,000 cells) can be run.

The key difference between this and any other Life I have seen on the Beeb is universe is very big: 32768 x 32767, and you have a 256 x 256 pixel view port onto this that can be panned around. This allows some very large patterns to be run "correctly" - at least until they grow beyond 22,000 cells. It's possible to run the Gosper Breeder 1 for a while, which is rather nice to look at.

The following keys are supported:
- the cursor keys change the speed of panning
- return stops panning immediately
- copy moves you back to the origin
- escape returns to the pattern selection menu

More features in the coming days I hope....

Dave

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Tue Nov 01, 2016 10:25 pm

Brilliant!

User avatar
lurkio
Posts: 1564
Joined: Tue Apr 09, 2013 11:30 pm
Location: Doomawangara
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by lurkio » Tue Nov 01, 2016 10:31 pm

Dave, this is quite amazing!

=D> =D> :shock:

I'm only running it on BeebEm, but you can increase the Speed setting to 50fps, which makes it a bit more exciting to watch!

Are you plotting each cell onto an individual pixel on screen, or is the grid "zoomed out" and therefore might each pixel represent more than one cell?

Is there any way to "cancel" a pan once you've started it (apart from pressing the key for the opposite pan-direction the right number of times)?

:?:

User avatar
hoglet
Posts: 7117
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by hoglet » Tue Nov 01, 2016 10:58 pm

lurkio wrote: Are you plotting each cell onto an individual pixel on screen, or is the grid "zoomed out" and therefore might each pixel represent more than one cell?
It's one cell maps to one pixel at the moment.

I might experiment with zooming out and in sometime soon.
lurkio wrote: Is there any way to "cancel" a pan once you've started it (apart from pressing the key for the opposite pan-direction the right number of times)?
Yes, just press return.

Dave

User avatar
BigEd
Posts: 1825
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Conway's Game of Life for Atom, Beeb, Elk?

Post by BigEd » Wed Nov 02, 2016 12:50 pm

BigEd wrote:
... see if we can run a Gosper Breeder, probably for the first time ever on a Beeb???
Looks like we can indeed! But although we may never know, I think it's possible my friend's Life was able to run it, back in 1988. (Remarkably enough, he's still got backups from that time, and we might yet be able to get the program running again.)
And indeed, Dave (hoglet) has been successful in running that Life from the backup copy my friend supplied - see
viewtopic.php?f=2&t=12074

Post Reply