Looking for puzzle/game programmes, so students can write solvers I was playing some logic puzzles, and was thinking that they would be good for students to program solvers, that can be plugged in to the game logic.

Some of the quantities to make them useful, in order of importance, would be.


Free Software (Open Source): So that we have the freedom to use them how we want, to make changes, and to share our changes with others.
Separation between UI and logic: So that we can replace the interface (UI), with a code.
Model View Controller: to that we can have both the UI and the code solver, and a change in one will be reflected in the other.


Something that has good automated testing should pass point 2 (probably).

To clarify: 
I want programs(implementations) of puzzles where a human user is currently the solver, but that might be amenable to replacing that with an automated or AI solver instead.

I am not thinking of real AI (i.e. strategy), but puzzle games such a sudoko, net-route, towers, black-box, magnets, (see https://chris.boyle.name/projects/android-puzzles ).

The concepts I am teaching is just programming. The makes are to add motivation. There may be other benefits, I am sure that it could help with logical thinking, but the main reason is just motivation / engagement.
There is a fairly well known game called, alternatively, Hare and Hounds or the French Military Game. It is a two person game in which one player controls one piece (the Crook/Spy) and the other controls three pieces (the Police). The object is for the Police to "trap" the Spy. The board is a directed graph with limitations on movement. 

There is a well known solution for automating the Spy so that it plays optimally, though naively at first, learning from subsequent plays. I believe there is a known "win" for the Spy if it plays correctly. 

A Java program for the automated version can be found at the Green Room. The implementation can use either arrays or Collections. 

The thing that makes it interesting as a program is that the game is simple enough that a complete play (all positions of all players) can be captured in a very compact way, making it feasible to retain the complete history of plays. 

The game and its solution are also discussed in detail in Beyond Karel J Robot by J Bergin.