1
$\begingroup$

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.

  1. 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.
  2. Separation between UI and logic: So that we can replace the interface (UI), with a code.
  3. 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.

$\endgroup$
6
  • 1
    $\begingroup$ I don't understand what the third point has to do with puzzles. Project Euler has great puzzles, for instance, but they are language-agnostic. $\endgroup$
    – Ben I.
    Jun 16, 2018 at 10:45
  • 1
    $\begingroup$ I'm guessing that you mean, but don't say, you want programs for puzzles where a human user is currently the solver, but that might be amenable to replacing that with an automated or AI solver instead. If that is correct, you might stress it more in the question. $\endgroup$
    – Buffy
    Jun 16, 2018 at 10:59
  • $\begingroup$ This strikes me as too broad, because there's no actual question here or problem to be solved. You're asking for a list of games that fit your criteria. Questions that ask for lists aren't a good fit for the Stack Exchange Q&A format because there's no real question and there's no way to judge the "best" answer, so voting fails to be useful. This question could be improved by adding what you want to use these games for, giving us the larger context that you'll be using these games in. $\endgroup$
    – thesecretmaster
    Jun 16, 2018 at 13:10
  • $\begingroup$ @thesecretmaster yes it may be a list question, but I think it can work. It is bounded. Only implementations that fit the criteria. My hope is no find one or two collections. $\endgroup$ Jun 16, 2018 at 14:06
  • 1
    $\begingroup$ @Ben Point 3 allows the view and controller to be re-written, as an AI. $\endgroup$ Jun 16, 2018 at 14:08

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.