Reversible Wireless World

For discussion of other cellular automata.
User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » February 25th, 2014, 4:05 pm

Let's return to our ants.

Ant's supercollider experiment (WlAnt-T.rle)

Code: Select all

# Supercollision with three beams
x = 41, y = 24, rule = WlAnt
.6C27.6C$.6C27.6C$2C37.2C$2C.C.C.C25.C.C.C.2C$2C37.2C$.6C27.6C$.6C27.
6C10$20.C$17.2C3.2C$17.2C.C.2C$17.2C3.2C$17.2C.C.2C$17.2C3.2C$17.7C$
19.3C!

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » February 26th, 2014, 11:08 am

Alexander,

The archive "Wireless Ant World.zip" has been updated here:

http://bprentice.webenet.net/Java%20Squ ... 0World.zip

Reversible Square Cell now has your new version of the step method and the pattern collection has been expanded.

When a pattern has been loaded from a file in a directory, the other pattern files in that directory may be loaded with the page down and page up keys. Page down rotates through the files in a forward direction while page up rotates through them in a backward direction. The home key reloads the current pattern.

The rule table has three formats, the two that confused me yesterday and a third used in each pattern file. Look at the two lines starting with #RT.

Rule 001 and Rule 005 contain the most patterns. They are both rich in guns and oscillators but I have not yet found a method to turn or kill a stream of ships. Perhaps you can.

Oscillator O009.sqc in Rule 005 is delightful.

Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » February 26th, 2014, 12:48 pm

I myself also found "traveling blocks" similar your Rule 005 even earlier than "Ants". The problem
was 90 degree rotation of motion without generation of new blocks.
Anyway, I have generated tree for Rule 005, using a list
0 1 1
0 2 2
1 2 2
hope it's correct :

Code: Select all

num_states=4
num_neighbors=8
num_nodes=32
1 0 2 1 3
1 1 2 0 3
1 1 3 0 2
2 0 0 0 0
2 0 1 0 1
2 1 0 1 0
2 0 2 0 2
2 2 0 2 0
3 3 3 3 3
3 4 5 4 5
3 5 3 5 3
3 3 6 3 6
3 6 7 6 7
3 7 3 7 3
4 8 8 8 8
4 9 10 9 10
4 10 8 10 8
4 11 12 11 12
4 12 13 12 13
5 14 14 14 14
5 15 16 15 16
5 17 18 17 18
6 19 20 19 20
6 20 21 20 21
6 21 19 21 19
6 19 19 19 19
7 22 23 22 23
7 23 24 23 24
7 24 25 24 25
8 26 27 26 27
8 27 28 27 28
9 29 30 29 30
PS. There is a rule based on even simpler list
0 1 1
1 0 1

It may rotate blocks on 90 degrees, but generating of "worms" that may look nice, but
not for modeling of circuits an all that stuff.

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » February 27th, 2014, 1:19 am

Brian,
Did you find some gliders with diagonal motion?
I don't have such experience with this rule family.
Alexander

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » February 27th, 2014, 4:31 am

Alexander,
alexv wrote:Did you find some gliders with diagonal motion?
I have not yet found any diagonal ships using Reversible Square Cell.
alexv wrote:I don't have such experience with this rule family.
Really, you invented the rule family and wrote the step method.

My primary interest is Knight Ships. See this thread:

viewtopic.php?f=11&t=1003

I would like to find some of them.

Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » February 27th, 2014, 6:01 am

Brian,

I simply mean that during 10+ years of use I have not met such examples (if I did not forget something), but
I needed particular behavior and after finding of "ants" that was convenient for particular purposes, I did not
perform much search on other rules and even deleted block with generation of small random pattern and
analysis of them from new version of software. Maybe I was wrong.

Alexander

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » February 27th, 2014, 1:50 pm

Yet another type of oscillator:

Code: Select all

