A course in programming languages should teach students about the syntax and semantics of programming languages, as well as make them aware that a good choice of a programming language can often make a problem much easier to solve. This last point can best be made by giving students a problem that is much easier to solve in one language than in most others.The game of Mastermind is an excellent vehicle for doing this. It is easy to understand, fun to play, and wonderfully easy to program in APL. Mastermind has also been used to teach many concepts in combinatorics 5. This paper outlines how to program the game of Mastermind in APL. It also presents a strategy which is extremely simple but surprisingly effective.
/lp/association-for-computing-machinery/apl-and-mastermind-Q2zFKGVKgc