# A replicating photo of Ed Fredkin - run until 49 generations.
#
# In 1970, Terry Winograd generalized Fredkin's parity rule (B1357/S1357)
# (also known as Replicator) to an N-state version, with the parity rule
# replaced by modulo-N. He proved that if N is prime then the resulting
# CA will have the replicating properties of the parity rule (for which
# N=2).
#
# As with the parity rule, the effect works with many different
# neighborhoods, such as Moore, von Neumann, hexagonal, even in 3D. Here 
# we're using the von Neumann neighborhood so there are four copies made. 
# The script FredkinModN-gen.py in Scripts/Python enables you to explore
# the rules for different N and different neighborhoods.
#
# In this demo we've used N=7 and imported a 6-color photo of Ed
# Fredkin to use as an example pattern. At 49 generations four copies are
# visible, as at higher powers of 7: 343, 2401, etc.
#
# At some intermediate generations (e.g. 196) multiple copies are seen
# with color-inversions and other effects.
#
# Winograd, T. (1970) A simple algorithm for self-replication
# A. I. Memo 197, Project MAC. MIT. http://hdl.handle.net/1721.1/5843
#
# Contact: tim.hutton@gmail.com
x = 49, y = 49, rule = Ed-rep
ABA2B2ADE17F4E11D4B4A$2A2B2AB23FE10D2B3AB2A$4B2AD24F3E7DB4AB2A$3B3AE
24F3E7DB7A$3B2AB25F7E3DCB6A$3B2AC3FE17F6E2D2BC3DCB4ABA$3B2AC3FE19F4D
5B2DED2B3A2B$2B3AD12FE9FD3B4A3BD2EDB4AB$2B2ABE2F3E7FE5F3EDBA2BA4B3CDE
D3B2AB$BC2ABD3FE7F2E5F3DB2D2BC5D2C2DC3B3A$2BA2BD10FE2D3F2E6DC10D3C3B
2A$2BA2BC7F6DEF3E5DC3D2E7DBCD3BA$2BA2BC3F2DC3BC3DEFE5DC3DE2FE4D2EDBCD
2CBA$BCA3BEFDB3AB3D5E3D3BC3DB7AB2DCD2C2B$BCA3BDFD2B2C7D4ED4BDB6A4BC5D
CB$BCB2ABCF3D2E7DE3FD5B3AB2C11D2B$B2C3ABF8E5D3FE4B2DCDEFE6DE4D2B$ABCB
3A2FDF2E3FE2D2B3FD3BD2E3D2E2DB2D3E2DEDB$A3B3AEF3E2FDBA3B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