Pac-Man Proved NP-Hard
technologyreview.com
technologyreview.com
I'm sorry, but this is a sick and twisted version of Pac Man.
Entrants are required to write a controller for Ms Pacman or the ghosts using at least one computational intelligence technique. Entries are played against each other in a tournament.
It's a great way to get some experience with stuff like neural nets, evolutionary algorithms and so forth.
which raises the question - what is a game? is it the collection of all possible permutations of states allowed by the rules, as in the Pac-Man generalization or this extremely weird corner case SC scenario that requires extended amounts of sub-optimal play? If I -can- construct such a bizarre and entrenched StarCraft position, is it part of "the game", or is it a weird theoretical custom map whose sole purpose is proving starcraft is np-hard to "solve"
But at the same time it's fascinating that they were able to embed this sub-problem within a starcraft scenario, such that any optimal player would have to solve this NP-hard problem. This sort of argument is a classic in the field, and always fun to read.
NP-Complete just means that a correct solution can be evaluated in polynomial time by a deterministic Turing machine. It says nothing of the number of solutions that exist.
The author does not bring completion time into this at all. He reduces (a still NP-complete subset of) Hamiltonicity to the question of whether a Pac-Man level can be completed without dying.
To prove that A is NP-hard, you have to do the opposite. Show how you transform every instance of B into an instance of A, so that a solution of A implies a solution of B. Then if you had a solver for A, you could use it to solve B, which is impossible unless P=NP (since B is known to be NP-hard). In this case, you have to transform TSP to Pac-Man, not the other way around. Some technicalities aside (which are important, nevertheless), this is how hardness proofs go, sorry if it was a bit obscure.
Input: A, B : integers
Output: directed graph G(V, E, w) (V = vertices, E = edges, w = weight fn)
V = {c1, c2, c3}
E = {(c1, c2), (c2, c3), (c3, c1)}
w(c1, c2) = A
w(c2, c3) = B
w(c3, c1) = 0
shortest tour is the only valid tour whose length is clearly A + B.
Now it's clearer why he used a form of Pacman where pacman could only visit each node once, and why it's not as trivial as i made it seem.
Record 1 hour of input in a string. Run a block level compression algo on it, and order the compressed strings on size?
Wouldn't that give a measure of the amount of input required by the game, coupled with how much of that input repeats/has simple patterns?