You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
743 B
37 lines
743 B
import autogolf
|
|
import sys
|
|
|
|
processes = 8
|
|
timeout = 5 # seconds
|
|
out_valid_prefix = "output/valid_scripts_"
|
|
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_valid_prefix=out_valid_prefix,
|
|
out_log=out_log,
|
|
)
|
|
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_valid_prefix=out_valid_prefix,
|
|
out_log=out_log,
|
|
)
|
|
print("Candidates:", successor)
|
|
|