# Nontrivial orthogonal reflections, period = 488
x = 35, y = 30, rule = WlAnt
11.3C2.3C2.3C2.3C$9.22C$9.2C3.2C3.2C3.2C3.2C7$6.2C24.2C$6.2C24.2C$5.
2C26.2C$5.2C26.2C$5.2C26.2C$.2C3.2C24.2C$.2C3.2C24.2C$2C31.2C$2C31.2C
$2C31.2C$.2C29.2C$.2C29.2C6$7.C$4.2C3.2C3.2C3.2C3.2C3.2C$4.27C$6.3C2.
3C2.3C2.3C2.3C!

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » February 28th, 2014, 2:53 pm

Relating complaint about lack of "emergent systems" for WlAnt CA - nontrivial "Big Bang" from collision of two ants

Code: Select all

x = 14, y = 18, rule = WlAnt-4
11.ACB15$A$C$B!
In fact, for WlAnt-4 rule even evolution of single red (or blue) cell produces unexpected patterns

Alexander

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 2nd, 2014, 7:25 am

bprentice wrote: ...
Could you please post a Golly rule table of the new rule and the program that you use to generate it.

Brian
The Delphi Win32 program now should be here ( :| sorry, they want free registration for download)
http://cc.embarcadero.com/Item/29779

Save list file on disk with tb3 extension ( :!: do not use empty lines at end of file), run the program CART,
Map->Open-> open the file
Map->Export->Trees -> choose "Golly rule trees", enter the name with tree extension, press Yes on all questions

Alexander

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » March 3rd, 2014, 7:09 am

Alexander,

I have Windows 7 installed on my IMac. I installed CART and tested it with both Rule 003 and Rule 005 and everything worked as expected. Thank you.

I also have Delphi 7.2 and Delphi XE2.16 installed. Can I compile CART with either of those?

Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 3rd, 2014, 7:23 am

bprentice wrote:I also have Delphi 7.2 and Delphi XE2.16 installed. Can I compile CART with either of those?
It was tested with Delphi Win32 6,7,2005,2006 (old reduced .net versions worked with Delphi 8 and Delphi 2006),
but because free Delphi versions are not supported more all current development mainly focused on Lazarus.
After couple of changes due to problems with clipping and scrolling, it is working well with Lazarus and was
tested on Windows 32bit and 64 bit and on Linux-es 32 and 64 bit.

Alexander

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 3rd, 2014, 9:20 am

bprentice wrote:...
I have Windows 7 installed on my IMac. I installed CART and tested it with both Rule 003 and Rule 005 and everything worked as expected.
BTW Rule with 7 states and 12 neighbors for diagonal motion discussed here
viewtopic.php?f=11&t=1293#p10702
is implemented with CART tree file WAW7S.MPT

Code: Select all

MAP CAT3
8 ;NCELL
255 ;MASK
3
13
1 0
0 1
-1 0
0 -1
1 -1
1 1
-1 1
-1 -1
2 0
0 2
-2 0
0 -2
0 0
1 43
 1 0 0 0
 1 2 1 2
 1 1 1 2
 2 0 0 0
 2 1 1 0
 2 2 2 2
 3 3 3 3
 3 4 4 3
 3 5 5 5
 4 6 6 6
 4 7 7 6
 4 8 8 8
 5 9 9 9
 5 10 10 9
 5 11 11 11
 6 12 12 13
 6 13 13 13
 6 13 13 12
 6 12 12 12
 6 14 12 14
 6 14 13 14
 7 15 15 16
 7 16 16 17
 7 17 17 18
 7 19 15 20
 7 20 16 20
 7 20 17 19
 8 21 21 22
 8 22 22 23
 8 24 21 25
 8 25 22 26
 9 27 27 28
 9 29 27 30
 10 31 32 31
 10 32 32 32
 10 32 31 32
 10 31 31 31
 11 33 34 33
 11 34 35 34
 11 35 36 35
 12 37 38 37
 12 38 39 38
 13 40 41 40
4 ;Fxy
 3 2 2
7 ;Nsr
 0 3 6 1 4 5 2
3 3
3
 0 1 2
 1 0 2
 2 1 0
3
 0 1
 1 0
 0 1
3
 0 1
 0 1
 1 0
7
0 1 4 2 3 6 5
Where last line is simply transposition of states in comparison with standard numeration used in the paper
http://arxiv.org/abs/1311.4297
without that it would be WAW7.MPT

Code: Select all

