Programmable computer

For discussion of specific patterns or specific families of patterns, both newly-discovered and well-known.
User avatar
gameoflifemaniac
Posts: 1242
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: Programmable computer

Post by gameoflifemaniac » January 29th, 2017, 2:55 pm

So the second prime printer calculates all primes up to 223?
I was so socially awkward in the past and it will haunt me for the rest of my life.

Code: Select all

b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!

User avatar
blah
Posts: 311
Joined: April 9th, 2016, 7:22 pm

Re: Programmable computer

Post by blah » January 29th, 2017, 3:25 pm

Okay. I Did It Myself. I installed python on my laptop and then moved the assembled files onto my PC. My program was actually incomplete, by the way; I forgot the print instruction. Technically it would still have simulated the CA (which is rule 102, by the way) but it wouldn't have displayed it. Here's the corrected version:

Code: Select all

write a 1
print a
add a a b
xor a b a
goto 1
Also, the assembler program has a few missing features. Namely labels and the ability to pre-set the contents of registers, rather than having to use write instructions at the beginning of the program. Maybe I'll make a Lua version myself with these features.

I would post the file, but apparently I can only post an attachment of up to 256 kilobytes. I compressed it and I got a filesize similar to what dvgrn posted (~650kb) but it's still too big for me to post.
succ

simeks
Posts: 407
Joined: March 11th, 2015, 12:03 pm
Location: Sweden

Re: Programmable computer

Post by simeks » January 29th, 2017, 3:59 pm

gameoflifemaniac wrote:So the second prime printer calculates all primes up to 223?
Yes, and after that it gets confused by arithmetic overflow and claims all odd numbers from 229 to 255 are prime numbers...
I use this C program to simulate the behaviour:

Code: Select all

#include <stdlib.h>
#include <stdio.h>

#define u8 unsigned char

int main (void)
{
		int ic = 0;
		
		u8 a = 0;
		u8 b = 0;
		u8 c = 0;
		u8 d = 0;
		u8 e = 0;
		u8 f = 0;
		u8 g = 0;
		
L00:	ic++; f = 224;
L01:	ic++; g = 2;
L02:	ic++; a = 5;
L03:	ic++; b = 3;
L04:	ic++; c = 0;
L05:	ic++; e = ~a;
L06:	ic++; e++;
L07:	ic++; d = b + e;
L08:	ic++; c++;
L09:	ic++; d = d + b;
L10:	ic++; e = d & f;
L11:	ic++; if (e != 0) goto L13;
L12:	ic++; goto L14;
L13:	ic++; goto L08;
L14:	ic++; if (d != 0) goto L16;
L15:	ic++; goto L24;
L16:	ic++; e = ~c;
L17:	ic++; e = b + e;
L18:	ic++; e = (e & 0x80 ? 0xff : 0x00);
L19:	ic++; if (e != 0) goto L21;
L20:	ic++; goto L23;
L21:	ic++; b = b + g;
L22:	ic++; goto L04;
L23:	ic++; printf ("%3d, ic = %5d\n", a, ic);
L24:	ic++; a = a + g;
				if (a < 5) return 0;
L25:	ic++; goto L03;

		return 0;
}

User avatar
gameoflifemaniac
Posts: 1242
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: Programmable computer

Post by gameoflifemaniac » January 30th, 2017, 8:40 am

So what's with 225 and 227?
I was so socially awkward in the past and it will haunt me for the rest of my life.

Code: Select all

b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!

User avatar
gameoflifemaniac
Posts: 1242
Joined: January 22nd, 2017, 11:17 am
Location: There too

Re: Programmable computer

Post by gameoflifemaniac » February 11th, 2017, 3:09 am

Your calculator calculated all the primes up to 199. It took our computer a week.
I was so socially awkward in the past and it will haunt me for the rest of my life.

Code: Select all

b4o25bo$o29bo$b3o3b3o2bob2o2bob2o2bo3bobo$4bobo3bob2o2bob2o2bobo3bobo$
4bobo3bobo5bo5bo3bobo$o3bobo3bobo5bo6b4o$b3o3b3o2bo5bo9bobo$24b4o!

User avatar
Coban
Posts: 26
Joined: June 26th, 2016, 3:50 pm
Location: NYC

Re: Programmable computer

Post by Coban » March 10th, 2017, 5:26 pm

Hi,
I made an english document that summarizes the functioning of my in-game computer:
https://drive.google.com/open?id=0B-4kR ... UJZWTlOMTg
Nicolas

User avatar
dvgrn
Moderator
Posts: 10670
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Programmable computer

Post by dvgrn » October 30th, 2019, 10:51 am

Coban wrote:
March 10th, 2017, 5:26 pm
Hi,
I made an english document that summarizes the functioning of my in-game computer:
https://drive.google.com/open?id=0B-4kR ... UJZWTlOMTg
Due to past experiences with links to online resources evaporating over time, my instinct is to put a copy of this very nice document somewhere that's likely to remain accessible (and be backed up). Right here seems good -- PDF format:
8-bit-computer-documentation.zip
(126.53 KiB) Downloaded 229 times

