Page 1 of 1

Codd/Wireworld compound

Posted: August 17th, 2010, 7:52 pm
by Extrementhusiast
I've been interested in building a rule table that's based on Codd and Wireworld, which would use the von Neumann neighborhood. Here's the list of confirmed cellstates:

Empty, Wire, Tail, Generator, Left Generated, Right Generated, Straight Generated, Left Adder, Right Adder, Straight Adder, Left Deleter, Right Deleter, Straight Deleter, and Decaying Wire, for a total of 14 cellstates so far. Here are their behaviors:

The generator as well as all of the Adders, Deleters, and certain other cellstates have a tail (like Wireworld). When a generator reaches a dead end (in terms of wire), it deposits three Generateds in all empty cells surrounding the dead end. When an Adder gets to this previously visited dead end, it changes the corresponding Generated to a wire, and the Adder dies. A similar thing happens with deleters, except that they clear a Generated, not simply change it. If an Adder or Deleter reaches a dead end with no Generateds of the corresponding type surrounding it, the Adder or Deleter simply dies off in the usual fashion. Birth rules are the same as in Wireworld for signals, except when two different signals collide. (I haven't evaluated this yet, but I think it should become a Generator or simply turn back into wire.) All Decaying Wires turn empty at the next generation, but I haven't decided what will trigger the change from ordinary Wire to Decaying Wire. I have three ideas: a "Bad Generator" with a "trigger", in which it produces different cells, and the trigger destroys the cells and the ending wire cell. The second idea is to have a "Wire Deleter" and a "Wire Delete Carrier", in which a Wire Delete produces a Wire Delete Carrier, and another signal (possibly just another Wire Deleter, or perhaps any signal at all) triggers the Carrier and deletes any adjacent Wire cells. The third idea is a "Dead End Deleter", in which if it meets a dead end, the last cell (the one that is on the "end") decays and dies. I am probably going to implement the third one, but the other two are still contenders.

Wow, that post was a long one!

Re: Codd/Wireworld compound

Posted: November 11th, 2011, 3:34 pm
by beebop
I'm working on a table for this that implements your 3rd deletion idea and signal heads, and I'll post it when it's done.

EDIT: it has to use the Moore nhood

Re: Codd/Wireworld compound

Posted: November 11th, 2011, 4:28 pm
by beebop
And it's done!

Code: Select all

# CODDWIRE.TABLE
# Based on Extrementhusiast's idea.
# 2 signal collision -> wire.
# 3 signal collision -> generator.
# 4 signal collision -> wire.

n_states:17
neighborhood:Moore
symmetries:rotate4

# States:
# 0: empty
# 1: head
# 2: tail
# 3: wire
# 4: generator
# 5: < generated
# 6: > generated
# 7: ^ generated
# 8: < adder
# 9: > adder
# 10: ^ adder
# 11: <> adder
# 12: ^> adder
# 13: <^ adder
# 14: <^> adder
# 15: dead end deleter
# 16: temporary

var a = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
var b = {a}
var c = {a}
var d = {a}
var e = {a}
var f = {a}
var g = {a}
var h = {a}

var i = {5, 6, 7} # any generated

var j = {0, 2, 3, 4, 5, 6, 7} # anything but signal
var k = {j}
var l = {j}
var m = {j}
var n = {j}
var o = {j}
var p = {j}
var q = {j}

var r = {1, 4, 8, 9, 10, 11, 12, 13, 14, 15} # signals
var s = {r}
var t = {r}
var u = {r}

var v = {0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} # all but wire
var x = {v}
var y = {v}
var z = {v}
var A = {v}
var B = {v}
var C = {v}
var D = {v}

var w = {0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15} # all but tail

# Empty space gets turned to a Generated cell
# left generated
0, 4, 2, a, b, c, d, e, v, 5
# right generated
0, 4, a, b, c, d, e, f, 2, 6
# straight generated
0, 4, a, b, c, d, e, f, w, 7

# automatic deletion of generated cells
i, 3, 3, a, b, c, d, e, 3, 0
i, 16, a, b, c, d, e, f, g, 0
3, 3, a, 3, b, i, c, d, e, 16
16, a, b, c, d, e, f, g, h, 3

# Dead end deletion
15, 2, 0, 0, 0, 0, 0, 0, 0, 0

# Generated cell is turned to wire
# left generated
5, 8, a, b, c, d, e, f, g, 3
5, 11, a, b, c, d, e, f, g, 3
5, 13, a, b, c, d, e, f, g, 3
5, 14, a, b, c, d, e, f, g, 3
# right generated
6, 9, a, b, c, d, e, f, g, 3
6, 11, a, b, c, d, e, f, g, 3
6, 12, a, b, c, d, e, f, g, 3
6, 14, a, b, c, d, e, f, g, 3
# straight generated
7, 10, a, b, c, d, e, f, g, 3
7, 12, a, b, c, d, e, f, g, 3
7, 13, a, b, c, d, e, f, g, 3
7, 14, a, b, c, d, e, f, g, 3

# Signal propagation
r, a, b, c, d, e, f, g, h, 2
2, a, b, c, d, e, f, g, h, 3

3, r, k, l, m, n, o, p, q, r	# 1 sig

3, r, k, s, l, m, n, o, p, 3	# 2 sigs

3, r, k, s, l, t, m, n, o, 4	# 3 sigs

3, r, k, s, l, t, m, u, n, 3	# 4 sigs
I did away with the 'delete' states in favor of 7 adder states because I had to create a temporary state to delete stray 'generator' cells at corners that would trigger on a LEFTADD. I also added a signal head.