This blog post is about a game I invented in February 2020, the third in a suite of Battleships-style games. (The previous two are Which Number Where and Digit Disguises.)

## NUMBER NEIGHBOURHOODS: A game of analytic deduction

**Players:**

- This game is for two players, or two teams.

**Setting up:**

- Each player/team choose six
*different*numbers between 0 and 10 (not including 0 and 10), each number with at most one decimal place.

*For example, you might choose 0.8, 3.2, 5.6, 5.9, 6.0, 8.7.* - Without the other player/team seeing, write the numbers in increasing order in the MY SET template.

*For example, the numbers above would end up looking like this:*

*(0.8, 3.2)U(5.6, 5.9)U(6.0,8.7).*

(I have a printable version of the game with the rules and templates to fill in, which can be turned into battleships-style stands.) - This notation represents a set on the number line made of three separate open intervals. Colour in the intervals on the MY SET number line.

*For example, your completed MY SET notation and coloured intervals might look like this:*

- Set up so that you can write and draw on the THEIR SET template and number line without the other player/team seeing the MY SET template and number line.

*One possibility is to use the printable template to create battleships-style stands. Another possibility is to play on either side of a freestanding whiteboard, though you would have to draw your own set and number line.*

**The goal:**

- The goal is to guess what the other player/team’s three intervals are. In other words, you must guess exactly their six numbers.

**Your turn:**

- On your turn, you suggest up to
**five**sets of numbers like “all the numbers less than D away from C”. - After each suggestion, the other player/team gives one of three responses:
- “All of those numbers are inside my set” — or “inside” for short.
- “All of those numbers are outside my set” — or “outside” for short.
- “Some of those numbers are inside my set and some are outside” — or “both” for short

- Note: the responses do not include the endpoints of any of the intervals. If the whole interval except the endpoints is inside their set then the answer is “inside”, and if the whole interval except the endpoints is outside their set, then the answer is “outside”.

*There are examples of suggestions and how to answer them in the next section.* - The suggestions made on the same turn must all have the same centre C, and the distance D must be smaller each time.

*For example, you could make the following suggestions on the one turn:**“All the numbers less than 2 away from 6.5”**“All the numbers less than 1 away from 6.5”**“All the numbers less than 0.5 away from 6.5”**“All the numbers less than 0.2 away from 6.5”**“All the numbers less than 0.1 away from 6.5”*

- You don’t have to use all five suggestions. If you want to ask about a different centre or a wider distance, you have to wait until your next turn.
- You can write any notes in any way you like at any time in the game. It is a good idea to keep a record of the suggestions you have made so far.

**Ending the game:**

- Once during the game, on your own turn and instead of making any suggestions, you can say you are ready to guess. Then you say the six endpoints of the intervals.
- If you are right for all six numbers, you win! If you are wrong for at least one number, you lose and the other player/team wins! Either way the game is over.

**Examples of answering suggestions:**

These examples show visually the situations where you would say “inside”, “outside” and “both” in response to the other player’s/team’s suggestion. Your set is (0.8, 3.2)U(5.6, 5.9)U(6.0,8.7), which is drawn in blue in the diagrams. The other player’s suggestion is drawn in yellow slightly higher on the diagram, with the centre marked as a red vertical line.

- They say “all the numbers less than 0.3 away from 0.3”.

Your response: “Outside”.

- They say “all the numbers less than 0.6 away from 5”.

Your response: “Outside”.

(Notice how the answer is still “Outside”, even though the other player’s suggestion shares an endpoint with your set.)

- They say “all the numbers less than 0.5 away from 2.4”.

Your response: “Inside”.

- They say “all the numbers less than 1 away from 7”.

Your response: “Inside”.

(Notice how the answer is still “Inside”, even though the other player’s suggestion shares an endpoint with your set.)

- They say “all the numbers less than 1.5 away from 3”.

Your response: “Both”.

- They say “all the numbers less than 0.3 away from 6.1”.

Your response: “Both”.

**Introductory play:**

When you are first learning to play, you may want to agree to each have only one interval in your set for your first game, then increase the number of intervals to two and then three in later games.

## Thoughts about Number Neighbourhoods

In this section I’ll describe some thoughts about the game I’ve had through playing it. Note there are some spoilers, so I recommend playing the game yourself before reading this section!

I’ve played several games of Number Neighbourhoods across the months since February, and I’ve thoroughly enjoyed them all. Even now, after getting quite a bit of experience, the game feels much harder than Digit Disguises, but I don’t think that’s a bad thing. I think one of the things that makes it feel harder is that the information you collect doesn’t join together as easily as it does in Digit Disguises, which tends to produce a cascade of figuring stuff out towards the end of the game. But there are still some really cool moments of logic that happen in most games.

Here are the whiteboard of notes from a recent game, so you can see the logic that goes into it. The left-hand set is me and a student Kristin. The right-hand set is another pair of students.

