Knock out bugs until code turns over

Prior to this commit, there were still a lot of bugs that were
preventing the algorithm from running at all. Now, it runs without
crashing although the algorithm does not seem to be working as the
agent is never able to reduce its transition table.