# AI: Conway Creatures!

Recently I’ve been reading up on Cellular Evolutionary Algorithms and on the use of Genetic Algorithms (GAs) to evolve Cellular Automata (CA). I want to try out all sorts of different things so I will be doing a series of posts where I explore different interpretations of a concept – Conway Creatures.

Get Involved!
I have a few programmers, logicians and AI enthusiasts that follow my blog so I wanted to see if I could make something of the concept. I’d like to see all your interpretations of what a Conway creature is. Given a rough description, which is essentially: creatures (2D,3D, etc) of which the properties are evolved in some way using a mix of CA and GAs. If I get any i’ll do posts dedicated to the entries. I would also like to see varied definitions of the concept such as the use of other works by John Conway (e.g., the growth rate of the Look and Say sequence – Conway’s Constant, the Surreal Numbers, Conway notation for polyhedra, etc), other CA rules and other Evolutionary methods.

The First Detour – Longevity in Game of Life:
I began to write the program and found myself wondering “What are the characteristics of longevity in CAs?” and I’m still not sure. I’ve been trying different takes on mutation and crossover where I take chunks of the board and flip them or turn them all on/off. It doesn’t seem to make much difference, I was hoping it would conserve locality. I also tried out Boltzmann selection (Simulated Annealing) but tournament selection (dueling) worked much better. Any ideas?

This is my program so far, I am taking a little detour to look into longevity, but in Issue 1 there will be a creature where the 3D terrain is. Probably not very complicated, I was thinking of making the creature some sort of shape, like an octahedron.

# Almost UV Photography

For ages I have wanted to do full-spectrum photography, which captures light from Infrared (IR) all the way to ultraviolet (UV), but the UV aspect of it is bloody expensive! DSLR sensors, both CCD and CMOS, capture light slightly outside the visible spectrum (VIS) but use things like hot mirrors and UV filters to narrow the band closer to 390-700nm. The sensors use channeling methods like a Bayer filter to give us the very useful RGB channels, in this post we will work with extra channels for IR and UV.

I am always looking for cheap alternatives for UV and I thought I’d test out a bit of a long shot – using a UV filter to maths my way to a UV image. To do this I bought a daylight simulating bulb that emits UVA (400-315nm) and some flowers from the local gas station. It’s a simple idea, the extra light that the UV filter blocks must be UV light so if we subtract all the other light we are left with UV.

No Filter – UV Filter = UV ResidueI subtracted each colour separately for each pixel: [r1-r2, g1-g2, b1-b2], it was rather red so I used the red channel for the new R,G and B making a brighter grayscaled image (see below). Then I used that new “UV” image along with the colour image to map channels [GBU to RGB] like the images Infrachrome makes using this technique. For infrared and ultraviolet he uses an adapted camera specifically for full-spectrum, infact he uses two in a fantastical and magical set up. Unfortunately mine didn’t work very well, I am hoping that flowers reflect UVB (315-280nm) patterns and this is only catching UVA, but I think that’s being optimistic. It seems more like the lower range of blue light being reflected as there is no sign of a nectar guide. If anyone has tried this before I’d be interested to hear about it and see the pictures!

I thought I’d do a full spectrum map whilst I had the camera set up so I put on a 950nm IR pass filter and took another shot. In the above image the far right is the channel map of the other three.

# Fractal Binary

I have previously talked about Complex Bases but I wanted to look again at Base (-1+i). It’s a really hefty number system so the length of the bit-strings increase very quickly, I’d quite like to know if there is a way to assess Radix Economy for complex and negative bases, so if there are any mathematicians out there who know – Please tell me!

Visualising Numbers
Today I wrote a little C++ program to act on Base 2 arithmetic but convert to decimal as if it was Base (-1+i), this meant I could increment through the bits in an ‘ordered’ fashion. The image to the left is the text output of the program, it doesn’t have a very obvious pattern to it – infact the pattern-order we derive from it is somewhat an imposed one. This is because complex numbers do not have a linear order (or Total Order) and I’m trying to list them in a linear manner. They can, on the other hand, be Well-Ordered in correspondence with the natural numbers like we’re doing here.
If we take the real and imaginary values of each number and use them as the x and y co-ordinates (like I did for generating the Mandlebrot Set fractal) then the fractal “Twindragon” appears:

The program I wrote runs through binary numbers starting at 0 colouring the pixel (x=r, y=i) discretely depending on number length. The result shows all Gaussian integers representable by all possible 16,12 and 8 bit complex binary strings in base (-1+i). The colour mapping relates to the position of the Most Significant Bit (essentially the bitstring length). 0 and 1 are both of length one and are the dark blue in the center of the fractal. The 12-bit and 8-bit fractal maps have been zoomed in on to emphases  the self-similarity of the shape.

