SChem
https://pypi.org/project/schem/. Install with pip install schem
Clean Room implementation of the backend of SpaceChem (https://www.zachtronics.com/spacechem).
Usage (CLI)
python -m schem [-h] [--version] [-l LEVEL_FILE] [--max-cycles MAX_CYCLES]
[--check-precog] [--max-precog-check-cycles MAX_PRECOG_CHECK_CYCLES]
[--seed SEED] [--hash-states HASH_STATES]
[--export] [--no-run] [--strict]
[--json | --verbose] [--debug [DEBUG]]
[solution_files ...]
E.g. python -m schem
will validate the cycles-reactors-symbols score of any solution export(s) in the user's clipboard. See python -m schem --help
for details.
Usage (python)
Supposing level_export
, solution_export
are strings as exported by SpaceChem CE:
from schem import Level, Solution
solution = Solution(solution_export)
solution = Solution(solution_export, level=level_export)
solution = Solution(solution_export, level=Level(level_export))
solution.run()
solution.expected_score
solution.reset()
solution.validate()
solution.is_precognitive()
solution.evaluate()
solution.evaluate(check_precog=True)
solution.export_str()