MAP CAT2
8 ;NCELL
255 ;MASK
3
13
1 0
0 1
-1 0
0 -1
1 -1
1 1
-1 1
-1 -1
2 0
0 2
-2 0
0 -2
0 0
1 43
 1 0 0 0
 1 2 1 2
 1 1 1 2
 2 0 0 0
 2 1 1 0
 2 2 2 2
 3 3 3 3
 3 4 4 3
 3 5 5 5
 4 6 6 6
 4 7 7 6
 4 8 8 8
 5 9 9 9
 5 10 10 9
 5 11 11 11
 6 12 12 13
 6 13 13 13
 6 13 13 12
 6 12 12 12
 6 14 12 14
 6 14 13 14
 7 15 15 16
 7 16 16 17
 7 17 17 18
 7 19 15 20
 7 20 16 20
 7 20 17 19
 8 21 21 22
 8 22 22 23
 8 24 21 25
 8 25 22 26
 9 27 27 28
 9 29 27 30
 10 31 32 31
 10 32 32 32
 10 32 31 32
 10 31 31 31
 11 33 34 33
 11 34 35 34
 11 35 36 35
 12 37 38 37
 12 38 39 38
 13 40 41 40
4 ;Fxy
 3 2 2
7 ;Nsr
 0 3 6 1 4 5 2
3 3
3
 0 1 2
 1 0 2
 2 1 0
3
 0 1
 1 0
 0 1
3
 0 1
 0 1
 1 0
generated from the pascal code WAW7.dpr

Code: Select all

library WAW7;

{ Wireless Ant World with 7 states}
{ cf ExtAnts3z7}


uses
  {SysUtils, Classes,} CARules2Int;

{$R *.res}
{$E cll}

const
 neibs : array[0..12,0..1] of integer =
  ((1,0),(0,1),(-1,0),(0,-1),
  (1,-1),(1,1),(-1,1),(-1,-1),
  (2,0),(0,2),(-2,0),(0,-2),
  (0,0));


function LibVerCAR(var ANs : Integer;
 var fxu :  Tfxupd) : Integer; stdcall;
begin
  ANs := 3;
  fxu := f_spec_rev;
  LibVerCAR := 1
end;

procedure InitCAR(var ANs,ANx,ANsr : Integer); stdcall;
begin
  ANs := 3;
  ANx := 13;
  ANsr := 7;
end;

procedure SetNeib(N : integer; var DX,DY : Integer); stdcall;
begin
  DX := neibs[N,0];
  DY := neibs[N,1];
end;

function GetNs2(C1 : NCell) : Integer; stdcall;
begin
  if C1=0 then
    GetNs2 := 3
  else
    GetNs2 := 2;
end;

procedure CalcCells(var NewCell : XCell; var Cells : TLocCells); stdcall;
var
  i,c,d,dc,dd,cond: Integer;
begin
  cond := 0;
  c := 0; d := 0; dc := 0; dd := 0;
  for i := 0 to 3 do
  begin
   if Cells[i] = 1 then inc(c);
   case Cells[i+4] of
    1 : inc(d);
    2 : inc(dc);
   end;
   if Cells[i+8] = 2 then inc(dd);
  end;
  if (dd = 0) and ((dc = 1) or (dc=2)) then cond := 2;
  if (d = 0) and ((c = 1) or (c = 2)) then cond := 1;

  if cond > 0 then
   if Cells[12] = 0 then NewCell := cond
   else NewCell := Cells[12]
  else
    NewCell := 0;
end;


procedure UpdCell(var C1,C2 : NCell; back : Boolean); stdcall;
var
 k : integer;
const
 {swap of reduced index}
  NewVals : array[0..6,0..1] of integer =
  ((0,0),(0,1),(0,2),
   (1,0),(1,1),(2,1),
   (2,0));

begin
 k := C1+3*C2;
 C1 := NewVals[k,0];
 C2 := NewVals[k,1];
end;


procedure ApplXC(var C2 : NCell; C1 : NCell;
                         XC : XCell; back : Boolean); stdcall;
begin
 if (XC<>0) then
  if C1 = 0 then
   C2 := (XC + 3 - C2) mod 3
  else
   if (XC = C1) then C2 := 1 - C2
