Mastermind

Interface for Mastermind will be simple--it will be exactly like interacting with a user over standard in. The user will put in the number of possible colors, followed by a space, followed by the number of pegs, followed by a line break. Your program prints out space separated guesses followed by line breaks. Once you guess, the mastermind program will print the number of pegs in the right place, followed by a space, followed by the number of correct colored pegs. Sample execution should go something like this:

You read-->5 4
Guess-->0 0 0 0
You read-->0 0
You guess-->1 0 0 0
You read-->1 1

And so on.

You can find a java program that will communicate with your program in this manner here. To run it, javac Mastermind.java, then call java Mastermind .

Note that .py, .class, and .jar files aren't executable--you might want to wrap those in a bash script or something.

TSP

Here is my sample TSP driver, as far as I can tell it works adequately.

Wumpus 2

List of commands and responses. Commands should be printed out and programs should scan for responses. (The key is telling you you have 1 key of type 0, 1 key of type 1, and so on)
Graph
1 2
2 3
3 4
End Graph
Keys
1
1
2
1
End Keys
KeyTable
1 3
3 1
End
Move command: Move 
Move response: At 
Trade commands:
Trade keyOffered keyDesired (Trade | Defect)
Response (Accept | Reject) keyOfferd keyDesired (Trade | Defect)
Here is the code for the Wumpus driver. There will be at least one bug in it, probably, despite me having tested it as best I can. Please let me know about the bugs as soon as possible.