Our ICFP compiler passed the language test but fell apart on more complicated uses of the apply operator. We decided to made use of the echo service to evaluate the programs for us instead.
Erlang's Digraph helped out a lot here to work out a solution that basically divided the board into clusters of dots, and then moved the player to the smaller / closest cluster of points and chewed through them.
lambdaman21
was an exception, which we built an interactive terminal video game interface for to solve by hand using WASD
This led to some questionable undercooking of our shell to make work, please don't tell the health department:
stty -echo -cooked; mix run -e 'LambdaMan.interactive(21)'; stty echo cooked
This read from the saved "/priv/lambdaman/21.txt" problem file, and wrote movements to "/priv/lambdaman/21_solution.txt" (which we then submitted by hand).
In lieu of writing a compiler / compressor for solutions, we stuck with our strategy of re-purpose when possible. For the lambdaman6
, we took the problem, removed the concat and changed the string from "." to "R"
https://github.com/JEG2/nixie_tubes/blob/main/lib/nixie_tubes/spaceship.ex
Our algorithm was basically take one point at a time, accelerate to the half way point, decelerate the other half of the way. Surprisingly this worked for every problem on the board.
Goodness gracious, what a fun game.
Continuing in the theme of taking advantage of the tools available, we made use of the test service to walk through our programs instead of building a visualizer, and solved the two of these we managed to solve by hand in emacs. Thank the gods for rectangular selections.
Our by hand scratch pads are: https://github.com/JEG2/nixie_tubes/blob/main/lib/nixie_tubes/absolute_value.txt
This was also by hand, with a bit of reverse engineering. TODO: study lambda calculus before next year.
school_interface -- higher level utility for talking to the service
solver -- an attempt at something that would iterate over problems from the API and retry ones that we didn't have the best score for, which we used to great success for Spaceship
submitomatic -- the api wrapper