Skip to content
Jupyter Notebook Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
get_it_all.py
lamp2-heatmaps.py
puzzle31-binary.csv
puzzle31-lamp2-2downs.csv
puzzle31-lamp2-3downs.csv
puzzle31.csv
puzzle31.ipynb
puzzle31.ods
requirements.txt

README.md

BlackBox Puzzle 31

You can find the blog post in which I share my line of thought here:
https://testingcurve.wordpress.com/2019/04/28/solving-black-box-puzzle-31-with-data-analysis/

The puzzle

James Lyndsay has created a number of BlackBox Puzzles. Puzzle 31 is one of the puzzles with both a GUI and an API.

The plan

When exploring a BlackBox Puzzle through the GUI, you start from the input, observe the output, and try to find a pattern. Based on that pattern you form one or more hypotheses, which feedback into your exploration.

Using the API, however, allows you to get the output for all possible combinations of inputs (there are 512 for puzzle 31). Or rather, it allows you to do so more easily than through the GUI. Once you have that dataset, you can explore it starting from the output, from a range of inputs, etc.

Disclaimer: I knew the simple principle this puzzle adheres to before looking into this API/data analysis approach.

This repo

Contents

  • get_it_all.py: get the output for all possible input combinations and write it to the csv file puzzle31.csv
  • puzzle31.csv: all input combinations and their output
  • puzzle31.ods: LibreOffice Calc sheet using tables, conditional formatting and filters to solve the puzzle
  • puzzle31.ipynb: Jupyter notebook, run with jupyter notebook puzzle31.ipynb

Setup

  • Install Python 3
  • Create a virtual environment: python -m venv venv or python3 -m venv venv
  • Activate the virtual environment: (linux/mac) source ./venv/bin/activate or (win) venv\Scripts\activate
  • Install dependencies: pip install -r requirements.txt

Resources

Jupyter, Pandas, Seaborn etc.

You can’t perform that action at this time.