Reversible Wireless World
Reversible Wireless World
Hello
I found only a few threads about reversible CA here, maybe attached CA could be interesting.
It is socalled secondorder reversible CA with four states produced from CA with two states.
Simple stable gliders  are threecell "ants" moving in vertical and horizontal directions with
unit speed with reflections, collisions and splitting. The ants can be used for construction
of different kinds of "wireless circuits." Some examples are in attachment (zip, Golly format).
Four slightly different rules are there: WlAnt, WlAnt2,WlAnt3,WlAnt4. All examples use
WlAnt rule. Most "wireless circuits" work with all rules in the same way.
Here is a description of a rule (from readme.txt)

Rule WlAnt:
There are four states: 0 (empty, white), 1 (red), 2 (green), 3 (blue).
A cell with state 0 or 2 (white or green) is called "even"
and a cell with state 1 or 3 (red or blue) is called "odd"
A step may be divided into two stages:
First stage:
Mark all cells satisfying two conditions:
(1) total number of odd cells in four closest positions (up, down, left, right) is one or two,
(2) cells in four diagonal positions are even.
Second stage:
For unmarked: exchange red and green cells (1<>2).
For marked cells: change empty into red, red into blue, blue into green,
green into empty (0>1>3>2>0).
UPDATE Mar 6: WlAntWorldNews.zip with 32 new patterns discussed in the thread
I found only a few threads about reversible CA here, maybe attached CA could be interesting.
It is socalled secondorder reversible CA with four states produced from CA with two states.
Simple stable gliders  are threecell "ants" moving in vertical and horizontal directions with
unit speed with reflections, collisions and splitting. The ants can be used for construction
of different kinds of "wireless circuits." Some examples are in attachment (zip, Golly format).
Four slightly different rules are there: WlAnt, WlAnt2,WlAnt3,WlAnt4. All examples use
WlAnt rule. Most "wireless circuits" work with all rules in the same way.
Here is a description of a rule (from readme.txt)

Rule WlAnt:
There are four states: 0 (empty, white), 1 (red), 2 (green), 3 (blue).
A cell with state 0 or 2 (white or green) is called "even"
and a cell with state 1 or 3 (red or blue) is called "odd"
A step may be divided into two stages:
First stage:
Mark all cells satisfying two conditions:
(1) total number of odd cells in four closest positions (up, down, left, right) is one or two,
(2) cells in four diagonal positions are even.
Second stage:
For unmarked: exchange red and green cells (1<>2).
For marked cells: change empty into red, red into blue, blue into green,
green into empty (0>1>3>2>0).
UPDATE Mar 6: WlAntWorldNews.zip with 32 new patterns discussed in the thread
 Attachments

 WlAntWorldNews.zip
 Wireless Ant World News
(32 new patterns)  (21.46 KiB) Downloaded 286 times

 WlAntWorld.zip
 (7.91 KiB) Downloaded 297 times
Last edited by alexv on March 6th, 2014, 7:31 am, edited 1 time in total.

 Posts: 489
 Joined: April 9th, 2013, 11:03 pm
