At home, my resident software developer and I discuss data, tech and coding among other more domestic topics. These other topics include: what we’re going to have for dinner, why the purchase of a new shed was never part of the plan of action prior to destruction of the old one, and whether or not socks can ever really be said to be ‘temporarily resting’ on the living room floor; a whole other blog is needed to tackle these questions.
When discussing technical matters it’s interesting to note what we agree on, and where our mindsets differ.
One Christmas, we’re at my mother’s home with my brothers and, as is customary in my family, we are lapping up various puzzle supplements from the Christmas newspapers. I alight on a Futoshiki and get stuck in, and then get stuck.
Futoshiki according to Wikipedia: The puzzle is played on a square grid. The objective is to place the numbers such that each row and column contains only one of each digit. Some digits may be given at the start. Inequality constraints are initially specified between some of the squares, such that one must be higher or lower than its neighbor. These constraints must be honored in order to complete the puzzle.
Got it? Right, so I’m stuck and I can’t find the next logical deduction in the sequence. I ask software developer (SD) if he wants to help by taking a look at the Futoshiki with me. Despite previous suggestions that slightly more maturity and slightly less borderline racism might suit him better, SD replies ‘I think you’ll find it’s pronounced Fucko-shit-o’. Moving swiftly on, we establish that SD is not interested in puzzles of this kind. He finds them frustrating and feels no satisfaction upon completion, concluding that the only thing that can be learned from puzzles is how to get better at those puzzles, something of no use to anyone. He does however enjoy coding problems, and therefore looked at our puzzle problem as a classic case of ‘if something is worth doing, it’s worth coding a computer to do it for you’.
Thus started the race. I was to continue to try to solve the puzzle I was stuck on and complete it before SD wrote a programme that could solve any and all 5×5 Futoshiki grids. I won in terms of speed, although I had to use brute force on the logic at one point which felt like cheating. Unable to make a deduction I built scenarios for each of three options, following through until sure that two would fail, therefore confirming the correct path with the third. SD won in terms of comprehensiveness. His code used the brute force of computational power to run through every option for every row in a puzzle until it found the solution, thus providing a generalised solution. From my perspective his solution completely misses the joy of working through a puzzle yourself, from his perspective he had all the same fun in solving his own which also resulted in a concrete workable thing at the end of it.
Neither of us need to stop there with Futoshikis. I can continue to come to each puzzle fresh, perhaps even repeating ones in order to reduce the number of deductions needed to solve it. I could also move on to solving larger grids. SD could also tackle larger grids and the task of generalising a solution that solved grids of any size. At this point, victory potentially swings back in favour of the human analyst. I should be able to use the same deduction techniques again and again, larger grids will take more time but will still likely be doable until such time as I become bored or die. SD on the other hand will have to radically alter the brute force approach. Whilst computational power elegantly outweighs human endeavour for smaller grids, the processing time needed for such an approach on larger and larger grids multiplies exponentially. This means at some point he will have a large grid that, while still solvable, would take all the time between now and the heat death of the universe for the computer to complete. To avoid this, SD would need to figure out a far more sophisticated algorithm, one that (arguably) mimics human reasoning to a greater extent; some sort of artificial intelligence. So perhaps next Christmas, as I enjoy bending my brain with my Futoshiki, SD will try creating an artificial me to solve all possible ones.