From: Siraaj Khandkar Date: Tue, 28 Aug 2012 04:13:30 +0000 (-0400) Subject: Added README describing life-005. X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=ffa3a0a0f3c1aec11aeec90218b4d47a97046f8d;p=cellular-automata.git Added README describing life-005. --- diff --git a/005/README.md b/005/README.md new file mode 100644 index 0000000..8df2f33 --- /dev/null +++ b/005/README.md @@ -0,0 +1,14 @@ +life-005 +======== + + +Approach +-------- +AWK's array is not a first class value - it cannot be copied and passed around. +One of approaches to work around this issue (the other I tried in life-004) is +using a single array with a new element for each generation (so that we can +refer to the previous while building new). Problem is that there are no +multidimensional arrays either... However, facilities are provided for +simulating them by storing level dimension information in the key of the +associative array, so I ended up with board[generation, x, y] and manually +deleting a generation when it is no longer needed.