Showing posts with label Game of Life. Show all posts
Showing posts with label Game of Life. Show all posts

Wednesday, 30 December 2020

Penrose Life

Recently I was email interviewed by Siobhan Roberts for an article she was writing about Conway’s famous Game of Life.  The article has just been published in the New York Times, and I see I am in good company!

Not only that, but the piece was picked up by Clive Thompson who wrote a post for BoingBoing on the part of the article I was interviewed about: runing the Game of Life on a Penrose tiling.

Here are a couple of the many oscillators my students and I discovered (and named):


period 4 bat



period 9 moustache

You can find out more about the work my students and I have done on this here:




Monday, 13 April 2020

book review: Complexity: a very short introduction

John Henry Holland.
Complexity: a very short introduction.
OUP. 2014

When I saw that John Holland had written “A Very Short Introduction” to complexity, I was excited, and snapped up a copy. Given Holland’s stature in the field, I was looking for a good distillation of concepts, and, maybe, a suitable introduction for my students.

Unfortunately, I cannot recommend this book. This is for two main reasons. Firstly, it is riddled with errors. Secondly, the part on Complex Adaptive Systems, or CAS (as opposed to the somewhat simpler Complex Physical Systems, or CPS), appears to be a summary of Holland’s own work in the area, not the more general introduction I was looking for.

The first issue is more of a problem. Here are a few examples. On p.7, Holland discusses von Neumman’s cellular automaton (CA) replicator, a complex pattern that can replicate itself, then references figure 1, which shows a glider from Conway’s Game of Life CA. On p.11, he says that CPS tend to be modelled using partial differential equations (despite most of his examples being discrete space and time CAs), then states that the theory of partial differential equations (PDEs) is additive, that is, linear (and says this again on p.25); by p.13 he is talking about PDEs being used to describe chaotic (necessarily non-linear) systems. On p.15 he states that the Koch snowflake fractal curve is “everywhere discontinuous”, rather, it is everywhere continuous, but nowhere differentiable. And so on.

Okay, so maybe the part on CAS is better than the part on CPS, because that’s his area of expertise? But no. Take figure 6, which has two parts, one a set of rules, and the other supposedly a network representation of the behaviour of those rules. Except that the two parts don’t fully correspond, and the hash notation in the rules (a wildcard) is nowhere explained; the figure as it stands is unintelligible. Furthermore, this specific formulation of rules is Holland’s own model of CAS, which would be absolutely fine in a book about his model, but not so much in a general introduction.

I gave up reading soon after this point. Even if there are some interesting insights (and I’m sure they must be) how can they be picked out from the mass of erroneous statements, and the potentially over-specific model presented? Unfortunately, this book will have to go back on my shelf; I will not be recommending it to my students, or to anyone else.




For all my book reviews, see my main website.

Saturday, 22 March 2014

book review: Think Complexity

Allen B. Downey.
Think Complexity.
O'Reilly. 2012

The problem with being an autodidact is the unknown unknowns: if you are teaching yourself something, how can you fill the gaps in your knowledge that you don’t even know are there? I am teaching myself Python. Not from scratch, because I can already program in other languages. But that’s part of the problem: because I know how to program, I am learning Python from the on-line documentation (which could be better) and Stack Overflow (which in invaluable). This means I can find the constructs I look for; but what about the ones I don’t know exist?

So I’ve been thinking about getting a book, to help fill the gaps. I came across Think Complexity, a slim book (130pp) that claims to be targeted at an intermediate level, with the bonus of using examples from Complexity Science, a subject I also study.

It starts off well, with a mention of Python generators (which I had come across as a concept) and their “yield” statement (which was new to me). Yet the discussion is very brief: less than a page. I wanted to know more, as it sounded interesting, and made me wonder if the approach would allow coroutines (am I showing my age?). So I googled, and found David Beazley’s excellent tutorials, one on Python generators, using them in a functional manner to implement processing pipelines, and one, indeed, on coroutines. There is a lot more than even hinted at in Think Python.

Next comes a chapter on algorithmic complexity and “big O” notation that introduces Python list comprehensions. Now, it’s virtually impossible to have visited Stack Overflow more than a few times without having come across list comprehensions: they are marvellous beasts. However, their introduction here crystallised my apprehension with the book: they are explained with just a few examples only. Examples can be great for showing what is possible, and the examples here are good in that they start trivial and get more complicated. But you also need a description of the underlying syntax, so that you know that you have inferred the structure correctly from the examples, and to cover usages not illustrated by the examples.

The chapter on Cellular Automata uses NumPy arrays, but doesn’t talk about them much. NumPy is excellent for doing anything with arrays, and if you have come to Python via Matlab, like I have, you will feel right at home with them. One interesting snippet made here is an efficient way to implement Conway’s Game of Life using convolution from SciPy (although Bill Gosper’s HashLife, underlying Golly, is faster, and more interesting algorithmically). 

Then there are brief chapters on fractals, self-organised criticality, and agent-based models. But not a lot more Python. The book finishes up with several case studies prepared by students following up some of the concepts in the book; these are probably the most interesting parts. However, they are interesting mainly from a complexity viewpoint, not really from a Python viewpoint.

In summary, although this is advertised as “intermediate level” Python, it doesn’t go very far beyond what you can pick up readily from Stack Overflow. However, the idea of teaching a programming course using fun examples from Complexity Science is a good one: so many texts use relatively boring examples with little motivation. It is clear here from the chapters contributed by the students that they really engaged with the material.

For all my book reviews, see my main website.