Interestingly, though Kristin and I were certain of our set, we got it “wrong” because our opponents thought that the answer should be “both” when an interval was inside the set but included an end-point. I’ve actually updated the rules here in the blog to explicitly point out that case, so it’s less likely to happen in the future!

One thing that’s really interesting about the game is the amount of concentration it takes to even answer the question by another player! The act of seeing whether an interval specified as centre and radius is inside an interval specified with two endpoints is surprisingly difficult, no matter how many times you do it. But that’s really cool, because it’s definitely a skill that Real Analysis students need to think about!

My absolute favourite moment is when someone picks a boundary point as their centre, in which case the answer is going to be “both” all the way down. If someone playing the game with me watched closely, they could probably guess they had a boundary point by my excitement and the sudden increase in the speed at which I answer.

I also like how every new player suddenly realises in the first two turns that once they get an answer of “inside” or “outside” they can stop that turn, because going further in won’t change the answer. I did actually toy with putting that stopping condition in the rules, but decided against it because it is such a nice little moment of “I figured out something cool” I can give to new players. (This is one of the spoilers I warned you about earlier.)

I haven’t really come up with any decent strategy for winning the game yet, or for choosing a “most hard to guess” original set. I have thought about it a bit, but I don’t know if I really *want *a perfect strategy, so that I don’t feel tempted to use it and ruin the game for new players!

For now I am enjoying the experience of playing, and especially playing in teams and discussing the logic and strategies with my team-mates, which is my favourite part of all my battleships-style games.

If you would like to see an entire game, then check out this game I played very slowly over Twitter with my good friend and colleague Lyron.

Oh Fun! Ok I'll play! I've randomly generated my 6 numbers in R using:

set.seed(…)

sort(floor(101*runif(6))/10)I'll tell you the seed when you guess my numbers correctly! Do you want to start?

— Lyron Winderbaum (@LyronW) July 23, 2020

Along the way in the game above, since it was sometimes days between turns and I had the time, I made a Desmos thing for recording guesses and answers, and you might be interested to see that too. This graph is Lyron’s guesses of my set.

## The story of Number Neighbourhoods

Finally, as a bit of an epilogue, I thought you might like to hear how I went about designing the game and the choices that I made along the way.

The game Digit Disguises, which I invented last year, was inspired by a puzzle which I created specially to give a similar feel to the maths in a course like Abstract Algebra. In Algebra you investigate the properties of numbers (and other things) by the way they interact with each other, and so a game where you find numbers based on their interactions with each other matches the vibe of such a course. But there are two broad flavours of pure maths that tend to feel different. A course like Algebra is of one flavour, but a course like Real Analysis is a different flavour. So ever since I created Digit Disguises with Algebra in mind, I thought it would be cool to make a similar game that had Real Analysis in mind.

In Real Analysis, you define a set as open if at every point inside it, you can find an interval centred at that point that fits completely inside the set; and you define a set as closed if at every point *outside *it, you can find an interval centred at that point that fits completely outside the set; and a point is a boundary point if no matter how small you make an interval centred there, it always has some of it inside and some of it outside the set. So given any set, there are three kinds of points and you can decide between them by looking at intervals centred there. And as long as you know in advance if boundary points are in or out, you should be able to find the entire set in this way. This seemed like an idea you could build a game around!

Riffing off Digit Disguises, which uses the digits 0 to 9, I decided the set you were looking for should be between 0 and 10. I also wanted it to feel *small *because Real Analysis is about things being *close *to each other, so I went for decimal places. I did briefly toy with the idea of making it numbers from 1 to 99, since that would be equivalent and not require operations with decimals. But that felt so *huge *and also put a focus on integers, whereas Real Analysis is about the continuously full number line in all its detail and the tiny distances between things. Plus I decided that actually, I *wanted *a chance to practice my decimal calculations. So I stuck with 0.1 to 9.9. Plus as I said before, it did feel like it was a proper partner to Digit Disguises then.

And so the idea for the game was born. I wanted the idea of boundary points to happen several times during a game, so I decided that the goal set should be three intervals, in order to have six boundary points to consider. And I also liked the idea of something being outside the set even though it was between pieces of the set.

I thought about the concept in Real Analysis of finding an interval small enough to fit inside (or outside) the set, and decided I wanted that idea to be in the game too, so I came up with being allowed to make several guesses on the same turn as long as you make your intervals go inwards. After playing it against myself a couple of times, I decided I should restrict the number of guesses to five so each turn didn’t go too long.

I briefly considered changing it so that you specified the endpoints of the interval you guess on each turn, but it lost the cool |x – b| < epsilon feel, so I abandoned that idea.

The game was almost complete, and just needed a name. Neighbourhood is a terminology they use in Real Analysis to describe an interval centred at a point, and we were using numbers, and I used alliteration already for the titles of the other games, so Number Neighbourhoods seemed like the most natural choice.

I played the game against myself a couple of times, and conscripted a student in the MLC to play with me too. Then I played with some students at a games night. These helped me to define what examples I needed to include in the rules. And that’s how I created the game of Number Neighbourhoods.