ec
ec copied to clipboard
Python enumeration with contextual grammar network?
Since Python enumeration was resurrected for Puddleworld - I'm hitting an error now that makes me suspect that python enumeration doesn't work for the ContextualGrammarNetwork, given how primitive indices are stored?
Traceback (most recent call last): File "../ec/dreamcoder/enumeration.py", line 230, in _f r = f(*a, **k) File "../ec/dreamcoder/enumeration.py", line 366, in solveForTask_python lowerBound=lowerBound, upperBound=upperBound) File "../ec/dreamcoder/enumeration.py", line 409, in enumerateForTasks lowerBound=previousBudget): File "../ec/dreamcoder/grammar.py", line 1161, in enumeration maximumDepth=maximumDepth): File "../ec/dreamcoder/grammar.py", line 1182, in enumeration maximumDepth=maximumDepth - 1): File "../ec/dreamcoder/grammar.py", line 1215, in enumerateApplication maximumDepth=maximumDepth): File "../ec/dreamcoder/grammar.py", line 1182, in enumeration maximumDepth=maximumDepth - 1): File "../ec/dreamcoder/grammar.py", line 1227, in enumerateApplication argumentIndex=argumentIndex + 1): File "../ec/dreamcoder/grammar.py", line 1215, in enumerateApplication maximumDepth=maximumDepth): File "../ec/dreamcoder/grammar.py", line 1161, in enumeration maximumDepth=maximumDepth): File "../ec/dreamcoder/grammar.py", line 1166, in enumeration else: g = self.library[parent][parentIndex] TypeError: list indices must be integers or slices, not Primitive
Bug should be fixed, but let me know if it doesn't work.