cellular automata for biological life and for artificial intelligence

15
of 1 15 Cellular Automata For Biological Life and For Artificial Intelligence by Ian Beardsley copyright © 2016 by Ian Beardsley

Upload: discover

Post on 25-Jul-2016

216 views

Category:

Documents


0 download

DESCRIPTION

A curious quirk of the nature of the substances that gave rise to life lead to their description in simple source code. Also the structure of those elements at the heart of artificial intelligence (AI), give rise to their description in simple code, as well. If one can put the structure of nature into a few lines of simple code, even better, describe something complex with something simple, then they have written a Universal Law of Nature.

TRANSCRIPT

Page 1: Cellular Automata For Biological Life and For Artificial Intelligence

� of �1 15

Cellular Automata For Biological Life and ForArtificial Intelligence

by

Ian Beardsley copyright © 2016 by Ian Beardsley

Page 2: Cellular Automata For Biological Life and For Artificial Intelligence

� of �2 15

A curious quirk of the nature of the substances that gave rise to life lead to their description in simple source code. Also the structure of those elements at the heart of artificial intelligence (AI), give rise to their description in simple code, as well. If one can put the structure of nature into a few lines of simple code, even better, describe something complex with something simple, then they have written a Universal Law of Nature.

Page 3: Cellular Automata For Biological Life and For Artificial Intelligence

� of �3 15

A journey of a thousand li begins with the first step

Page 4: Cellular Automata For Biological Life and For Artificial Intelligence

� of �4 15

The programming language Python is particularly conducive to The Pyramid of Life:

print("The basic substances from which life formed on early earth are: ") print("CH4 (Methane), NH3 (Ammonia), H2O (water), H2 (hydrogen gas)") print("The idea of Wolfram is if we can describe something complex,...") print("with a few short lines of source code, then ") print("this can be an alternative to using mathematics ") print("to describe Nature. ") print("Because these substances from which life are made of, ") print("elements 6 (C), 7 (N). 8(O) of the period table and H, ") print("a simple loop can be written, because the C, N, and O, ") print("progress in increments of one, while the H decrements. ") print("as such we write code to make the pyramid of life.")

k=4; x=1; z=4; while (x!=k): x=x+1 z=z-1 print(x*"H"+z*"C");

print("Where we say HH=H2, HHH=H3, HHHH=H4, and,...") print("CCC = O, CC = N, and C = C.")

Running this produces:

HHCCC HHHCC HHHHC

Page 5: Cellular Automata For Biological Life and For Artificial Intelligence

� of �5 15

Cellular Automata For Artificial Intelligence

Page 6: Cellular Automata For Biological Life and For Artificial Intelligence

� of �6 15

The Code For The Structure In AI

print("i1=Boron") print("j =Silicon") print("i2=Gallium") print("k1=Nitrogen") print("k2=Arsenic") print(" ")

x=0 while (x!=3): x=x+1 if (x==1 or x==3): print("i"+" "+"k") if (x==3): break; print(" "+"j"+" ")

Running this produces:

i k j i k

Page 7: Cellular Automata For Biological Life and For Artificial Intelligence

� of �7 15

The Cellular Automata of Electrical Wiring

While aluminum (Al) is used for wires in electronics, the most used is copper (Cu). It is highly conductive and is in the same group in the periodic table of elements as silver (Ag), and Gold (Au). Gold and silver are used for electrical wire as as they are conductive and ductile as well. Gold, in fact, is the most conductive at extreme temperatures, and silver is the most conductive at room temperature. As such, Copper, Silver, and Gold are at the core of electrical engineering where wiring is concerned. Aluminum is mostly use for encasing circuitry. I find great beauty in the fact that these three elements, Copper, Silver, and Gold are in the same group (Group 11), and occur one after they other in this group starting with copper, proceeding to the next heaviest, silver, and concluding with heaviest, gold. The are, respectively, elements 29, 47, and 79. We have already outlined the basic cellular automata for the category of semiconductors, the semi-metals and doping agents of AI components, and the basic cellular automata for biological life, leaving this category as the next to consider. It is perhaps the easiest for which to find a loop, as there is nothing more tricky for it than to arrange 1(Cu), 2(Ag), and 3(Au), in a vertical column. Our ultimate goal is to cover the cellular automata of the entire periodic table, which will take us into the biological functions of the elements and their compounds just as much as the the functions of the elements in compounds in electrical engineering. Ultimately, we seek to find the connection between biological life and AI, a connection I have already establish via another avenue, in my work: Nature’s AI Cookbook.

Code For Ductile Conductors

print("Cellular Automata For The Ductile Conducting Wires") print("Cu=1, Ag=2, Au=3")

x=0 while (x!=3): x=x+1 print(str(x))

Running this produces:

Cu=1, Ag=2, Au=3

1 2 3

Page 8: Cellular Automata For Biological Life and For Artificial Intelligence

� of �8 15

Cellular Automata For The Regular Tessellators

print("The regular tessellators are the regular geometries that can") print("cover a surface without leaving gaps.") print(" ") print("regular hexagon:")

x=0 while (x!=3): x=x+1 if (x==1 or x==3): print(2*" "+"***"+" ") if (x==3): break; print("*"+5*" "+"*") print("regular triangle (equilateral triangle):") z=0 print(3*" "+"*"+2*" ") while (z!=2): z=z+1 print(3*" ") print("*"+5*" "+"*") print("regular parallelagram (square):") y=0 while (y!=3): y=y+1 if (y==1 or y==3): print("*"+3*" "+"*") if (y==3): break; print(4*" ")

