BlackBox Puzzle 31
You can find the blog post in which I share my line of thought here:
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.
get_it_all.py: get the output for all possible input combinations and write it to the csv file
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
- Install Python 3
- Create a virtual environment:
python -m venv venvor
python3 -m venv venv
- Activate the virtual environment: (linux/mac)
source ./venv/bin/activateor (win)
- Install dependencies:
pip install -r requirements.txt
Jupyter, Pandas, Seaborn etc.