Commit 859230b8 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

whittled down

parent 3c7f45bc
......@@ -10,12 +10,10 @@ import random
import time
EXPLORE = True
class Skython(object):
MAGIC_NUMBER = None #-12345
MAX_PROG_SIZE = 100
STEP_LIMIT = 150
STEP_LIMIT = 100
SHRINK = True
TRIM = 15
......@@ -292,7 +290,7 @@ class Skython(object):
def run(self, model_out, model_in=None, bound=50):
timeout = total = redundant = degen = 0
exact = 0
exact = 1
#lower_bound, upper_bound = 5, 15
if model_in is None:
......@@ -372,15 +370,16 @@ class Skython(object):
if __name__ == '__main__':
skyt = Skython()
# EXPLORE = True
EXPLORE = True
skyt.INSTRUCTIONS3 = [
'SWAB',
'PUSH', 'INC',
'ADD', 'DIV', 'MULT',
'NEG', 'XOR', 'LOCO_2', 'SWBC',
'ADD',
'NEG', 'XOR', #'LOCO_2', #'SWBC',
'PEEK',
'IFF', 'NOT', 'LOCO_1',
'JNE',
#'IFF', #'LOCO_0',
'JNE', #'JGTE',
]
skyt.ENABLED_CODES = [skyt.OP_CODE[x] for x in skyt.INSTRUCTIONS3] # random.sample(range(30), random.randint(12, 26))
......@@ -459,4 +458,4 @@ if __name__ == '__main__':
print [skyt.INSTRUCTIONS[x] for x in sorted(skyt.ENABLED_CODES)]
#skyt.run(model_out=[1,2,3,3,4,5], model_in=[4,3,1,3,5,2], bound=30)
#skyt.run(model_out=[19,23,37,37,42], model_in=[23,37,42,37,19], bound=35)
skyt.run(model_out=model_out, model_in=model_in, bound=50)
skyt.run(model_out=model_out, model_in=model_in, bound=15)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment