This version is deprecated. LLS is now hosted on GitLab.
oscarcunningham / logic-life-search Goto Github PK
View Code? Open in Web Editor NEWCellular automata search program
License: MIT License
Cellular automata search program
License: MIT License
This version is deprecated. LLS is now hosted on GitLab.
I think I found (and fixed) a bug in the way rule dictionaries are parsed. Since I'm lazy, I'll just post a patch here instead of forking the repo and making a proper pull request:
diff --git a/lls b/lls
index 95c8414..16342eb 100755
--- a/lls
+++ b/lls
@@ -222,9 +222,10 @@ rule = src.LLS_rules.rule_from_rulestring(args.rule, indent = indent + 1, verbos
# Add "user_input_" to user's variable names, to prevent collisions"
if args.rule != None and args.rule.strip()[0] == "{":
for transition, literal in rule.items():
- variable, negated = variable_from_literal(literal)
- literal = negate("user_input_" + variable, negated)
- rule[transition] = literal
+ if literal not in ["0","1"]:
+ variable, negated = variable_from_literal(literal)
+ literal = negate("user_input_" + variable, negated)
+ rule[transition] = literal
if args.input_file_name:
#Check current directory and then search_pattern/
For both "--bg" and "--bgos" the help just says "Specify a background", and I can't find any description or comment in source code. What does it mean? I'm interested.
Also, doing -M0 (Knuth CNF formatting, I saw in the forums) vs -M1 (Life CNF formatting) gives different results (was fooling around):
dandan@Lenovo-H3060:~/Documents/logic-life-search$ ./lls --bg backgrounds/zebra -s p3 -a p1 -b 10 -M1
Getting search pattern...
Done
Preprocessing...
Done
Number of undetermined cells: 300
Number of variables: 902
Number of clauses: 41573
Active width: 10
Active height: 10
Active duration: 4
Solving...
Done
Time taken: 0.664324045181 seconds
x = 12, y = 12, rule = B3/S23
bbbbbbbbbbbb$
oooobboooooo$
bbboooobobbb$
obbbbbbboooo$
bobbboobobob$
obbbbbobobbo$
bbbbbbobooob$
obbbboobobbo$
bobbbobbooob$
obbbbboobbbo$
bbbobbbbbobb$
oooooooooooo!
dandan@Lenovo-H3060:~/Documents/logic-life-search$ ./lls --bg backgrounds/zebra -s p3 -a p1 -b 10 -M0
Getting search pattern...
Done
Preprocessing...
Done
Number of undetermined cells: 300
Number of variables: 6626
Number of clauses: 26577
Active width: 10
Active height: 10
Active duration: 4
Solving...
Done
Time taken: 0.010046005249 seconds
Unsatisfiable
dandan@Lenovo-H3060:~/Documents/logic-life-search$
(By the way I'm testitemqlstudop on conwaylife forums)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.