Re: Reversible Wireless World
I managed to make a signal generator:
Code: Select all
x = 13, y = 20, rule = WlAnt
4.2C3.2C$4.2C3.2C$3.3C3.2C$3.3C3.2C$9.2C$2C8.2C$2C8.2C$2C3.2C3.2C$2C
3.2C3.2C$2C9.2C$2C9.2C$2C9.2C$5.3C3.2C$5.3C3.2C$2C9.2C$2C9.2C$11.2C$
3.2C.A.2C$3.2C.C.2C$6.B!
Re: Reversible Wireless World
Here are three more:
Brian Prentice
Code: Select all
x = 18, y = 50, rule = WlAnt
11.4C$11.4C2$8.2C6.2C$8.2C6.2C$8.2C$8.2C.ACB.BCA2$11.3C$11.3C7$11.4C
$11.4C2$8.2C2.BCA.2C$8.2C6.2C$8.2C$8.2C.ACB.BCA2$11.3C$11.3C7$3.2C8.
2C$3.2C8.2C2$2C2.BCA3.BCA3.2C$2C12.B.2C$3.A10.C$3.C10.A$3.B3$14.B$3.
A10.C$3.C10.A$2C.B$2C3.ACB3.ACB.BCA2$3.2C7.2C$3.2C7.2C!
Re: Reversible Wireless World
Additional generated signals may be "collected" sometimes (see WlAntsplit.rle), but I did not guess yet if it is possible for examples like above.
Re: Reversible Wireless World
The generator  collector pair for the first bprentice example.
I think, it may be done also for any similar examples (CA is reversible, after all)
Code: Select all
x = 49, y = 10, rule = WlAnt
3.4C35.4C$3.4C35.4C2$2C6.2C29.2C6.2C$2C6.2C29.2C6.2C$2C45.2C$2C.ACB.B
CA13.BCA13.BCA.ACB.2C2$3.3C37.3C$3.3C37.3C!
Re: Reversible Wireless World
An extension of the Wireless Ant Program is included in the following archive:
http://bprentice.webenet.net/Java%20Squ ... 0World.zip
This extension adds diagonal moving ants to the orthogonal moving ants by increasing the number of states to 7. The program extends my basic Square Cell program which is briefly described in the file "Java Square Cell.html" which is included in the archive. The Java source code together with some example oscillators and guns are also included.
Brian Prentice
http://bprentice.webenet.net/Java%20Squ ... 0World.zip
This extension adds diagonal moving ants to the orthogonal moving ants by increasing the number of states to 7. The program extends my basic Square Cell program which is briefly described in the file "Java Square Cell.html" which is included in the archive. The Java source code together with some example oscillators and guns are also included.
Brian Prentice
Re: Reversible Wireless World
Brian
If your extension reversible? Initial CA was also used for research of reversible circuits (aka conservative billiard ball logic). In fact, due to example with Fredkin gate it is computationally universal reversible CA.
If your extension reversible? Initial CA was also used for research of reversible circuits (aka conservative billiard ball logic). In fact, due to example with Fredkin gate it is computationally universal reversible CA.
Re: Reversible Wireless World
Some links with additional information about discussed CA
Initial definition: http://ayvlasov.wordpress.com/2012/07/23/quants/
Computational universality: http://quantumbot.wordpress.com/2013/08 ... ntologic/
Penrose tiling (an analogue of WlAnt4): http://ayvlasov.wordpress.com/2012/09/27/penrosesants/
Initial definition: http://ayvlasov.wordpress.com/2012/07/23/quants/
Computational universality: http://quantumbot.wordpress.com/2013/08 ... ntologic/
Penrose tiling (an analogue of WlAnt4): http://ayvlasov.wordpress.com/2012/09/27/penrosesants/
Re: Reversible Wireless World
Signal generator suggested by Sphenocorona has a difference with other generators mentioned above, because
it may be turned on by external signal. Simpler example of such generator is
It is not clear how to create "true" collector for such a case. Yet, there is another simple model with
possibility to prevent infinite activity using second signal to turn it off
it may be turned on by external signal. Simpler example of such generator is
Code: Select all
x = 14, y = 13, rule = WlAnt
3.2C4.3C$2.3C4.3C$2.2C3$7.2C$BCA4.2C$7.2C3$2.2C8.2C$2.3C6.3C$3.2C6.2C
!
It is not clear how to create "true" collector for such a case. Yet, there is another simple model with
possibility to prevent infinite activity using second signal to turn it off
Code: Select all
x = 81, y = 16, rule = WlAnt
70.2C4.3C$69.3C4.3C$69.2C3$74.2C$68.BCA3.2C$74.2C$69.2C$69.2C2$BCA2$
69.2C8.2C$69.3C6.3C$70.2C6.2C!
Re: Reversible Wireless World
I think so. Here are some more simple guns:alexv wrote:Is your extension reversible?
Code: Select all
x = 10, y = 10, rule =WlAnt
3.2C$3.2C2$.ACBCA2.2C$8.2C$2C$2C2$5.2C$5.2C!
Code: Select all
x = 18, y = 25, rule = WlAnt
.C$2C5$7.C$6.3C$7.C15$15.3C$16.C!
Code: Select all
x = 2, y = 31, rule = WlAnt
2C$2C$.C2$.B$.C$.A2$.B$.C$.A2$.B$.C$.A2$.A$.C$.B2$.A$.C$.B2$.A$.C$.
B2$.C$2C$2C!
Last edited by bprentice on February 6th, 2014, 9:21 pm, edited 1 time in total.
Re: Reversible Wireless World
Brian
Did you check possibility to inverse evolution for patterns with interaction between
usual and diagonal ants?
Did you check possibility to inverse evolution for patterns with interaction between
usual and diagonal ants?
Re: Reversible Wireless World
I had not checked that situation. I now agree that my extension to your program is not reversible. Thank you for pointing that out Shura.alexv wrote: Did you check possibility to inverse evolution for patterns with interaction between
usual and diagonal ants?
Brian
Re: Reversible Wireless World
Brian
Anyway your ideas look interesting, because such reversible automata with 7 states indeed should exist.
Formally, second order automata should have 3x3=9 states, but two states may be omitted sometimes.
I have got very similar CA modeling signals 0 and 1 by two different kinds of ants.
Here is rule AntBitS7.rule (with icons)
The simple example with interaction is
Python script to reverse
Alex V
Anyway your ideas look interesting, because such reversible automata with 7 states indeed should exist.
Formally, second order automata should have 3x3=9 states, but two states may be omitted sometimes.
I have got very similar CA modeling signals 0 and 1 by two different kinds of ants.
Here is rule AntBitS7.rule (with icons)
Code: Select all
@RULE AntBitS7
@TREE
num_states=7
num_neighbors=8
num_nodes=28
1 0 3 6 1 4 5 2
1 1 4 5 0 3 6 2
1 2 4 5 1 3 6 0
2 0 1 2 0 1 2 0
2 1 1 0 1 1 0 1
2 2 0 2 2 0 2 2
2 1 0 0 1 0 0 1
2 0 0 0 0 0 0 0
2 2 0 0 2 0 0 2
3 3 4 5 3 4 5 3
3 4 6 7 4 6 7 4
3 5 7 8 5 7 8 5
3 6 7 7 6 7 7 6
3 7 7 7 7 7 7 7
3 8 7 7 8 7 7 8
4 9 10 11 9 10 11 9
4 10 12 13 10 12 13 10
4 11 13 14 11 13 14 11
4 13 13 13 13 13 13 13
5 15 16 17 15 16 17 15
5 18 18 18 18 18 18 18
6 19 20 20 19 20 20 19
6 20 20 20 20 20 20 20
7 21 22 22 21 22 22 21
7 22 22 22 22 22 22 22
8 23 24 24 23 24 24 23
8 24 24 24 24 24 24 24
9 25 26 26 25 26 26 25
@COLORS
0 31 31 31
1 255 0 0
2 223 31 95
3 0 254 0
4 0 0 159
5 38 38 84
6 31 159 47
@ICONS
XPM
/* width height num_colors chars_per_pixel */
"15 105 232 2"
/* colors */
".. c #000000"
"BA c #000004"
"CA c #161631"
"DA c #004C00"
"EA c #000007"
"FA c #007200"
"GA c #6E0000"
"HA c #00000E"
"IA c #00000F"
"JA c #000013"
"KA c #EF0000"
"LA c #0F0F21"
"MA c #187C25"
"NA c #000015"
"OA c #1FA330"
"PA c #000019"
"AB c #7F0000"
"BB c #E11F5F"
"CB c #00001E"
"DB c #1FA02F"
"EB c #00001F"
"FB c #220000"
"GB c #080812"
"HB c #590000"
"IB c #000028"
"JB c #1E1E43"
"KB c #00002C"
"LB c #00B500"
"MB c #004000"
"NB c #000030"
"OB c #DF1F5E"
"PB c #DF1F5F"
"AC c #000034"
"BC c #198327"
"CC c #000035"
"DC c #001700"
"EC c #6A0000"
"FC c #000038"
"GC c #FE0000"
"HC c #0F4F17"
"IC c #570C25"
"JC c #171733"
"KC c #00D800"
"LC c #051B08"
"MC c #00003C"
"NC c #A10000"
"OC c #00FE00"
"PC c #198026"
"AD c #00003F"
"BD c #D80000"
"CD c #000042"
"DD c #167322"
"ED c #000045"
"FD c #0C3F12"
"GD c #000048"
"HD c #000049"
"ID c #1E0000"
"JD c #00004B"
"KD c #262654"
"LD c #00004E"
"MD c #00004F"
"ND c #1D972C"
"OD c #000050"
"PD c #550000"
"AE c #00F800"
"BE c #E90000"
"CE c #000052"
"DE c #000055"
"EE c #00CF00"
"FE c #005A00"
"GE c #00005B"
"HE c #C30000"
"IE c #1F1F45"
"JE c #00A600"
"KE c #000060"
"LE c #B00000"
"ME c #FA0000"
"NE c #00CC00"
"OE c #280511"
"PE c #530000"
"AF c #000065"
"BF c #061F09"
"CF c #000068"
"DF c #400000"
"EF c #202020"
"FF c #00006E"
"GF c #00EF00"
"HF c #770000"
"IF c #AE184A"
"JF c #000071"
"KF c #000076"
"LF c #260510"
"MF c #F80000"
"NF c #000078"
"OF c #070000"
"PF c #007700"
"AG c #00007A"
"BG c #00007B"
"CG c #B3194C"
"DG c #E50000"
"EG c #002800"
"FG c #1F040D"
"GG c #880000"
"HG c #00C300"
"IG c #000080"
"JG c #000081"
"KG c #272756"
"LG c #2B0612"
"MG c #00E900"
"NG c #750000"
"OG c #000087"
"PG c #009A00"
"AH c #180000"
"BH c #00C000"
"CH c #07230A"
"DH c #000090"
"EH c #002200"
"FH c #000092"
"GH c #000095"
"HH c #041606"
"IH c #187B24"
"JH c #006E00"
"KH c #730000"
"LH c #00009B"
"MH c #00009C"
"NH c #00009E"
"OH c #00009F"
"PH c #0000A0"
"AI c #212121"
"BI c #0000A1"
"CI c #0000A2"
"DI c #0000A3"
"EI c #0000A4"
"FI c #1F9F2F"
"GI c #0000A5"
"HI c #009100"
"II c #0000A6"
"JI c #0000A8"
"KI c #840000"
"LI c #E61F62"
"MI c #125E1B"
"NI c #710F30"
"OI c #006500"
"PI c #051D08"
"AJ c #CC0000"
"BJ c #6F0F2F"
"CJ c #00FD00"
"DJ c #008800"
"EJ c #21214A"
"FJ c #005F00"
"GJ c #A60000"
"HJ c #00FA00"
"IJ c #0C3E12"
"JJ c #5A0000"
"KJ c #005900"
"LJ c #EE0000"
"MJ c #007F00"
"NJ c #470000"
"OJ c #910000"
"PJ c #003000"
"AK c #D41D5A"
"BK c #E01F5F"
"CK c #7E0000"
"DK c #13132A"
"EK c #007C00"
"FK c #000700"
"GK c #B50000"
"HK c #580C25"
"IK c #FF0000"
"JK c #005300"
"KK c #00EE00"
"LK c #C61B54"
"MK c #320000"
"NK c #7C0000"
"OK c #1B8D2A"
"PK c #FD0000"
"AL c #0C0000"
"BL c #232323"
"CL c #007300"
"DL c #05050B"
"EL c #EA0000"
"FL c #B8194E"
"GL c #1B1B3D"
"HL c #00E500"
"IL c #300000"
"JL c #C40000"
"KL c #1FA430"
"LL c #00BC00"
"ML c #004700"
"NL c #001E00"
"OL c #006A00"
"PL c #1F9E2F"
"AM c #650000"
"BM c #F90000"
"CM c #001800"
"DM c #0F5017"
"EM c #2C0613"
"FM c #A11645"
"GM c #AD1849"
"HM c #00FF00"
"IM c #C00000"
"JM c #06060E"
"KM c #00B000"
"LM c #06060F"
"MM c #310715"
"NM c #9A0000"
"OM c #00F900"
"PM c #008400"
"AN c #170000"
"BN c #000C00"
"CN c #13611D"
"DN c #003200"
"EN c #CF0000"
"FN c #0E0E20"
"GN c #062009"
"HN c #007E00"
"IN c #280000"
"JN c #24244F"
"KN c #720000"
"LN c #BC0000"
"MN c #5F0000"
"NN c #005500"
"ON c #4C0000"
"PN c #831238"
"AO c #00A100"
"BO c #070710"
"CO c #E51F61"
"DO c #1D1D41"
"EO c #88133A"
"FO c #00C400"
"GO c #00EA00"
"HO c #007500"
/* icon for state 1 */
"..........ECGJLNGKOJMK........"
"......INBMIKPKGCGCPKIKNC......"
"......MFPKPKIKAJLJIKGCIKKN...."
"....GAIKGCIKIL....HEPKGCME...."
"....IMPKGCEN......DFIKGCIKIL.."
"....KAGCGCNM......ALIKGCIKMN.."
"....IKGCGCKI........IKGCGCHF.."
"....IKGCGCAB........IKGCGCCK.."
"....IKGCGCGG........IKGCIKKH.."
"....DGGCGCGJ......ANIKGCIKPD.."
"....LEPKGCEL......HBIKGCIKID.."
"....PEIKGCIKAB..AHBEPKPKDG...."
"......BDPKPKIKIKIKPKPKIKNJ...."
"......OFJLIKIKGCIKIKIKJJ......"
"..........FBAMNKNGON.........."
/* icon for state 2 */
"............OENIBJIC.........."
"............FMOBPBIF.........."
"......HKPNLKBBPBPBIF.........."
"......IFPBPBPBPBPBIF.........."
"......EOIFGMAKPBPBIF.........."
"............GMPBPBIF.........."
"............IFPBPBIF.........."
"............IFPBPBIF.........."
"............IFPBPBIF.........."
"............IFPBPBIF.........."
"............IFPBPBIF.........."
"......LFMMLGFLPBPBFLLGMMLF...."
"......CGCOLIBKPBPBBKLICOCG...."
"......CGCOCOCOCOCOCOCOCOCG...."
"......FGEMMMMMMMMMMMMMMMLF...."
/* icon for state 3 */
"..........OLJELLLBHIDN........"
"......EGOMHMCJOCOCCJHMAO......"
"......AECJCJHMNEKKHMOCHMFA...."
"....JHHMOCHMPJ....HGCJOCHJ...."
"....BHCJOCEE......MBHMOCHMPJ.."
"....GFOCOCPG......BNHMOCHMFJ.."
"....HMOCOCPM........HMOCOCPF.."
"....HMOCOCMJ........HMOCOCHN.."
"....HMOCOCDJ........HMOCHMCL.."
"....HLOCOCJE......DCHMOCHMNN.."
"....KMCJOCGO......KJHMOCHMNL.."
"....JKHMOCHMMJ..CMMGCJCJHL...."
"......KCCJCJHMHMHMCJCJHMML...."
"......FKFOHMHMOCHMHMHMFE......"
"..........EHOIEKHODA.........."
/* icon for state 4 */
"..........CDCFKFJFGEEB........"
"......PAMHPHNHOHOHNHIIAF......"
"......LHNHNHDIIGGHOHOHBIGD...."
"....EDPHOHGICB....AGNHOHMH...."
"....NFNHOHJG......IBDIOHEICB.."
"....GHOHOHKE......EAIIOHBIMC.."
"....EIOHOHCE........JIOHOHJD.."
"....JIOHOHMD........JIOHOHLD.."
"....CIOHOHDE........JIOHOHGD.."
"....DHOHOHCF......HAIIOHBICC.."
"....FFNHOHFH......FCBIOHIIJA.."
"....ACCIOHBIOD..IAFHNHNHDH...."
"......OGNHNHBIJIGINHNHGIKB...."
"......BABGIIPHOHOHCIBIFC......"
"..........NAADLDHDNB.........."
/* icon for state 5 */
"............LMDKDKFN.........."
"............GLKDKDDO.........."
"......LACAEJKDKDKDDO.........."
"......DOKDKDKDKDKDDO.........."
"......JCDODOJNKDKDDO.........."
"............DOKDKDDO.........."
"............DOKDKDDO.........."
"............DOKDKDDO.........."
"............DOKDKDDO.........."
"............DOKDKDDO.........."
"............DOKDKDDO.........."
"......JMGBBOIEKDKDIEBOGBJM...."
"......JBKGKGKDKDKDKDKGKGJB...."
"......JBKGKGKGKGKGKGKGKGJB...."
"......DLBOGBGBGBGBGBGBGBJM...."
/* icon for state 6 */
"............PIDMHCIJ.........."
"............DDPLFIMA.........."
"......FDMIOKDBFIFIMA.........."
"......MAFIFIFIFIFIMA.........."
"......CNMAIHNDFIFIMA.........."
"............IHFIFIMA.........."
"............MAFIFIMA.........."
"............MAFIFIMA.........."
"............MAFIFIMA.........."
"............MAFIFIMA.........."
"............MAFIFIMA.........."
"......LCCHBFBCFIFIBCBFCHLC...."
"......PCOAKLDBFIFIDBKLOAPC...."
"......PCOAOAOAOAOAOAOAOAPC...."
"......HHGNCHCHCHCHCHCHCHLC...."
/* icon for state 7 */
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIAIAIAIAIAIAIAIAIAI"
"BLAIAIAIAIAIEFBLBLBLBLBLBLBLBL"
XPM
/* width height num_colors chars_per_pixel */
"7 49 160 2"
/* colors */
".. c #000000"
"BA c #940000"
"CA c #000004"
"DA c #0A310E"
"EA c #E31F61"
"FA c #00000B"
"GA c #B80000"
"HA c #5B0000"
"IA c #000013"
"JA c #EF0000"
"KA c #E82063"
"LA c #1FA330"
"MA c #252553"
"NA c #00001C"
"OA c #00001F"
"PA c #000020"
"AB c #010702"
"BB c #B60000"
"CB c #00B800"
"DB c #080812"
"EB c #A30000"
"FB c #000028"
"GB c #00002B"
"HB c #00002F"
"IB c #330000"
"JB c #006600"
"KB c #010103"
"LB c #000039"
"MB c #171734"
"NB c #380717"
"OB c #00003C"
"PB c #198025"
"AC c #00003F"
"BC c #440000"
"CC c #00FB00"
"DC c #C50000"
"EC c #20A430"
"FC c #101025"
"GC c #FC0000"
"HC c #262655"
"IC c #020802"
"JC c #000058"
"KC c #090915"
"LC c #00005C"
"MC c #06220A"
"NC c #1F1F44"
"OC c #660000"
"PC c #000062"
"AD c #00CC00"
"BD c #00F200"
"CD c #000066"
"DD c #9D0000"
"ED c #000069"
"FD c #00A300"
"GD c #020204"
"HD c #181835"
"ID c #181836"
"JD c #00EF00"
"KD c #1E9E2E"
"LD c #000071"
"MD c #450A1D"
"ND c #000073"
"OD c #000079"
"PD c #00007B"
"AE c #14671E"
"BE c #009D00"
"CE c #111125"
"DE c #000080"
"EE c #272757"
"FE c #115A1A"
"GE c #00008A"
"HE c #004B00"
"IE c #000095"
"JE c #000098"
"KE c #1FA22F"
"LE c #009400"
"ME c #0A0104"
"NE c #001F00"
"OE c #00009C"
"PE c #0E4715"
"AF c #00009D"
"BF c #0000A0"
"CF c #030307"
"DF c #212121"
"EF c #0000A2"
"FF c #0000A6"
"GF c #0000A7"
"HF c #0000A8"
"IF c #00DD00"
"JF c #710F30"
"KF c #7D1136"
"LF c #A80000"
"MF c #F20000"
"NF c #4B0000"
"OF c #CC0000"
"PF c #E41F61"
"AG c #020D04"
"BG c #120000"
"CG c #13651D"
"DG c #0B0204"
"EG c #DD0000"
"FG c #610D29"
"GG c #791134"
"HG c #00A800"
"IG c #003300"
"JG c #E72062"
"KG c #13132A"
"LG c #0D4514"
"MG c #FF0000"
"NG c #640E2A"
"OG c #0C0C1A"
"PG c #00C500"
"AH c #320000"
"BH c #14661E"
"CH c #1F0000"
"DH c #07280C"
"EH c #00C200"
"FH c #11591A"
"GH c #232323"
"HH c #8D0000"
"IH c #115619"
"JH c #300614"
"KH c #187D25"
"LH c #FB0000"
"MH c #410000"
"NH c #004400"
"OH c #C20000"
"PH c #AF184B"
"AI c #00B600"
"BI c #004100"
"CI c #B4194C"
"DI c #008D00"
"EI c #0F5017"
"FI c #2C0000"
"GI c #00FF00"
"HI c #8E133C"
"II c #006100"
"JI c #060000"
"KI c #00FC00"
"LI c #20A530"
"MI c #001200"
"NI c #120208"
"OI c #15152D"
"PI c #13641D"
"AJ c #15152F"
"BJ c #8C133B"
"CJ c #610000"
"DJ c #005B00"
"EJ c #91143D"
"FJ c #003200"
"GJ c #00CD00"
"HJ c #00F300"
"IJ c #7E1136"
"JJ c #F30000"
"KJ c #000600"
"LJ c #002C00"
"MJ c #8F143D"
"NJ c #CD0000"
"OJ c #1D1D42"
"PJ c #DE1E5E"
/* icon for state 1 */
"..BGGAJANJIB.."
"..DCMFBCOFGC.."
"..MGDD..HAMGAH"
"..MGHH..NFMGMH"
"..MGEB..CJMGFI"
"..BBLHOCEGJJ.."
"..JIBAOHLFCH.."
/* icon for state 2 */
"......CING...."
"..FGPFPJIJ...."
"..NIJHJGIJ...."
"....DGKAIJ...."
"....MEKAKF...."
"..NBGGEAPHJF.."
"..MDEJHIMJBJ.."
/* icon for state 3 */
"..MICBJDGJIG.."
"..PGBDNHADKI.."
"..GIBE..DJGIFJ"
"..GIDI..HEGIBI"
"..GIFD..IIGILJ"
"..AICCJBIFHJ.."
"..KJLEEHHGNE.."
/* icon for state 4 */
"..FANDIEDEPA.."
"..PDJEGBDEAF.."
"..EFPC..LBFFOA"
"..HFJC..HBFFFB"
"..BFCD..OBGFNA"
"..LDOEACGEJE.."
"..CALCODEDIA.."
/* icon for state 5 */
"......NCCE...."
"..FCHCMAAJ...."
"..CFDBEEAJ...."
"....GDEEAJ...."
"....KBEEAJ...."
"..KCOIHCOJKG.."
"..OGIDHDIDMB.."
/* icon for state 6 */
"......PBPE...."
"..LGLAKDFE...."
"..AGMCECFE...."
"....ICLIFE...."
"....ABLIFH...."
"..DHIHKEKHEI.."
"..DAAECGBHPI.."
/* icon for state 7 */
"GHDFDFDFDFDFGH"
"GHDFDFDFDFDFGH"
"GHDFDFDFDFDFGH"
"GHDFDFDFDFDFGH"
"GHDFDFDFDFDFGH"
"GHDFDFDFDFDFGH"
"GHDFDFDFDFDFGH"
Code: Select all
#CXRLE Pos=9,3
x = 18, y = 7, rule = AntBitS7:T20,20
CDA12.ADC6$CDA12.BEF!
Code: Select all
# Reverse the reversible (3x3 reduced to 7 states)
# By Alex V,
# based on script by Paul Nasca,
# based on the invert script by Andrew Trevorrow
from glife import rect
from time import time
import golly as g
r = rect( g.getrect() )
if r.empty: g.exit("The pattern is empty.")
oldsecs = time()
maxstate = g.numstates()  1
swp = [0, 3, 6, 1, 4, 5, 2]
for row in xrange(r.top, r.top + r.height):
for col in xrange(r.left, r.left + r.width):
cell=g.getcell(col, row)
cell = swp[cell]
g.setcell(col, row, cell )
Re: Reversible Wireless World
Brian
I checked, idea of reversible extension with two kinds of ants and seven states I used earlier
may work with diagonal ants as well. Instead of single mark in rule definition above we may
use two different marks (conditions) and update rules:
No mark (condition 0): 1<>2, 4<>5
Mark #1 (condition 1): 0>1>3>2>0, 4<>5
Mark #2 (condition 2): 0>4>6>5>0, 1<>2
I see, two last exchanges for marks #1 and #2 are missed in your code and
it may be enough for reversibility to add few lines in WirelessAntWorld.java
NOTE: To inverse evolution: 1<>2, 4<>5
(script in my previous comment uses other exchanges, because numeration of states is different)
Alex V
UPDATE:
Sorry, I missed, orthCond and diagCond in Brian's program also should be changed,
I did not guess how to do that with minimal modification and
so below is rewritten step function for WirelessAntWorld.java
I checked, idea of reversible extension with two kinds of ants and seven states I used earlier
may work with diagonal ants as well. Instead of single mark in rule definition above we may
use two different marks (conditions) and update rules:
No mark (condition 0): 1<>2, 4<>5
Mark #1 (condition 1): 0>1>3>2>0, 4<>5
Mark #2 (condition 2): 0>4>6>5>0, 1<>2
I see, two last exchanges for marks #1 and #2 are missed in your code and
it may be enough for reversibility to add few lines in WirelessAntWorld.java
Code: Select all
...
if (orthCond)
{
...
else if (cell == 4)
return 5;
else if (cell == 5)
return 4;
}
...
if (diagCond)
{
...
else if (cell == 1)
return 2;
else if (cell == 2)
return 1;
}
...
(script in my previous comment uses other exchanges, because numeration of states is different)
Alex V
UPDATE:
Sorry, I missed, orthCond and diagCond in Brian's program also should be changed,
I did not guess how to do that with minimal modification and
so below is rewritten step function for WirelessAntWorld.java
Code: Select all
public int step(int row, int column)
{
int N = squareCell.getNeighbor(row  1, column );
int NE = squareCell.getNeighbor(row  1, column + 1);
int E = squareCell.getNeighbor(row , column + 1);
int SE = squareCell.getNeighbor(row + 1, column + 1);
int S = squareCell.getNeighbor(row + 1, column );
int SW = squareCell.getNeighbor(row + 1, column  1);
int W = squareCell.getNeighbor(row , column  1);
int NW = squareCell.getNeighbor(row  1, column  1);
int NN = squareCell.getNeighbor(row  2, column );
int EE = squareCell.getNeighbor(row , column + 2);
int SS = squareCell.getNeighbor(row + 2, column );
int WW = squareCell.getNeighbor(row , column  2);
int CellType[] = {0,1,0,1,2,0,2};
int cell = squareCell.getNeighbor(row, column);
int cCount = 0;
if (CellType[N] == 1) cCount++;
if (CellType[E] == 1) cCount++;
if (CellType[S] == 1) cCount++;
if (CellType[W] == 1) cCount++;
int dCount = 0;
if (CellType[NW] == 1) dCount++;
if (CellType[NE] == 1) dCount++;
if (CellType[SE] == 1) dCount++;
if (CellType[SW] == 1) dCount++;
int cdCount = 0;
if (CellType[NW] == 2) cdCount++;
if (CellType[NE] == 2) cdCount++;
if (CellType[SE] == 2) cdCount++;
if (CellType[SW] == 2) cdCount++;
int ddCount = 0;
if (CellType[NN] == 2) ddCount++;
if (CellType[EE] == 2) ddCount++;
if (CellType[SS] == 2) ddCount++;
if (CellType[WW] == 2) ddCount++;
int Cond = 0;
if ((ddCount == 0) && ((cdCount == 1)  (cdCount == 2)))
Cond = 2;
if ((dCount == 0) && ((cCount == 1)  (cCount == 2)))
Cond = 1;
if ((Cond > 0) && (CellType[cell] != 0))
Cond = CellType[cell];
if ((Cond == 1))
{
if (cell == 0)
return 1;
else if (cell == 1)
return 3;
else if (cell == 3)
return 2;
else if (cell == 2)
return 0;
else if (cell == 4)
return 5;
else if (cell == 5)
return 4;
}
if (Cond == 2)
{
if (cell == 0)
return 4;
else if (cell == 4)
return 6;
else if (cell == 6)
return 5;
else if (cell == 5)
return 0;
else if (cell == 1)
return 2;
else if (cell == 2)
return 1;
}
if (Cond == 0)
{
if (cell == 1)
return 2;
else if (cell == 2)
return 1;
else if (cell == 4)
return 5;
else if (cell == 5)
return 4;
}
return cell;
}
Re: Reversible Wireless World
Shura,
Thank you for the new version of step. I've implemented it in the 7 state program. I've also added a new control in both the 4 state and 7 state programs. This control reverses patterns with the V key.
The new versions can be downloaded here:
http://bprentice.webenet.net/Java%20Squ ... 0World.zip
Brian
Thank you for the new version of step. I've implemented it in the 7 state program. I've also added a new control in both the 4 state and 7 state programs. This control reverses patterns with the V key.
The new versions can be downloaded here:
http://bprentice.webenet.net/Java%20Squ ... 0World.zip
Brian
Re: Reversible Wireless World
The pattern with all possible input values for Fredkin gate
It is some "overclocking" because the gate formally needs 175 steps for operation,
but input values have only 25 steps delay.
PS: Yet another design for the same test (with "reflected loop")
Code: Select all
#Fredkin Gate, loop with all possible combinations of input values
x = 165, y = 61, rule = WlAnt
34.2C72.2C$33.3C72.3C$33.2C74.2C4$67.2C6.2C$66.3C6.3C$57.2C7.2C8.2C7.
2C$56.3C26.3C$55.3C28.3C$55.2C30.2C$110.2C6.2C$61.2C18.2C26.3C6.3C$
60.3C18.3C25.2C8.2C$60.2C20.2C3$23.2C6.2C12.2C6.2C34.2C6.2C$.2C19.3C
6.3C10.3C6.3C32.3C6.3C50.2C$3C19.2C8.2C10.2C8.2C32.2C8.2C50.3C$2C149.
2C$19.BCA$27.2C20.2C20.2C20.2C19.2C$25.6C2.2C8.2C2.6C2.2C8.2C2.6C2.2C
8.2C2.6C2.2C8.13C6.2C$7.2C16.2C2.2C2.2C8.2C2.2C2.2C2.2C8.6C2.2C2.2C8.
2C2.2C2.2C2.2C8.5C2.6C6.3C25.2C$6.3C58.3C39.2C8.2C8.2C25.3C$6.2C59.2C
88.2C$19.BCA$38.2C42.2C20.2C8.2C8.2C$37.3C41.3C20.3C5.6C4.6C2.2C$13.
2C22.2C36.2C2.4C22.2C5.2C2.2C4.2C2.2C2.2C30.2C$12.3C60.6C24.2C55.3C$
12.2C63.2C84.2C$19.BCA$60.2C42.2C$59.4C40.3C$59.4C40.2C2$72.2C8.2C$9.
A28.2C32.3C6.3C25.2C$9.C28.3C30.4C6.4C23.3C$9.B29.2C30.2C10.2C23.2C3$
10.ACB47.ACB47.ACB$2C149.2C$3C147.3C$.2C147.2C3$47.ACB22.ACB$6.2C7.A
141.2C$6.3C6.C140.3C$7.2C6.B140.2C3$34.ACB72.ACB$12.2C149.2C$12.3C
147.3C$13.2C147.2C!
but input values have only 25 steps delay.
PS: Yet another design for the same test (with "reflected loop")
Code: Select all
#Fredkin Gate, "reflected" loop with all combinations of input values
x = 180, y = 61, rule = WlAnt
49.2C72.2C$48.3C72.3C$48.2C74.2C4$82.2C6.2C$81.3C6.3C$72.2C7.2C8.2C7.
2C$71.3C26.3C$70.3C28.3C$70.2C30.2C$125.2C6.2C$76.2C18.2C26.3C6.3C$
75.3C18.3C25.2C8.2C$75.2C20.2C3$38.2C6.2C12.2C6.2C34.2C6.2C$13.2C22.
3C6.3C10.3C6.3C32.3C6.3C50.2C$12.3C22.2C8.2C10.2C8.2C32.2C8.2C50.3C$
12.2C152.2C2$42.2C20.2C20.2C20.2C19.2C$40.6C2.2C8.2C2.6C2.2C8.2C2.6C
2.2C8.2C2.6C2.2C8.13C6.2C$7.2C31.2C2.2C2.2C8.2C2.2C2.2C2.2C8.6C2.2C2.
2C8.2C2.2C2.2C2.2C8.5C2.6C6.3C25.2C$6.3C73.3C39.2C8.2C8.2C25.3C$6.2C
74.2C88.2C2$53.2C42.2C20.2C8.2C8.2C$52.3C41.3C20.3C5.6C4.6C2.2C$.2C
49.2C36.2C2.4C22.2C5.2C2.2C4.2C2.2C2.2C30.2C$3C87.6C24.2C55.3C$2C90.
2C84.2C2$75.2C42.2C$74.4C40.3C$74.4C40.2C2$87.2C8.2C$53.2C32.3C6.3C
25.2C$53.3C30.4C6.4C23.3C$54.2C30.2C10.2C23.2C3$15.ACB22.ACB22.ACB72.
ACB$2C176.2C$3C174.3C$.2C174.2C3$15.ACB22.ACB47.ACB22.ACB$6.2C164.2C$
6.3C162.3C$7.2C162.2C$164.B$164.C$15.ACB47.ACB47.ACB46.A$12.2C152.2C$
12.3C150.3C$13.2C150.2C!
Re: Reversible Wireless World
Some standard circuits (additional "garbage" lines are due to reversibility)
Half adder
Full adder with three half adders
Yet another full adder
Half adder
Code: Select all
# Half adder with three input examples
# First and second input line for bits
# First and second output lines for sum and carry
# Last output line for "garbage"
x = 120, y = 36, rule = WlAnt
89.2C14.2C$69.2C6.2C9.3C14.3C$68.3C6.3C8.2C16.2C$64.2C2.2C8.2C$63.3C$
63.2C42.2C$73.2C18.4C4.2C3.3C$73.2C18.4C4.2C3.2C$30.BCA27.BCA17.3C4.
2C5.2C$68.2C10.3C4.3C$67.3C3.2C13.2C$67.2C4.2C13.3C23.2C$67.3C3.2C13.
3C8.2C12.3C$68.2C17.5C.4C.3C12.2C$BCA57.BCA24.2C.2C.4C.2C$73.2C19.2C$
73.2C$63.2C46.2C$63.3C38.2C4.3C$64.2C2.2C8.2C24.2C4.2C$68.3C6.3C$69.
2C6.2C2$78.2C38.2C$78.3C36.3C$79.2C8.2C8.2C16.2C$89.3C6.3C$90.2C6.2C
6$99.2C$99.3C$100.2C!
Code: Select all
# Full adder composed from three half adders (with all input examples)
# First three input lines for bits and input carry
# First and second output lines for sum and output cary
# Last three lines for "garbage"
x = 354, y = 58, rule = WlAnt
184.2C7.4C6.4C6.4C17.2C58.2C7.4C6.4C6.4C17.2C$183.3C7.4C6.4C6.4C17.3C
56.3C7.4C6.4C6.4C17.3C$183.2C9.2C8.2C8.2C19.2C56.2C9.2C8.2C8.2C19.2C
2$263.2C14.2C$243.2C6.2C9.3C14.3C$242.3C6.3C8.2C16.2C$189.2C8.2C8.2C
8.2C17.2C2.2C8.2C45.2C8.2C8.2C8.2C$189.3C6.4C6.4C6.3C16.3C59.3C6.4C6.
4C6.3C$190.2C6.4C6.4C6.2C17.2C42.2C17.2C6.4C6.4C6.2C$213.2C14.2C16.2C
18.4C4.2C3.3C40.2C14.2C$193.2C6.2C9.3C14.3C15.2C18.4C4.2C3.2C21.2C6.
2C9.3C14.3C$BCA57.BCA57.BCA57.BCA9.3C6.3C8.2C16.2C22.3C4.2C5.2C32.3C
6.3C8.2C16.2C$188.2C2.2C8.2C38.2C10.3C4.3C34.2C2.2C8.2C$187.3C41.2C8.
3C3.2C13.2C33.3C41.2C$187.2C42.2C8.2C4.2C13.3C23.2C7.2C42.2C$197.2C
18.4C4.2C3.3C8.3C3.2C13.3C8.2C12.3C17.2C18.4C4.2C3.3C$197.2C18.4C4.2C
3.2C10.2C17.5C.4C.3C12.2C18.2C18.4C4.2C3.2C$30.BCA27.BCA87.BCA27.BCA
21.3C4.2C5.2C41.2C.2C.4C.2C40.3C4.2C5.2C$192.2C10.3C4.3C33.2C19.2C32.
2C10.3C4.3C$191.3C3.2C13.2C33.2C52.3C3.2C13.2C$191.2C4.2C13.3C22.2C
46.2C6.2C6.2C4.2C13.3C23.2C$191.3C3.2C13.3C8.2C12.3C38.2C4.3C5.3C6.3C
3.2C13.3C8.2C12.3C$192.2C17.5C.4C.3C13.2C2.2C8.2C24.2C4.2C6.2C8.2C17.
5C.4C.3C12.2C$90.BCA27.BCA27.BCA27.BCA28.2C.2C.4C.2C18.3C6.3C67.2C.2C
.4C.2C$197.2C19.2C23.2C6.2C54.2C19.2C$197.2C108.2C$187.2C46.2C15.2C
38.2C3.2C46.2C$187.3C38.2C4.3C15.3C36.3C3.3C38.2C4.3C$188.2C2.2C8.2C
24.2C4.2C17.2C8.2C8.2C16.2C5.2C2.2C8.2C24.2C4.2C$192.3C6.3C30.3C26.3C
6.3C27.3C6.3C$193.2C6.2C32.2C2.2C6.4C6.4C3.2C.4C.2C8.2C19.2C6.2C$238.
3C6.4C6.4C6.4C11.3C$202.2C34.2C8.2C8.2C8.2C13.2C27.2C38.2C$202.3C107.
3C36.3C$203.2C8.2C8.2C88.2C8.2C8.2C16.2C$213.3C6.3C98.3C6.3C$214.2C6.
2C100.2C6.2C$230.2C11.2C8.2C8.2C8.2C3.2C17.2C$230.3C9.4C6.4C6.4C6.3C
3.3C15.3C$231.2C9.4C6.4C6.4C6.2C5.2C15.2C3$223.2C$223.3C$224.2C4$273.
2C$273.3C$274.2C4$333.2C$333.3C$334.2C!
Code: Select all
# Full adder composed from "2.5" half adders (with all input examples)
# "2.5" are two half adders and half adder without carry
# First three input lines for bits and input carry
# First and second output lines for sum and output cary
# Last three lines for "garbage"
x = 326, y = 58, rule = WlAnt
184.2C7.4C6.4C6.4C17.2C$183.3C7.4C6.4C6.4C17.3C$183.2C9.2C8.2C8.2C19.
2C$294.2C6.4C6.4C7.2C$263.2C14.2C12.3C6.4C6.4C7.3C$243.2C6.2C9.3C14.
3C11.2C8.2C8.2C9.2C$242.3C6.3C8.2C16.2C$189.2C8.2C8.2C8.2C17.2C2.2C8.
2C$189.3C6.4C6.4C6.3C16.3C$190.2C6.4C6.4C6.2C17.2C42.2C15.2C8.2C8.2C$
213.2C14.2C16.2C18.4C4.2C3.3C15.3C6.4C6.3C$193.2C6.2C9.3C14.3C15.2C
18.4C4.2C3.2C17.2C6.4C6.2C$BCA57.BCA57.BCA57.BCA9.3C6.3C8.2C16.2C22.
3C4.2C5.2C32.2C14.2C$188.2C2.2C8.2C38.2C10.3C4.3C34.2C.3C14.3C$187.3C
41.2C8.3C3.2C13.2C33.3C.2C16.3C$187.2C42.2C8.2C4.2C13.3C23.2C7.2C21.
2C$197.2C18.4C4.2C3.3C8.3C3.2C13.3C8.2C12.3C29.3C$197.2C18.4C4.2C3.2C
10.2C17.5C.4C.3C12.2C30.2C$30.BCA27.BCA87.BCA27.BCA21.3C4.2C5.2C41.2C
.2C.4C.2C32.4C4.2C$192.2C10.3C4.3C33.2C19.2C36.4C4.2C$191.3C3.2C13.2C
33.2C58.2C$191.2C4.2C13.3C22.2C46.2C6.2C6.2C$191.3C3.2C13.3C8.2C12.3C
38.2C4.3C5.3C6.2C$192.2C17.5C.4C.3C13.2C2.2C8.2C24.2C4.2C6.2C8.2C$90.
BCA27.BCA27.BCA27.BCA28.2C.2C.4C.2C18.3C6.3C48.2C8.2C$197.2C19.2C23.
2C6.2C49.3C3.2C.3C$197.2C104.2C2.3C.2C$187.2C46.2C15.2C38.2C13.2C$
187.3C38.2C4.3C15.3C36.3C$188.2C2.2C8.2C24.2C4.2C17.2C8.2C8.2C16.2C
31.2C$192.3C6.3C30.3C26.3C6.3C42.2C4.3C$193.2C6.2C32.2C2.2C6.4C6.4C3.
2C.4C.2C8.2C33.2C4.2C$238.3C6.4C6.4C6.4C11.3C$202.2C34.2C8.2C8.2C8.2C
13.2C$202.3C$203.2C8.2C8.2C72.2C13.2C$213.3C6.3C72.3C11.3C$214.2C6.2C
74.2C11.2C$230.2C11.2C8.2C8.2C8.2C3.2C17.2C$230.3C9.4C6.4C6.4C6.3C3.
3C15.3C$231.2C9.4C6.4C6.4C6.2C5.2C15.2C3$223.2C$223.3C$224.2C4$273.2C
$273.3C$274.2C4$312.2C$312.3C$313.2C!
Re: Reversible Wireless World
Adders from previous post use rather specific version of AND gate.
Alternative AND may be implemented also with socalled switch gate
(see "ANT" gate scheme from link below):
http://quantumbot.wordpress.com/2013/07 ... ntologic/
Design may be still not optimal because produces more "garbage" in comparison
with previous one and each half adder uses two switch gates
Alternative half adder
Alternative 1bit full adder
Alternative AND may be implemented also with socalled switch gate
(see "ANT" gate scheme from link below):
http://quantumbot.wordpress.com/2013/07 ... ntologic/
Design may be still not optimal because produces more "garbage" in comparison
with previous one and each half adder uses two switch gates
Alternative half adder
Code: Select all
# Half adder with switch gates
# First and second input line for bits
# First and second output lines for sum and carry
x = 85, y = 31, rule = WlAnt
22.2C10.4C10.2C$21.3C10.4C10.3C10.2C16.2C$21.2C12.2C12.2C9.3C16.3C$
60.2C18.2C2$50.2C6.2C$18.4C27.3C6.3C13.2C$18.4C8.2C8.2C7.2C8.2C13.3C$
19.2C9.3C6.3C33.2C$BCA24.2C2.2C6.2C2.2C$26.3C14.3C8.2C19.2C$25.3C16.
3C5.6C2.2C8.2C3.3C$6.2C2.2C2.2C8.3C18.2C5.2C2.2C2.2C8.2C4.2C2.2C$6.6C
2.2C8.2C18.3C29.6C$8.2C34.2C32.2C$BCA28.4C4.2C$31.4C4.2C24.2C3.2C$3.
2C8.2C17.2C30.3C3.5C8.2C$3.3C6.3C11.2C36.2C5.5C6.3C$4.2C6.2C12.2C46.
2C6.2C$27.2C$27.2C8.2C$14.2C11.3C3.2C.3C$14.3C11.2C2.3C.2C$15.2C15.2C
2$49.2C$42.2C4.3C$22.2C13.2C3.2C4.2C$22.3C11.3C$23.2C11.2C!
Code: Select all
# Full adder from half adders using switch gates
# First three input lines for bits and input carry
# First and second output lines for sum and output cary
x = 380, y = 37, rule = WlAnt
186.2C7.4C6.4C6.4C6.4C6.4C6.4C6.4C7.2C18.2C10.4C10.2C34.2C6.4C6.4C7.
2C$185.3C7.4C6.4C6.4C6.4C6.4C6.4C6.4C7.3C16.3C10.4C10.3C10.2C16.2C2.
3C6.4C6.4C7.3C$185.2C9.2C8.2C8.2C8.2C8.2C8.2C8.2C9.2C16.2C12.2C12.2C
9.3C16.3C.2C8.2C8.2C9.2C$324.2C18.2C2$191.2C8.2C8.2C8.2C8.2C8.2C8.2C
8.2C51.2C6.2C$191.3C6.6C4.4C2.8C6.4C6.4C6.4C6.3C19.4C27.3C6.3C13.2C
12.2C8.2C8.2C$192.2C6.6C4.4C2.8C6.4C6.5C5.4C6.3C19.4C8.2C8.2C7.2C8.2C
13.3C11.3C6.4C6.3C$203.2C12.2C12.2C9.3C16.3C19.2C9.3C6.3C33.2C12.2C6.
4C6.2C$BCA57.BCA57.BCA57.BCA59.2C18.2C27.2C2.2C6.2C2.2C47.2C14.2C$
190.2C98.3C14.3C8.2C19.2C11.2C.3C14.3C$189.3C40.2C6.2C21.2C24.3C16.3C
5.6C2.2C8.2C3.3C9.3C.2C16.3C$189.2C9.4C27.3C6.3C13.2C5.2C5.2C2.2C2.2C
8.3C18.2C5.2C2.2C2.2C8.2C4.2C2.2C5.2C21.2C$200.4C8.2C8.2C7.2C8.2C13.
3C11.6C2.2C8.2C18.3C29.6C27.3C$201.2C9.3C6.3C33.2C13.2C34.2C32.2C29.
2C$30.BCA27.BCA87.BCA27.BCA26.2C2.2C6.2C2.2C68.4C4.2C55.4C4.2C$208.3C
14.3C8.2C19.2C36.4C4.2C24.2C3.2C24.4C4.2C$207.3C16.3C5.6C2.2C8.2C3.3C
7.2C8.2C17.2C30.3C3.5C8.2C12.2C$188.2C2.2C2.2C8.3C18.2C5.2C2.2C2.2C8.
2C4.2C2.2C3.3C6.3C11.2C36.2C5.5C6.3C6.2C$188.6C2.2C8.2C18.3C29.6C4.2C
6.2C12.2C46.2C6.3C6.2C$190.2C34.2C32.2C29.2C53.2C8.2C$90.BCA27.BCA27.
BCA27.BCA30.4C4.2C68.2C8.2C53.2C8.2C$213.4C4.2C24.2C3.2C24.2C11.3C3.
2C.3C53.3C3.2C.3C$185.2C8.2C17.2C30.3C3.5C8.2C11.3C11.2C2.3C.2C55.2C
2.3C.2C$185.3C6.3C11.2C36.2C5.5C6.3C12.2C15.2C48.2C13.2C$186.2C6.2C
12.2C46.2C6.2C79.3C$209.2C102.2C30.2C31.2C$209.2C8.2C85.2C4.3C56.2C4.
3C$196.2C11.3C3.2C.3C65.2C13.2C3.2C4.2C57.2C4.2C$196.3C11.2C2.3C.2C
60.2C4.6C6.5C4.2C6.4C6.2C8.2C6.2C$197.2C15.2C63.3C5.5C6.4C4.3C6.4C6.
3C6.3C6.3C$279.2C8.2C8.2C5.2C8.2C8.2C6.2C8.2C$231.2C118.2C13.2C$224.
2C4.3C118.3C11.3C$204.2C13.2C3.2C4.2C41.2C9.2C8.2C15.2C8.2C16.2C10.3C
11.2C$204.3C11.3C52.3C7.4C6.4C13.4C6.4C14.4C8.3C$205.2C11.2C54.2C7.4C
6.4C13.4C6.4C14.4C8.2C!
Re: Reversible Wireless World
There is some question relating terminology. The fourstate secondorder CA above may be derived from
irreversible twostates CA using rather simple construction. But I am not about the construction because
the question relevant with any twostates CA: Is there some special term for (twostate) CA with transition
rule defined only by three values: state of cell, sum of states of four side cells and sum of states of four
corner cells? Does some short notation exist (like B.../S... for lifelike CA)?
irreversible twostates CA using rather simple construction. But I am not about the construction because
the question relevant with any twostates CA: Is there some special term for (twostate) CA with transition
rule defined only by three values: state of cell, sum of states of four side cells and sum of states of four
corner cells? Does some short notation exist (like B.../S... for lifelike CA)?
Re: Reversible Wireless World
Alexander,alexv wrote:Is there some special term for (twostate) CA with transition
rule defined only by three values: state of cell, sum of states of four side cells and sum of states of four
corner cells?
George Maydwell, who is an inactive member of this forum, uses these ideas in his CA software here:
http://www.collidoscope.com/ca/welcome.html
There is a rule family implementation called "George Maydwell" in Square Cell here:
http://bprentice.webenet.net/Java%20Squ ... 20Cell.zip
You can learn about it by reading files GeorgeMaydwellRule.java, GeorgeMaydwellDialog.java and
GeorgeMaydwellOptionsDialog.java.
You can also view a demonstration here:
http://bprentice.webenet.net/Square%20C ... pplet.html
Adjust the window and cell sizes, click the New World button and select the George Maydwell rule, then set the world to random states and run the simulation.
Square Cell is designed to be expanded by adding new rule families. To add such a new rule family requires the coding of an extension to the rule class and of classes to display and obtain rule parameters and options. Would it be possible for you to add a reversible rule family?
Brian
Re: Reversible Wireless World
Thank you, Brian.
should be (I did not tested , but hope it's correct  UPDATED, no getCount necessary):
The nonzero items for rule tables are
WlAnt:
WlAnt2
WlAnt3
Alex
Yes, all rules above, except WlAnt4, can be written in such a way. The step functionWould it be possible for you to add a reversible rule family?
should be (I did not tested , but hope it's correct  UPDATED, no getCount necessary):
Code: Select all
public int step(int r, int c)
{
int adjacentCount =
(squareCell.getNeighbor(r  1, c ) % 2) +
(squareCell.getNeighbor(r + 1, c ) % 2) +
(squareCell.getNeighbor(r , c  1) % 2) +
(squareCell.getNeighbor(r , c + 1) % 2);
int diagonalCount =
(squareCell.getNeighbor(r  1, c  1) % 2) +
(squareCell.getNeighbor(r  1, c + 1) % 2) +
(squareCell.getNeighbor(r + 1, c + 1) % 2) +
(squareCell.getNeighbor(r + 1, c  1) % 2);
int cell = squareCell.getNeighbor(r, c);
int cond = ruleTable[cell % 2][adjacentCount][diagonalCount];
if (cond == 1)
{
if (cell == 0)
return 1;
else if (cell == 1)
return 3;
else if (cell == 3)
return 2;
else if (cell == 2)
return 0;
}
else
{
if (cell == 1)
return 2;
else if (cell == 2)
return 1;
}
}
WlAnt:
Code: Select all
0 1 0
0 2 0
1 1 0
1 2 0
WlAnt2
Code: Select all
0 1 0
0 2 0
0 3 0
0 4 0
1 1 0
1 2 0
1 3 0
1 4 0
WlAnt3
Code: Select all
0 1 0
0 2 0
0 3 0
1 1 0
1 2 0
1 3 0
Re: Reversible Wireless World
Alexander,
Thank you for your quick response.
Look at the method setNewRule() in GeorgeMaydwellRule.java. This is the code that is executed when the N key is depressed. It generates a new member of the GeorgeMaydwell rule family using simplistic random techniques.
For interesting rules that are not members of a family, I usually make a new instance of Base Square Cell. Your 4 and 7 state rules included in
http://bprentice.webenet.net/Java%20Squ ... 0World.zip
are examples.
Brian
Thank you for your quick response.
Unless I am misunderstanding your code, this is not what I was hoping for. By family of rules I mean rules that share a common parameter structure and where all possible parameter values generate a rule which is a member of the family.alexv wrote:Yes, all rules above, except WlAnt4, can be written in such a way.
Look at the method setNewRule() in GeorgeMaydwellRule.java. This is the code that is executed when the N key is depressed. It generates a new member of the GeorgeMaydwell rule family using simplistic random techniques.
For interesting rules that are not members of a family, I usually make a new instance of Base Square Cell. Your 4 and 7 state rules included in
http://bprentice.webenet.net/Java%20Squ ... 0World.zip
are examples.
Brian
Last edited by bprentice on March 1st, 2014, 8:01 am, edited 1 time in total.
Re: Reversible Wireless World
Brian
It is code for whole rule family described by ruleTable with 2 x 4 x 4 ( UPDATE: 2 x 5 x 5) items.
Three WlAnt rules between four
may be described by such a way and so may be considered as members of the family. WlAnt4 may be
included by slight modification of step function and 2 x 5 x 4 ( UPDATE: 2 x 6 x 5) ruleTable.
But I found WlAnt4 useful only on Penrose tilings and so for simplicity let's return to initial version.
My earlier tries with random generating some time ago produced almost no interesting results and
so I think that it is only reasonable to use dialogs with editing the rule table with possibility to
save and load it to file. Sorry I do not have experience with Swing and using Java only in about %0.1
of my software effort.
The interesting tables except three mentioned above are AntiAnts compliments,
http://ayvlasov.wordpress.com/2014/02/05/antiants/
e.g. AntiAnt2 ( white color for empty cells and blue for state=3)
The tables Ants and AntiAnts may be joined together
http://ayvlasov.wordpress.com/2014/02/1 ... antiants/
Alex
It is code for whole rule family described by ruleTable with 2 x 4 x 4 ( UPDATE: 2 x 5 x 5) items.
Three WlAnt rules between four
may be described by such a way and so may be considered as members of the family. WlAnt4 may be
included by slight modification of step function and 2 x 5 x 4 ( UPDATE: 2 x 6 x 5) ruleTable.
Code: Select all
public int step(int row, int column)
{
int N = squareCell.getNeighbor(row  1, column ) % 2;
int NE = squareCell.getNeighbor(row  1, column + 1) % 2;
int E = squareCell.getNeighbor(row , column + 1) % 2;
int SE = squareCell.getNeighbor(row + 1, column + 1) % 2;
int S = squareCell.getNeighbor(row + 1, column ) % 2;
int SW = squareCell.getNeighbor(row + 1, column  1) % 2;
int W = squareCell.getNeighbor(row , column  1) % 2;
int NW = squareCell.getNeighbor(row  1, column  1) % 2;
int adjacentCount = N + E + S + W;
if ((adjacentCount == 2) && ( N == S))
adjacentCount = 5;
int diagonalCount = NE + NW + SE + SW;
int cell = squareCell.getNeighbor(row, column);
int cond = ruleTable[cell % 2][adjacentCount][diagonalCount];
if (cond == 1)
{
if (cell == 0)
return 1;
else if (cell == 1)
return 3;
else if (cell == 3)
return 2;
else if (cell == 2)
return 0;
}
else
{
if (cell == 1)
return 2;
else if (cell == 2)
return 1;
}
}
My earlier tries with random generating some time ago produced almost no interesting results and
so I think that it is only reasonable to use dialogs with editing the rule table with possibility to
save and load it to file. Sorry I do not have experience with Swing and using Java only in about %0.1
of my software effort.
The interesting tables except three mentioned above are AntiAnts compliments,
http://ayvlasov.wordpress.com/2014/02/05/antiants/
e.g. AntiAnt2 ( white color for empty cells and blue for state=3)
Code: Select all
0 0 4
0 1 4
0 2 4
0 3 4
1 0 4
1 1 4
1 2 4
1 3 4
http://ayvlasov.wordpress.com/2014/02/1 ... antiants/
Code: Select all
0 1 0
0 2 0
0 3 0
0 4 0
0 0 4
0 1 4
0 2 4
0 3 4
1 1 0
1 2 0
1 3 0
1 4 0
1 0 4
1 1 4
1 2 4
1 3 4
Alex
Last edited by alexv on February 22nd, 2014, 5:55 pm, edited 1 time in total.
Re: Reversible Wireless World
Alexander,
I'm even more confused with the following two rule tables:
alexv wrote:The nonzero items for rule tables are
WlAnt:WlAnt2Code: Select all
0 1 0 0 2 0 1 1 0 1 2 0
WlAnt3Code: Select all
0 1 0 0 2 0 0 3 0 0 4 0 1 1 0 1 2 0 1 3 0 1 4 0
Code: Select all
0 1 0 0 2 0 0 3 0 1 1 0 1 2 0 1 3 0
I apologize for being slow, but I can't relate these two quotes. What are the complete rule tables and what is the range of values that they can contain?alexv wrote: It is code for whole rule family described by ruleTable with 2 x 4 x 4 items.
I'm even more confused with the following two rule tables:
Brianalexv wrote:Code: Select all
0 0 4 0 1 4 0 2 4 0 3 4 1 0 4 1 1 4 1 2 4 1 3 4
Code: Select all
0 1 0 0 2 0 0 3 0 0 4 0 0 0 4 0 1 4 0 2 4 0 3 4 1 1 0 1 2 0 1 3 0 1 4 0 1 0 4 1 1 4 1 2 4 1 3 4
Re: Reversible Wireless World
Sorry if it was not clear. In the example with construction of fourstate reversible CA fromWhat are the complete rule tables and what is the range of values that they can contain?
twostate CA the rule table contains only 0 and 1. Line a b c in the list means that ruleTable[a,b,c] is unit.
All items not written in the list are zero. For all lists in examples rule table has dimensions 2x4x4 (UPD 2x5x5).
Alexander
PS. The format was developed 10 years ago, so please do not ask about reasons
Last edited by alexv on February 22nd, 2014, 5:56 pm, edited 1 time in total.