end;

exports LibVerCAR, InitCAR, SetNeib, GetNs2, CalcCells, UpdCell, ApplXC;
begin
end.
Alexander

PS. Sorry for that stuff, I myself would like if Golly could work with "num_neighbors=12", but ...

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » March 4th, 2014, 9:42 am

Alexander,

It seems that Reverse Square Cell can be generalized further. Consider this simple modification to the step method:

Code: Select all

  public int step(int r, int c)
  {
    int set1Count =
      (squareCell.getNeighbor(r - 2, c - 1) % 2) +
      (squareCell.getNeighbor(r - 2, c + 1) % 2) +
      (squareCell.getNeighbor(r + 2, c - 1) % 2) +
      (squareCell.getNeighbor(r + 2, c + 1) % 2);
    int set2Count =
      (squareCell.getNeighbor(r - 1, c - 2) % 2) +
      (squareCell.getNeighbor(r + 1, c - 2) % 2) +
      (squareCell.getNeighbor(r - 1, c + 2) % 2) +
      (squareCell.getNeighbor(r + 1, c + 2) % 2);
    int cell = squareCell.getNeighbor(r, c);
    int cond = ruleTable[cell % 2][set1Count][set2Count];
    int newcell = (cond ^ (cell >> 1)) | ((cell & 1) << 1);
    return newcell;
  }
Here is a nice oscillator:

Code: Select all

#Rule = Alexander Vlasov Rule
#RT 0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
#RT 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0
#Rows = 14
#Columns = 39
#L C37.C$C37.C$C37.C$C37.C$C37.C$C13.B.B21.C$C15.A.A19.C$C14.A.A20.C$C
#L 14.B.B20.C$C37.C$C37.C$C37.C$C37.C$C37.C
Using this rule table:

0 1 1
0 2 2
1 2 2

Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 4th, 2014, 10:10 am

Brian,

How you distinguish two different rule with the same table?
It's yet another reason, why I am using dll in my program. After that it is possible to export
rule in some extended tree format (such as MPT) storing neighboring scheme ...

Alexander

PS: May be interesting. Just recently I met notion about reversible Q2R rule, and was inspired on analogue
rule for second order automata. It has von Neumann neighborhood and simple description:
-------------------------------------------------------------------
Rule Q2R2vN:

Four states: 0,1,2,3

A cell with state 0 or 2 is called "even" and a cell with state 1 or 3 is called "odd"

A step again is divided into two stages:

First stage:
Mark all cells with two odd cells in von Neumann neighborhood (up, down, left, right)

Second stage:
For unmarked: exchange states 1 <-> 2.
For marked cells: change states in accordance with the scheme 0 -> 1 -> 3 -> 2 -> 0.
--------------------------------------------------------------------------
Rule tree in new Golly format :shock:
Q2R2vN.rule

Code: Select all

@RULE Q2R2vN

@TREE

num_states=4
num_neighbors=4
num_nodes=11
1 0 2 1 3
1 1 3 0 2
2 0 0 0 0
2 0 1 0 1
2 1 0 1 0
3 2 3 2 3
3 3 4 3 4
3 4 2 4 2
4 5 6 5 6
4 6 7 6 7
5 8 9 8 9
Couple of patterns

Symmetric box Q2R2-box.rle

Code: Select all

x = 60, y = 60, rule = Q2R2vN
60C$60C$60C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$
3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.
3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C
54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C
$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C
54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C
$3C54.3C$3C54.3C$3C54.3C$3C54.3C$60C$60C$60C!
The same box with a "noise" Q2R2-box-def.rle

Code: Select all

x = 60, y = 60, rule = Q2R2vN
60C$60C$60C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$
3C54.3C$3C54.3C$3C52.CB3C$3C7.2C2A42.B3C$3C7.A2CB43.3C$3C8.3B43.3C$3C
7.C.2C43.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$
3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.
3C$3C30.A3B20.3C$3C30.2C.C20.3C$3C31.BCB20.3C$3C31.A.C20.3C$3C54.3C$
3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.3C$3C54.
3C$3C50.B.5C$3C50.CBCB3C$3C50.B.5C$3C50.CA5C$3C54.3C$3C54.3C$3C54.3C$
3C54.3C$3C54.3C$3C54.3C$60C$60C$60C!

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » March 4th, 2014, 10:24 am

