Add a curses front-end. This is looking good now!
And clean up some logic in `rule.py`. This is the place where the "brains" of Copycat really live, it seems; Copycat can only succeed at solving a puzzle if it can take the `Rule` it deduced and apply it to the target string to produce a new string. And it can only do that if the necessary *actions* have been programmed into `rule.py`. Right now, it explicitly can't deal with "rules" that involve more than one local change; that involve reversal; or more importantly, IIUC, rules that involve "ascending runs", because the idea of a successor-group is(?) known to the Slipnet but not to `rule.py`; the latter deals only in "strings", not in "workspace objects". This seems like a major flaw in the system... but maybe I'm missing something.
This commit is contained in:
@ -32,7 +32,7 @@ class Workspace(object):
|
||||
self.reset()
|
||||
|
||||
def reset(self):
|
||||
self.foundAnswer = False
|
||||
self.finalAnswer = None
|
||||
self.changedObject = None
|
||||
self.objects = []
|
||||
self.structures = []
|
||||
|
||||
Reference in New Issue
Block a user