Rules of Phutball
Early last spring1 I promised myself that I would write a program that plays Philosopher’s Football (often called Phutball) at least as well as I can. Until today, I made no progress on that.
Now I’m trying a different tactic: peer pressure. Hopefully telling you that I’m writing code will make me write code.
To avoid confusion, Philosopher’s Football is not what this video depicts:2
Instead, it’s a game played on a 15 by 19 board, which looks like this:

Except that’s a picture from Winning ways for your mathematical plays,3 and I can’t draw that well.
So that same position really looks like this:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
++++++⚬++++++++++++
+++++++++++++++++++
++++++++⚬++++++⚬+++
+++++++++•⚬⚬+++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
As the name indicates, Philosopher’s Football is loosely based on football (what we Americans call “soccer”). Usually it’s played on a Go board (with 4 rows chopped off) with white and black stones. The single black stone is called the ball, and the white stones are called men.4
The game starts with the ball in the center:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++•+++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
On your move, you can do one of two things:
(1) Place a man on any unoccupied square.
(2) Make the ball jump one or many times over adjacent men (it doesn’t matter who placed them).
What does a jump look like? Suppose the board looks like this:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
++++++⚬++++++++++++
+++++++⚬+++++++++++
++++++++⚬++⚬+++++++
+++++++++•⚬++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
There are three possible jumping moves. You could jump the ball over the man to the east, like this:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
++++++⚬++++++++++++
+++++++⚬+++++++++++
++++++++⚬++⚬+++++++
+++++++++++•+++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
Note that you immediately remove any men you jump over.
(I guess this corresponds to players fainting from exhaustion during a football match? Players getting red cards? I said “loosely based on football”.)
Or you could jump to the east and then continue northwards, obtaining this board:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
++++++⚬++++++++++++
+++++++⚬+++•+++++++
++++++++⚬++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
Or you could have jumped the ball over the three men on the diagonal:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++•+++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++⚬+++++++
++++++++++⚬++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
The two players (named Left and Right) alternate turns. Left wants to move the ball all the way to the right, landing on or jumping beyond Right’s goal line. Vice versa for Right. The ball can’t go off the sidelines.
A sample game
So far I’ve only written one algorithmo that plays Phutball. Is this algorithm particularly clever? Well, in my code I called it PloddingPlayer
. (I really did.) It places a stone to its right (when it’s playing as Left), jumps over the stone, and repeats.
That is not a good strategy. To demonstrate, I played as Right against the computer. It slowly shifted the stone to the right, while I built up a long chain from the far right to the left. After we’ve each made 4 moves, the board is:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++•+++++
++++++++++⚬+⚬+⚬+⚬++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
After the 15th move, PloddingPlayer
is almost at the goal line:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++•+
++++⚬+⚬+⚬+⚬+⚬+⚬+⚬++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
But then I make a chain of 7 diagonal jumps:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++•+++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
The computer doggedly starts moving the ball to the right again, but I just rehash my strategy. After the 25th move, I can win on the next move in a sequence of jumps:
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++•⚬++++++++++
⚬+⚬+⚬+⚬++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
+++++++++++++++++++
But PloddingPlayer
is useful. Within the next two weeks I’ll write fancier algorithms that require much more CPU time and memory. If they can’t beat this algorithm, I’ll know I have a problem.
Footnotes:
Or maybe even in December 2019?
After writing this, I realized I had inserted a Monty Python link into a post about Python code. Python is named after Monty Python. This is not a coincidence because nothing is a coincidence.
p. 753 in Chapter 22 (Lines and Squares), Volume 3
Yes, “men” is the conventional Phutball term. As an American, I object to this on the grounds that I don’t like thinking about men’s football—we didn’t even qualify for the World Cup. I’d much prefer to think about women’s football, in which we’ve won the World Cup four times in the last eight competitions.