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 ...