This repository contains my submission for GSA ULTRA 2018.
Each problem is its own Python package. Solution functions are not run directly
but rather through the comprehensive unit testing framework. Each problem's
unit tests can be found in the package directory in a file named
test_[problem_id].py
. These tests can be run using
pytest, either for individual problems
or the entire crossword (see below).
The solutions themselves can be found in the same directory within the
solutions.py
file. Some problems also have a pathological.py
file used for
generating worst-case examples.
Each solutions.py
file has a short explanation of the approach taken.
Problem statements can be found in the README files of the respective directories. A list is given below.
- 1. Hello world
- 5. Recreation through recreating
- 7. A cryptic crossword clue
- 10. Horse-chestnutting around
- 12. Mission Demolition
- 1. Having a ball
- 2. Flower power
- 3. Fearful symmetry
- 4. Fibonarcos
- 6. Alan and Ada
- 8. Barb the builder
- 9. Truly a mazing mouse
- 11. Squared away
Per the competition rules, the examples run in a Python 3.4 environment.
This can be set up e.g. with 'conda:
conda create -n ultra python=3.4
The required packages (essentially just pytest) can then be installed with:
pip install -r requirements.txt
Tests can then be run for individual problems:
pytest crossword/[direction]/[problem_id]/
Or for the entire crossword:
pytest crossword/