Alexander,
alexv wrote:How you distinguish two different rule with the same table?
I haven't rewritten the program yet. If I do, the pattern files will include the neighborhood used. Much the same as the rule families in Square Cell.

Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 4th, 2014, 10:36 am

bprentice wrote: I haven't rewritten the program yet.
BTW, Q2R2vN may be implemented by your initial program using list

Code: Select all

0 2 0
0 2 1
0 2 2
0 2 3
0 2 4
1 2 0
1 2 1
1 2 2
1 2 3
1 2 4
Alexander

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » March 4th, 2014, 6:02 pm

Alexander,

The archive "Wireless Ant World.zip" has been updated here:

http://bprentice.webenet.net/Java%20Squ ... 0World.zip

A new version of Reversible Square Cell is in directory "Reversible Square Cell 2". This version allows rules to be specified by both a Rule Table and a Neighbor Selector. Open the Rule Parameter Dialog to see how. Use the Neighbor Selector to specify two groups of four neighbors. The first group should be set to 1 and the second group should be set to 2.

The program follows Square Cell's custom of including the rule specification in each pattern file. A small collection of nine patterns is included. Each of these patterns uses a different rule. After loading one of them step through the remainder using the "Page UP" or "Page Down" keys. It is instructive to view a pattern file.

To generate a new random rule, first specify the two neighbor groups and then repeatedly hit the N key until an interesting rule is found.

Brian
Last edited by bprentice on March 4th, 2014, 6:53 pm, edited 1 time in total.

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » March 4th, 2014, 6:42 pm

Alexander,
bprentice wrote:My primary interest is Knight Ships. See this thread:

viewtopic.php?f=11&t=1003

I would like to find some of them.
Here is the first one:

Code: Select all

#Rule = Alexander Vlasov Rule
#NS 2,0,0,1,2
#NS 1,0,0,0,0
#NS 0,0,0,0,0
#NS 0,0,0,0,1
#NS 2,1,0,0,2
#RT 0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,1
#RT 0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0
#Rows = 5
#Columns = 3
#L B$B.A$B.A$B.A$2.A
Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 5th, 2014, 1:10 am

