Challenge 1: Rule 110 implemtations

For general programming (like esolangs, rust, zig, assembly, any other programming language is allowed)
Post Reply
User avatar
Jeff Calc 84
Advanced Member
Posts: 81
Joined: Sat Oct 04, 2025 12:21 am
Location: Earth
Contact:

Challenge 1: Rule 110 implemtations

Post by Jeff Calc 84 »

Rule 110 is a cellular automaton that has been proved to be turing complete.
Today's challenge is to implement Rule 110.
Here are the languages you can use:
Ordinary: C/C++, Python, Ti-Basic, Axe
Just weird: Befunge, Brainf***, FALSE, <><

Plz PM me your answers. (I'll check next Monday ;) )

LAST TIME FOR SUBMISSION: UTC 12:00 PM 12/21
Last edited by Jeff Calc 84 on Thu Dec 18, 2025 7:00 am, edited 3 times in total.
Working hard on Axe...
Support me on Codeberg!
Me on Cemetech, Ticalc.
User avatar
Jeff Calc 84
Advanced Member
Posts: 81
Joined: Sat Oct 04, 2025 12:21 am
Location: Earth
Contact:

Re: Challenge 1: Rule 110 implemtations

Post by Jeff Calc 84 »

Ahem, one more rule: NO COPYING OTHER PEOPLE'S CODE.
Working hard on Axe...
Support me on Codeberg!
Me on Cemetech, Ticalc.
User avatar
Sumde
Site Admin
Posts: 72
Joined: Thu Oct 02, 2025 8:04 pm
Location: Canada
Contact:

Re: Challenge 1: Rule 110 implemtations

Post by Sumde »

You should make a scoreboard of the points! :D
Image
User avatar
Jeff Calc 84
Advanced Member
Posts: 81
Joined: Sat Oct 04, 2025 12:21 am
Location: Earth
Contact:

Re: Challenge 1: Rule 110 implemtations

Post by Jeff Calc 84 »

yep.
Working hard on Axe...
Support me on Codeberg!
Me on Cemetech, Ticalc.
User avatar
Jeff Calc 84
Advanced Member
Posts: 81
Joined: Sat Oct 04, 2025 12:21 am
Location: Earth
Contact:

Re: Challenge 1: Rule 110 implemtations

Post by Jeff Calc 84 »

I guess it's over now.
SCOREBOARD:
A. Computer
1. Sumde, for their impressive C code *made in 15 minutes*:

Code: Select all

#include <stdio.h>

#define HEIGHT 80
#define WIDTH 80

int main() {
	int automation_contents[HEIGHT][WIDTH]= {0};
	automation_contents[0][WIDTH-2] = 1;

	int next_gen[WIDTH] = {0};
	int test[8] = {0,1,1,1,0,1,1,0};
	for (int i = 0; i<HEIGHT; i++) {
		for (int j = 0; j<WIDTH-2; j++) {
			int ac_offset[3];
			for (int k = 0; k<3; k++) {
				ac_offset[k] = automation_contents[i][j+k];
			}
			next_gen[j+1]=test[4*ac_offset[0]+2*ac_offset[1]+ac_offset[2]];
			if (i!=HEIGHT-1) {
				automation_contents[i+1][j+1] = next_gen[j+1];
			}
		}
		for (int j = 0; j<WIDTH; j++) {
			if (automation_contents[i][j]==1) {
				printf("#");
			}
			if (automation_contents[i][j]==0) {
				printf(".");
			}
		}
		printf("\n");
	}
	return 0;
}
B. Calculator
1. Jeff Calc 84, for some Axe code that runs slower (it's on a calc), but is still very speedy:

Code: Select all

.RULE110
ClrDraw
DiagnosticOff
Full
Pxl-On(94,0
1->B
0->{L1}
1->{L1+1}
1->{L1+2}
1->{L1+3}
0->{L1+4}
1->{L1+5}
1->{L1+6}
0->{L1+7}

Repeat getKey(15) or (B=70):DispGraph
   For(A,1,94
      4*pxl-Test(A-1,B-1)+(2*pxl-Test(A,B-1))+pxl-Test(A+1,B-1)->C
      If {L1+C}
         Pxl-On(A,B
      End
   End
   B++
   Pause 50
End
Pause 10000
In this contest, I've split it into two competitions, namely Computer and Calculator. Both Sumde and Jeff Calc 84 are winners!
:D :D :D

Stay tuned for next contest!
Working hard on Axe...
Support me on Codeberg!
Me on Cemetech, Ticalc.
Post Reply