-
Notifications
You must be signed in to change notification settings - Fork 0
/
CA.tex~
236 lines (217 loc) · 7.31 KB
/
CA.tex~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
% Created 2016-03-31 Thu 17:02
\documentclass[bigger]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{marvosym}
\usepackage{wasysym}
\usepackage{amssymb}
\usepackage{hyperref}
\tolerance=1000
\usetheme{default}
\author{Weston Dransfield}
\date{\today}
\title{Cellular Automata}
\hypersetup{
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 24.5.1 (Org mode 8.2.10)}}
\begin{document}
\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\begin{frame}[label=sec-1]{The Basics}
\begin{itemize}
\item<1-> Spacial Structure
\item<2-> Local Interactions
\item<3-> Cell State
\item<4-> Cell Transitions
\end{itemize}
\end{frame}
\begin{frame}[label=sec-2]{Spacial Structure}
\begin{itemize}
\item<1-> Grid - Like a city
\item<2-> Agents - Like a home in the city
\end{itemize}
\end{frame}
\begin{frame}[label=sec-3]{Spacial Structure}
\includegraphics[width=7cm]{images/grid.png}
\end{frame}
\begin{frame}[label=sec-4]{Local Interactions}
Agents may only interact with a set number of agents around them. This region is called a neighborhood.
\begin{itemize}
\item<1->Von Neumann neighborhood (most local).
\item<2->Moore neighborhood (less local).
\item<3->\(n*n\) Moore neighborhood for \(n > 3\) (least local).
\end{itemize}
\pause
\pause
\pause
Locality indicates how many agents a single agent interacts with. High locality indicates more interactions (Think of how a rumor spreads).
\end{frame}
\begin{frame}[label=sec-5]{Local Interactions}
\includegraphics[width=7cm]{images/grid.png}
\end{frame}
\begin{frame}[label=sec-6]{Cell State}
Cells have a state
\begin{itemize}
\item<1->Binary
\item<2->Any number of states
\end{itemize}
\end{frame}
\begin{frame}[label=sec-7]{Cell Transitions}
CA have discrete chunks of time called rounds. Each round produces the next "generation" of cells.
\end{frame}
\begin{frame}[label=sec-8]{Cell Transitions}
The next state of a cell is a function of:
\begin{itemize}
\item<1->It's current state
\item<2->The state of cells in its neighborhood
\end{itemize}
\pause
\pause
Think of your opinion on a topic changing by being surrounded by people with a different view.
\end{frame}
\begin{frame}[label=sec-9]{Elementary Cellular Automaton}
What is the simplest...
\begin{itemize}
\item<1->Grid of cells?
\item<2->Useful number of states?
\item<3->Neighborhood?
\end{itemize}
\end{frame}
\begin{frame}[label=sec-10]{Elementary Cellular Automaton}
What is the simplest...
\begin{itemize}
\item<1->Grid of cells - an array
\item<1->Useful number of states - binary
\item<1->Neighborhood - 2 adjacent cells of the agent
\end{itemize}
\end{frame}
\begin{frame}[label=sec-11]{Elementary Cellular Automaton (Exercise)}
How do we describe the state of cell \(c_t\) as a function of the neighbors of \(c_t\) at time \(t-1\)?
\begin{itemize}
\item<2->There are \(2^3 = 8\) neighborhood combinations for any given neighborhood.
\item<3->Simply create an assignment for each combination!
\item<4->This assignment is called a rule set (how many possible rule sets?)
\end{itemize}
\end{frame}
\begin{frame}[label=sec-12]{Example Program}
\begin{itemize}
\item \url{http://mathworld.wolfram.com/ElementaryCellularAutomaton.html}
\item \url{https://github.com/westonkd/Completeness/tree/CA}
\end{itemize}
\end{frame}
\begin{frame}[label=sec-13]{Interesting Tidbits}
\begin{itemize}
\item<1->Rule 30 - Random number genrator for Wolfram language
\item<2->Rule 22 - Sierpinski triangle
\end{itemize}
\end{frame}
\begin{frame}[label=sec-14]{2D CA Example - Conway's Game of Life}
\includegraphics[width=11cm]{images/gol1.jpg}
\end{frame}
\begin{frame}[label=sec-15]{Conway's Game of Life}
\begin{enumerate}
\item<1->Rules
\item<2->Entities
\item<3->Results
\item<4->Computational tidbits
\end{enumerate}
\end{frame}
\begin{frame}[label=sec-16]{Conway's Game of Life Rules}
\begin{itemize}
\item<1->2 states - dead or alive
\item<2->3x3 Moore neighborhood
\end{itemize}
\begin{enumerate}
\item<3->Any live cell with fewer than two live neighbors dies (under population).
\item<4->Any cell with 2 or 3 live neighbors lives on to the next generation.
\item<5->A cell with more than 3 live neighbors dies (over crowding).
\item<6->A dead cell with exactly 3 live neighbors becomes alive (reproduction).
\end{enumerate}
\end{frame}
\begin{frame}[label=sec-17]{Practice}
\begin{center}
\includegraphics[width=2cm]{images/beehive.png}
\includegraphics[width=2cm]{images/toad.png}
\includegraphics[width=2cm]{images/glider.png}
\end{center}
\end{frame}
\begin{frame}[label=sec-18]{Conway's Game of Life Entities}
\begin{enumerate}
\item<1->Still lives - entity stays the same throught generations
\item<2->Oscillators - entity changes shape and returns to original position (periods)
\item<3->Spaceships - Moving oscillators
\end{enumerate}
\url{https://en.wikipedia.org/wiki/Conway\%27s_Game_of_Life}
\end{frame}
\begin{frame}[label=sec-19]{Conway's Game of Life Results}
\begin{enumerate}
\item<1->Fade away completely
\item<2->Stable configuration
\item<3->Oscillating phase
\item<4->...Gosper glider gun
\end{enumerate}
\end{frame}
\begin{frame}[label=sec-20]{Demo}
\begin{itemize}
\item \url{http://www.bitstorm.org/gameoflife/}
\end{itemize}
\end{frame}
\begin{frame}[label=sec-21]{Conway's Game of Life Decidability}
The question - "Given a starting pattern and an ending pattern, will the starting pattern ever reach the ending pattern?"
\begin{itemize}
\item<2->Undecidable - halting problem
\item<3->"Indeed, since the game of life includes a pattern that is equivalent to a UTM (universal Turing machine), this "deciding" algorithm, if existed, could have been used to solve the halting problem, by taking the initial pattern as the one corresponding to a UTM+input and the later pattern as the one corresponding to a halting state of the machine with an empty tape (as one can modify the Turing machine to always erase the tape before halting). However the halting problem is provably undecidable and so such an algorithm does not exist" (Wikipedia).
\end{itemize}
\end{frame}
\begin{frame}[label=sec-22]{Conway's Game of Life Turing Completeness}
\begin{itemize}
\item Conway's Game of Life is Turing Complete
\item \url{http://rendell-attic.org/gol/tm.htm}
\item \url{https://www.youtube.com/watch?v=My8AsV7bA94}
\end{itemize}
\end{frame}
\begin{frame}[label=sec-23]{CAs in the Wild}
\begin{itemize}
\item<1->Image processing (pixels)
\item<2->Nature
\item<3->Migration patterns
\end{itemize}
\end{frame}
\begin{frame}[label=sec-24]{CAs in the Wild}
\includegraphics[width=11cm]{images/shell.jpg}
\end{frame}
\begin{frame}[label=sec-25]{Extra: 3D CAs}
\url{http://cubes.io/}
\end{frame}
\begin{frame}[label=sec-26]{Going Further}
\#+BeginLaTeX
\begin{itemize}
\item<1->Crazy grids
\item<2->Probability
\item<3->History
\end{itemize}
\#+ENDLaTeX
\end{frame}
\begin{frame}[label=sec-27]{Sources}
\begin{itemize}
\item \url{https://en.wikipedia.org/wiki/Conway\%27s_Game_of_Life}
\item \url{https://www.youtube.com/watch?v=W1zKu3fDQR8}
\item \url{https://www.youtube.com/watch?v=EyrwOf239M4}
\item \url{https://www3.nd.edu/~mtns/papers/17761_4.pdf}
\item \url{http://www.sciencedirect.com/science/article/pii/S089571771000333X}
\end{itemize}
\end{frame}
% Emacs 24.5.1 (Org mode 8.2.10)
\end{document}