User avatar
Coban
Posts: 26
Joined: June 26th, 2016, 3:50 pm
Location: NYC

Re: Programmable computer

Post by Coban » October 30th, 2019, 11:15 am

Actually there is also a Github repo :
https://github.com/nicolasloizeau/gol-computer
Nicolas

User avatar
dvgrn
Moderator
Posts: 10670
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Programmable computer

Post by dvgrn » October 30th, 2019, 11:59 am

Coban wrote:
October 30th, 2019, 11:15 am
Actually there is also a Github repo :
https://github.com/nicolasloizeau/gol-computer
Thanks! I've added a link to the repo in the new LifeWiki article, which is kind of a placeholder for the moment but at least it's a start.

I'm still intending to make a copy of the pattern available in Golly's Online Archives under Very Large Patterns -- probably a programmed sample with some comments explaining optimal Golly settings, where to look for the output, when to expect the first prime if it's the prime-calculating program, etc.

If anyone would like to contribute some comment text along these lines, I'd be most grateful! There are still dozens of patterns like this one that ought to be added to the Online Archives. Having to generate and review good comments for each one is the main thing that makes the migration process so slow.

User avatar
Entity Valkyrie 2
Posts: 1758
Joined: February 26th, 2019, 7:13 pm
Contact:

Re: Programmable computer

Post by Entity Valkyrie 2 » November 8th, 2019, 8:22 pm

Not sure if this is right thread:

XOR gate:

Code: Select all

x = 84, y = 269, rule = B3/S23
33bo$32bobo$32bobo$30b3ob2o$29bo$30b3ob2o$32bob2o3$27b2o$28bo$28bobo$
18bo10b2o$16b3o$15bo$15b2o$2o48b2o$bo48b2o$bob2o$2bo2bo7bo15bo$3b2o10b
o13bo$13b2o3b2o9b3o$18b2o11bo4$27bo3b2o$26bobo3bo$25bobo3bo$21b2obobo
3bo$21b2obo2b4obo$25bobo3bobo7b2o$21b2ob2o2bo2bobo7b2o$22bobo2b2o3bo$
10b2o10bobo$10b2o11bo6$82b2o$81bo$82bo32$33bo$32bobo$32bobo$30b3ob2o$
29bo$30b3ob2o$32bob2o3$27b2o$28bo$28bobo$18bo10b2o$16b3o$15bo$15b2o$2o
48b2o$bo48b2o$bob2o$2bo2bo7bo15bo$3b2o9b2o13bo$13b2o3b2o9b3o$18b2o11bo
4$27bo3b2o$26bobo3bo$25bobo3bo$21b2obobo3bo$21b2obo2b4obo$25bobo3bobo
7b2o$21b2ob2o2bo2bobo7b2o$22bobo2b2o3bo$10b2o10bobo$10b2o11bo6$82b2o$
81bo$82bo32$33bo$32bobo$32bobo$30b3ob2o$29bo$30b3ob2o$32bob2o3$27b2o$
28bo$28bobo$18bo10b2o$16b3o$15bo$15b2o$2o48b2o$bo48b2o$bob2o$2bo2bo7bo
15bo$3b2o10bo13bo$13b2o3b2o9b3o$18b2o11bo4$27bo3b2o$26bobo3bo$25bobo3b
o$21b2obobo3bo$21b2obo2b4obo$25bobo3bobo7b2o$21b2ob2o2bo2bobo7b2o$22bo
bo2b2o3bo$10b2o10bobo$10b2o11bo6$81b3o$81bo$82bo32$33bo$32bobo$32bobo$
30b3ob2o$29bo$30b3ob2o$32bob2o3$27b2o$28bo$28bobo$18bo10b2o$16b3o$15bo
$15b2o$2o48b2o$bo48b2o$bob2o$2bo2bo7bo15bo$3b2o9b2o13bo$13b2o3b2o9b3o$
18b2o11bo4$27bo3b2o$26bobo3bo$25bobo3bo$21b2obobo3bo$21b2obo2b4obo$25b
obo3bobo7b2o$21b2ob2o2bo2bobo7b2o$22bobo2b2o3bo$10b2o10bobo$10b2o11bo
6$81b3o$81bo$82bo!
Bx222 IS MY WORST ENEMY.

Please click here for my own pages.

My recent rules:
StateInvestigator 3.0
B3-kq4ej5i6ckn7e/S2-i34q6a7
B3-kq4ej5y6c/S2-i34q5e
Move the Box

User avatar
dvgrn
Moderator
Posts: 10670
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Programmable computer

Post by dvgrn » November 8th, 2019, 9:00 pm

Entity Valkyrie 2 wrote:
November 8th, 2019, 8:22 pm
XOR gate...
That one has been around for a decade or so -- back when forum message numbers were in the low triple digits. See also here for simeks' links to alternate XOR mechanisms (including this one).

Post Reply