Brian,
Could you comment using of #NS?
PS. Thank you for your efforts. What is your estimation: In principle, if your program could be ported to Android?
Golly may not work on 2.6 version :(
Last edited by alexv on March 5th, 2014, 2:45 pm, edited 1 time in total.

EricG
Posts: 199
Joined: August 19th, 2011, 5:41 pm
Location: Chicago-area, USA

Re: Reversible Wireless World

Post by EricG » March 5th, 2014, 1:32 am

I just wanted to post some feedback: this has been a terrific thread!

Alex, when you feel ready, it would be great to see Slow Ants (SlAnt).

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 5th, 2014, 1:57 am

EricG wrote: Alex, when you feel ready, it would be great to see Slow Ants (SlAnt).


Thank you! I will try to send them ASAP - I may not do that from smartphone right now :D

bprentice
Posts: 682
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: Reversible Wireless World

Post by bprentice » March 5th, 2014, 3:24 am

Alexander,

The five lines starting with #NS together with the two lines starting with #RT in each pattern file completely specify a particular member of the rule family. The five #NS lines are simply the contents of the five rows of the Neighbor Selector and the two #RT lines are the contents of the two pages of the Rule Table.

To specify a new rule, open the Rule Parameters Dialog and change both the Neighbor Selector and the Rule table. Clicking on positions in the Neighbor Selector rotate through the values 0, 1 and 2. Four positions should be set to 1 and four positions should be set to 2 all the other positions should be set to 0. The Rule table has three supporting buttons. The small button labeled with 0 or 1 changes the Rule Table page. The other two buttons have labels which describe what they do. To change an entry in the Rule Table, simply click on it. To change the color, click with the Shift key depressed.

Load pattern G001.sqc and open the Rule Parameters Dialog to see the familiar WlAnt rule.

I have not written any programs for Android so I cannot help with that matter.

Eric,

It is good to see you contributing again. Remember that we still have some dangling threads.

Brian

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 5th, 2014, 3:40 am

Eric,

Archive with “Slow Ants World” CA is in attachment SlAntWorld.zip. The CA has six states
and “slow ants” are moving with ½ speed. Unlike WlAnt the SlAnt does not produce
“rhombic radiowaves”, yet logical gates also quite often are stop working due to noise
after wrong collision of signals (ants). Instead of waves SlAnt may produce oscillating
cells or small patterns and it may be used for construction of some stable (yet, blinking)
patterns from combination of signals (ants).

Numeration of states in SlAnt provides possibility to use WlAnt patterns directly,
e.g. Fredkin gate and last version of Toffoli gate discussed below are working properly,
but with speed reduced in twice. Patterns with “inelastic” collisions sometimes must be
changed to correct delays and work properly, but example of half adder with “active AND”
discussed earlier illustrates some new problem, because introduces delay ½ with
respect to used “twice decelerated clock”.

Archive contains both tree and tables representation, some patterns and python
script for reversion (it's a map 0 1 2 3 4 5 → 0 5 4 3 2 1).
It may be useful to compare tables for SlAnt-2 and WlAnt-2 as an illustration of formal definition:
–---------------------------------------------------------------------------------
Rule SlAnt:

There are six states: 0,1,2,3,4,5.

A cell with state 0 or 2 is called "regular"
and a cell with state 1 or 3 is called "peculiar"
(cell with state 4 or 5 may be considered as an "intermediate")

A step may be divided into two stages:

First stage:
Mark all cells satisfying two conditions:
(1) total number of peculiar cells in four closest positions (up, down, left, right) is one or two,
(2) cells in four diagonal positions are regular.

Second stage:
For unmarked: to exchange states 1<->5 and 2<->4.
For marked cells: to make permutation of states 0->4->1->3->5->2->0.
–-----------------------------------------------------

Alexander
Attachments
SlAntWorld.zip
Slow Ant World CA
(6.23 KiB) Downloaded 199 times
Last edited by alexv on March 5th, 2014, 5:13 am, edited 1 time in total.

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 5th, 2014, 4:12 am

Brian,

Thank you for explanation, I've seen new version, yet not quite realized the neighboring idea.

My own experience with Android's Java is rather rudimentary and was related
with necessity to write small program as only way to save SMS on memory card.
IMHO, most obvious problems are change of interface and absence of OpenFile dialog...

Alexander

User avatar
alexv
Posts: 136
Joined: February 3rd, 2014, 11:14 am

Re: Reversible Wireless World

Post by alexv » March 5th, 2014, 5:06 am

Let me complete digression into "physical" Q2R2vN rule
viewtopic.php?f=11&t=1293&p=11113#p11095
The analogy with rule Q2R would not be quite justified without "energy conservation",
and Q2V2vN, indeed, has conserved quantity similar with Q2R2. Below is script energy-Q2R2.py

Code: Select all

# Calculates energy for Q2R2 rule

from glife import rect
from time import time
import golly as g

r = rect( g.getselrect() )
if r.empty: 
  r = rect( g.getrect() )
  if r.empty: g.exit("No selection and the pattern is empty.")


oldsecs = time()
maxstate = g.numstates() - 1
En1 = 0
En2 = 0
sn1 = [-1, 1, -1, 1]
sn2 = [-1,-1, 1, 1] 

for row in xrange(r.top, r.top + r.height + 1):
       for col in xrange(r.left, r.left + r.width + 1):
         cell = g.getcell(col, row)
         neib = g.getcell(col-1, row)
         En1 = En1 + 1 - sn1[cell]*sn2[neib]
         En2 = En2 + 1 - sn2[cell]*sn1[neib]
         neib = g.getcell(col, row-1)
         En1 = En1 + 1 - sn1[cell]*sn2[neib]
         En2 = En2 + 1 - sn2[cell]*sn1[neib]
                
g.show("Energies: " + str(En1/2) + "+" + str(En2/2) + "=" + str((En1+En2)/2))
It shows energy either for selected area or for full pattern (if selection is empty).

Alexander

Post Reply