38 lines
859 B
Python
38 lines
859 B
Python
|
import autogolf
|
||
|
import sys
|
||
|
|
||
|
with open("output/invalid_scripts", "w") as out_invalid:
|
||
|
processes = 8
|
||
|
timeout = 5 # seconds
|
||
|
out_log = sys.stdout
|
||
|
|
||
|
print("\nSearching for identity")
|
||
|
identity = autogolf.find_script(
|
||
|
(
|
||
|
("1", "1"),
|
||
|
("42", "42"),
|
||
|
("1984", "1984"),
|
||
|
),
|
||
|
max_length=3,
|
||
|
processes=processes,
|
||
|
timeout=timeout,
|
||
|
out_log=out_log,
|
||
|
out_invalid=out_invalid
|
||
|
)
|
||
|
print("Candidates:", identity)
|
||
|
|
||
|
print("\nSearching for successor")
|
||
|
successor = autogolf.find_script(
|
||
|
(
|
||
|
("1", "2"),
|
||
|
("42", "43"),
|
||
|
("1984", "1985"),
|
||
|
),
|
||
|
max_length=5,
|
||
|
processes=processes,
|
||
|
timeout=timeout,
|
||
|
out_log=out_log,
|
||
|
out_invalid=out_invalid
|
||
|
)
|
||
|
print("Candidates:", successor)
|