Colouring the fractals like this is a nice way of showing the distribution of numbers in the complex system but, going back to the math, a number system isn’t useful without arithmetic. Luckily the (-1+i) system is closed under addition, subtraction and multiplication. For addition and multiplication it is the same as normal binary with the difference being in the carry. Below is a table of all possible carry situations:

 1+1 = 1100 1+1+1 = 1101 1+1+1+1 = 111010000 1+1+1+1+1 = 111010001 1+1+1+1+1+1 = 111011100 1+1+1+1+1+1+1 = 111011101 1+1+1+1+1+1+1+1 = 111000000

Division in the systems is rather complex, an explination of that and examples of addition/subtraction/multiplication can be found in a short paper called “Arithmetic in Complex Basis” by William Gilbert. The paper also talks about an equivalent to decimal which is base (-3+i) using the digits [0,1,2,3,4,5,6,7,8,9].

# Unabomber and the Technocracy Design

All of Ted’s political writings were in code, a code that was never properly cracked by police – but later finding codesheets like this one gave the necessary instructions for decoding.

Ted Kaczynskib
Known infamously as The Unabomber, Ted was a gifted child. Finding a love for mathematics at a very young age, he went on to get a PhD at Michigan – his thesis on boundary functions was commented on by a member of his dissertation committee saying: “I would guess that maybe 10 or 12 men in the country understood or appreciated it.”, his publications caught the eye of Berkley where he went on to teach. But this great academic life ran parrallel to a social inability, introverted, Ted found solace in himself. As a child he was distant and cold. The only other thing to catch Ted was nature and being outdoors, this would be the basis of his philosophy – personified later when he adopted a survivalist lifestyle in the woods outside of Montana. During his times at Universities he stayed out of all the activism happening at the time showing no signs of strong feelings towards politics.
But then came the attacks and the infamous manifesto…

Kaczynskib believed in a sort of anarcho-primitivism, living for yourself with no technology, and no money. Without a price-system (economy) his view can’t be put into the left-right wing spectrum, but interestingly another system without an economy advocates the opposite – extensive technology use in a collectivist manner:

In short, it is the social movement from the 1930′s related to energy accounting. It’s founders, Howard Scott (engineer) and Marion King Hubbert (geoscientist) created the Technical Alliance which did a range of research projects in energy accounting accross North America. They later founded Technocracy Inc which was where the idea came to fruition. It was popular with the scientifically inclined and thus it’s not suprising that it interested Albeirt Einstien, who met with Technocrats a few times to learn more.

Technocracy, assessing humans as energy consumption machines, aims to balance resources used with the energy cost of making those resources – creating abundance. Also using technology to free the people of the majority of labour and social stresses of competition in a monetary system. So while socialism and free market can be seen as two sides of the same coin, these two can be seen as two sides of the same cog.

Here are a few interesting differences:

 Unabomber Manifesto Technocracy Study Course “There is no way of reforming or modifying the system so as to prevent it from depriving people of dignity and autonomy.” Government “All philosophic concepts of human equality, democracy, and political economy have upon examination been found totally lacking and unable to contribute any factors of design for a Continental technological control.” “The system does not and cannot exist to satisfy human needs. Instead, it is human behavior that has to be modified to fit the needs of the system. This has nothing to do with the political or social ideology that may pretend to guide the technological system. It is the fault of technology, because the system is guided not by ideology but by technical necessity.” Technology (On the rate of production): “While this trend has advanced further in some industries than in others, it is present in all industries, including even the most  backwards of them–agriculture. Since the cause for this development, namely, technological improvements, still exists in full force, there can be no doubt that this trend will be continued into the future.” “Freedom is restricted in part by psychological control of which people are unconscious, and moreover many people’s ideas of what constitutes freedom are governed more by social convention than by their real needs.” Freedom “It APPEARS to be little realized by those who prate about human liberty that social freedom of action is to a much greater extent determined by the industrial system in which the individual finds himself than by all the legalistic restrictions combined.”

# Complex Bases

Bellow is Donald Knuth, his most famous work is probably The Art of Computer Programming for which the content won him a Turing Award in 1974. He also came up with the Up Arrow notation used in my posts on Large Numbers and God. Those posts were inspired by one of Knuth’s books, this post was inspired by his number system.

The Quater-Imaginary System
As a student at High School he entered into a science talent search and his submission was the Quater-Imaginary system, or Base 2i. It’s interesting because it uses the digits {0,1,2,3} for representation so it would seem at first glance to be quaternary (Base 4) – but it’s not!

It is actually an imaginary base, as the complex version is (0r±2i). Like the decimal system, quater-imaginary can finitely reperesent all positive real integers -but it can do more- it can finitely represent all positive AND negative real AND imaginary integers without signs (i.e., 3i, -8). Which can be seen in this table:

 Base 10 Base 2i Base 10 Base 2i Base 10 Base 2i Base 10 Base 2i 1 1 -1 103 1i 10.2 -1i 0.2 2 2 -2 102 2i 10.0 -2i 1030.0 3 3 -3 101 3i 20.0 -3i 1030.2 4 10300 -4 100 4i 20.0 -4i 1020.0 5 10301 -5 203 5i 30.2 -5i 1020.2

The Dragon System

The Twindragon also known as the Davis-Knuth dragon!

It’s not offically called that, but the second most known complex system is Base (−1±i) which has an associated fractal shape (twindragon). It uses the numbers {0,1} for representation. It’s a very clean and eligant number system that was created by Walter F. Penney in 1965. As with quater-imaginary, this number system can be used to finitely represnt the Gaussian Integers.

Interestingly the radix starts with a negative number, but this isn’t a problem, negative bases work just aswell as positive ones. Infact in 1957 a Polish computer called BINEG was designed using negabinary!

 Base 10 Base (-1±i) Base -2 Base 2 1 1 1 1 2 1100 110 10 3 1101 111 11 4 111010000 100 100 5 111010001 101 101

Base (-1±i√7)/2 and Others

Here the length of the numbers don’t increase monotonically, for example 12(11001100) and 13(11001101) are shorter than their predecessor 11(11100110011) which is the same length as 14(11100010110). It isn’t the only base to hold this attribute but it’s one of the quickest to show it. Source and explination here.

As well as whole-number radix systems it is possible to use fractions and even irrational numbers, one example I go over is Phinary (Base 1.61803…) also known as the Golden Ratio Base. On my Research Page I am looking at a series of systems, starting with the golden ratio, which I call the Metallic Series that can all be used under the same rules.

I find number systems quite interesting and I have started messing around modelling them in different ways, in a previous post (Numeral Automata) I look at them using cellular automata.

# World Astronomy Day!

Astronomy Day is an annual event that was set up by a chap called Doug Berger in 1973, he’s the president of the Astronomical Association of Northern California. Originally the idea was to set up telescopes in industrial areas so passers by could view space in a way they may never have had before, now it is a world wide event that gets all types of people up and outside looking at the stars! If it’s a clear sky go check them out, they’re awesome. Otherwise if it’s cloudy or daytime then the SLOOH SpaceCamera is doing an Astronomy Day Marathon which can be viewd live here.

In my spare time I like to attempt photography, the things I’m most interested in are astrophotography and photography outside visible light, but I am partial to a bit of nature now and again – here are some recent shots:

This slideshow requires JavaScript.

If you happen to like photography (of any type) me and a few others will be contributing to a new blog called Photofun. In it we will be photography with information on what we’re using and how we’re using it, it’ll be a sort of social learning experiment for us. If you know others who are maybe starting out or wanting to start photography, this might be just the thing to help along the way – so don’t be afraid to share!

# Randolph Diagrams

This is what a genius looks like.

There is something aesthetic and elegant about Randolph diagrams, unfortunately they aren’t commonly used. I found out about them when reading Embodiments of Mind by the glorious and bearded Warren McCulloch.

The Original Proposal:
In the book he refers to them as “Venn functions” and they are briefly explained as being derived from Venn’s diagrams for sets but in McCulloch’s case they were used to express logical statements. If you draw a Venn diagram of two circles intersecting you are left with four spaces ( a/b, a&b, b/a, U ), adding a jot into a space to denote truth or leaving it blank for false gives you the 16 possible logic combinations. They are great examples of the isomorphism between logic and set theory:

He used these as tools to help teach logic to neurologists, psychiatrists and psychologists. Later he developed them into a probablistic logic which he applied to John vonn Neumann‘s logical neuron nets. Which I will discuss in the next post.

Randolph’s Diagrams:

The truth values for three statements.

McCulloch does mention that they could be used to apply more than two statements but doesn’t show how, later John F. Randolph developes the system as an alternative visualisation of set relations neatly coping with more than two sets (something Venn diagrams begin to struggle with after five). For each additional statement/set a new line is introduced in each quadrant. Four statements would be a large cross with four smaller crosses, one in each quadrant.

Wikipedia has an example of the tautological proof for the logical argument, modus ponens, which can be found here, but I thought it would be good to show how three values are handled – so we’ll use syllogism, as in “Socrates is a man, all men are mortal, therefore Socrates is mortal” being reduced in it’s logical form to tautology:

((A implies B) and (B implies C)) implies (A implies C)