Running this produces:

regular hexagon: *** * * * * *** regular triangle (equilateral triangle) *

* * square (regular parallelogram): * *

* *

Page 9: Cellular Automata For Biological Life and For Artificial Intelligence

� of �9 15

The Code In C

Page 10: Cellular Automata For Biological Life and For Artificial Intelligence

� of �10 15

#include <stdio.h> int main (void) { printf("This is an interactive exercise,..\n"); printf("Demonstrating the existence of a pyrimid of life,...\n"); printf("The ingredients of life are water (H20), ammonia (NH3)...\n"); printf("And methane (CH4)\n"); printf("See The Pattern?\n"); { for(int ctr=1;ctr<=4;ctr++) { int i; int search=0; int found=0; int elements[4] = {6,7,8,1}; char molar[25]= {'C','N','O','H'}; printf("Type element number: "); scanf("%d", &search); for (i=0; i<=5; i++) { if (search == elements[i]) {found=1; break; } } if (found) printf("%c :", molar[i]); printf("try number %d \n ", ctr); } } int n; printf("Notice H20 can be written: HH0\n"); printf("Notice NH3 can be written: NHHH\n"); printf("Notice CH4 can be written: CHHHH\n"); printf("Hydrogen Gas, H2 also gave birth to the ingredients of life.\n"); printf("Shall I construct the pyramid? Yes=1, No=2: "); scanf("%d", &n); if (n==1) {

Page 11: Cellular Automata For Biological Life and For Artificial Intelligence

� of �11 15

printf("H\n"); printf("HH\n"); printf("HHO\n"); printf("HHHN\n"); printf("HHHHC\n"); } else { printf("Thank you.\n"); } }

Page 12: Cellular Automata For Biological Life and For Artificial Intelligence

� of �12 15

the pyramid of life: running the program element

jharvard@appliance (~): cd Dropbox/discover jharvard@appliance (~/Dropbox/discover): make element clang -ggdb3 -O0 -std=c99 -Wall -Werror element.c -lcs50 -lm -o element jharvard@appliance (~/Dropbox/discover): ./element This is an interactive exercise,.. Demonstrating the existence of a pyrimid of life,... The ingredients of life are water (H20), ammonia (NH3)... And methane (CH4) See The Pattern? Type element number: 1 H :try number 1 Type element number: 6 C :try number 2 Type element number: 7 N :try number 3 Type element number: 8 O :try number 4 Notice H20 can be written: HH0 Notice NH3 can be written: NHHH Notice CH4 can be written: CHHHH Hydrogen Gas, H2 also gave birth to the ingredients of life. Shall I construct the pyramid? Yes=1, No=2: 1 H HH HHO HHHN HHHHC jharvard@appliance (~/Dropbox/discover):

Page 13: Cellular Automata For Biological Life and For Artificial Intelligence

� of �13 15

#include <stdio.h> int main (void) { printf("Wolfram suggested if we could explain something complex,...\n"); printf("with a few lines of code,.."); printf("it would be an alternate approach to using mathematics,...\n"); printf("to descbribe Nature.\n"); printf("\n"); printf("Here we do just that. With a short loop we capture the fact,...\n"); printf("that, the basic constituents of life arose from,..\n"); printf("H20, methane (CH4), ammonia (NH3), and hydrogen gas (H2), and,\n"); printf("since Carbon is 6, Nitrogen is 7, and Oxygen is 8 in the periodic table,\n"); printf("That is,since each increments by one,...\n"); printf("while, each Hydrogen decrements by one, then we can make a pyramid,...\n"); printf("of them with a simple loop.\n"); printf("\n"); printf("Here we say H=H (Hydrogen), CC=C (Carbon) CCC=N (Nitrogen) CCCC=O (Oxygen\n"); int k; printf("Are you ready to run the loop? Yes=1, No=0: \n"); scanf("%d", &k); if (k==1) { int n=6; for (int j=1;j<=n;j++) { for (int i=1;i<=n;i++) { if (j>=n+1-i) { printf("C"); } else { printf("H"); } } printf("\n"); }

Page 14: Cellular Automata For Biological Life and For Artificial Intelligence

� of �14 15

} else { printf("Thank you\n"); } }

Running natural.c (Ian’s Wolfram Cellular Automata)

jharvard@appliance (~): cd Dropbox/discover jharvard@appliance (~/Dropbox/discover): make natural clang -ggdb3 -O0 -std=c99 -Wall -Werror natural.c -lcs50 -lm -o natural jharvard@appliance (~/Dropbox/discover): ./natural Wolfram suggested if we could explain something complex,... with a few lines of code,..it would be an alternate approach to using mathematics,... to descbribe Nature.

Here we do just that. With a short loop we capture the fact,... that, the basic constituents of life arose from,.. H20, methane (CH4), ammonia (NH3), and hydrogen gas (H2), and, since Carbon is 6, Nitrogen is 7, and Oxygen is 8 in the periodic table, That is,since each increments by one,... while, each Hydrogen decrements by one, then we can make a pyramid,... of them with a simple loop.

Here we say H=H (Hydrogen), CC=C (Carbon) CCC=N (Nitrogen) CCCC=O (Oxygen Are you ready to run the loop? Yes=1, No=0: 1 HHHHHC HHHHCC HHHCCC HHCCCC HCCCCC CCCCCC jharvard@appliance (~/Dropbox/discover):

Page 15: Cellular Automata For Biological Life and For Artificial Intelligence

� of �15 15

The Author