ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Logic Life Search

For scripts to aid with computation or simulation in cellular automata.

Re: Logic Life Search

Postby Ian07 » December 4th, 2018, 8:03 pm

Does anyone know how to fix this error? It says "[Errno 13] Permission denied", and I'm pretty sure I did everything else correctly: I installed all the necessary packages, I installed Lingeling, extracted it, configured it, and put the folder inside the solvers directory. I'm also running Cygwin as an administrator.
Traceback (most recent call last):
  File "./lls", line 195, in <module>
    indent = indent, verbosity = verbosity
  File "/home/ionma/logic-life-search/src/LLS.py", line 61, in preprocess_solve_and_postprocess
    indent = indent, verbosity = verbosity
  File "/home/ionma/logic-life-search/src/LLS.py", line 175, in preprocess_and_solve
    indent = indent, verbosity = verbosity)
  File "/home/ionma/logic-life-search/src/LLS.py", line 246, in solve
    DIMACS_string, solver=solver, parameters=parameters, timeout=timeout, save_dimacs = save_dimacs, dry_run = dry_run, indent = indent + 1, verbosity = verbosity)
  File "/home/ionma/logic-life-search/src/LLS_SAT_solvers.py", line 48, in SAT_solve
    solution, time_taken = use_solver(solver, dimacs_file, parameters = parameters, timeout = timeout, indent = indent, verbosity = verbosity)
  File "/home/ionma/logic-life-search/src/LLS_SAT_solvers.py", line 86, in use_solver
    stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied


EDIT: I've now tried putting the application itself in the solvers folder on its own and it still gives the exact same error.

I've also tried setting the solver to lingeling.exe instead of just lingeling, which just says it can't find the solver:
Traceback (most recent call last):
  File "./lls", line 195, in <module>
    indent = indent, verbosity = verbosity
  File "/home/ionma/logic-life-search/src/LLS.py", line 61, in preprocess_solve_and_postprocess
    indent = indent, verbosity = verbosity
  File "/home/ionma/logic-life-search/src/LLS.py", line 175, in preprocess_and_solve
    indent = indent, verbosity = verbosity)
  File "/home/ionma/logic-life-search/src/LLS.py", line 246, in solve
    DIMACS_string, solver=solver, parameters=parameters, timeout=timeout, save_dimacs = save_dimacs, dry_run = dry_run, indent = indent + 1, verbosity = verbosity)
  File "/home/ionma/logic-life-search/src/LLS_SAT_solvers.py", line 32, in SAT_solve
    assert solver in solvers, "Solver not found"
AssertionError: Solver not found


Same deal for plingeling and treengeling.
Ian07
 
Posts: 213
Joined: September 22nd, 2018, 8:48 am

Re: Logic Life Search

Postby Macbi » December 4th, 2018, 8:27 pm

Ian07 wrote:Does anyone know how to fix this error? It says "[Errno 13] Permission denied", and I'm pretty sure I did everything else correctly: I installed all the necessary packages, I installed Lingeling, extracted it, configured it, and put the folder inside the solvers directory. I'm also running Cygwin as an administrator.
[...]

The problem is occurring when LLS tries to call Lingeling. LLS doesn't yet have permission to do this. I don't use Windows or Cygwin but I imagine the solution is something like the following
  • Right click on Lingeling
  • Go to "Properties"
  • Go to something like "Permissions" or "Security"
  • Allow Lingeling to excecute
I don't think you should have to be Administrator for LLS to work (you might have to be Administrator to change the permissions?). You're running LLS so as long as you yourself have permission to run Lingeling it should work fine.
User avatar
Macbi
 
Posts: 667
Joined: March 29th, 2009, 4:58 am

Re: Logic Life Search

Postby Ian07 » December 4th, 2018, 8:59 pm

Macbi wrote:The problem is occurring when LLS tries to call Lingeling. LLS doesn't yet have permission to do this. I don't use Windows or Cygwin but I imagine the solution is something like the following
  • Right click on Lingeling
  • Go to "Properties"
  • Go to something like "Permissions" or "Security"
  • Allow Lingeling to excecute
I don't think you should have to be Administrator for LLS to work (you might have to be Administrator to change the permissions?). You're running LLS so as long as you yourself have permission to run Lingeling it should work fine.


Hmm, according to the security panel I should already have full permissions for lingeling.exe :?
When I tried to run Lingeling directly to see what would happen, an error popped up saying:
The code execution cannot proceed because cygwin1.dll was not found. Reinstalling the program may fix this problem.

...even though I definitely already have the DLL in my Cygwin bin.
Ian07
 
Posts: 213
Joined: September 22nd, 2018, 8:48 am

Re: Logic Life Search

Postby Macbi » December 4th, 2018, 9:06 pm

Okay, well it looks like the problem is with Lingeling and Cygwin rather than with LLS. Sorry I can't help you more.

EDIT: A quick Google suggests that the problem might be that Cygwin isn't in your PATH variable.
User avatar
Macbi
 
Posts: 667
Joined: March 29th, 2009, 4:58 am

Re: Logic Life Search

Postby wildmyron » December 5th, 2018, 12:49 am

If Macbi's suggestion of checking cygwin's PATH variable doesn't solve your problem and you still can't get LLS to run, then you might like to try using LLS with the glucose binary I posted earlier in the thread. You don't need cygwin at all then, but you may wish to use it for Bash and the nicer console. Previously I used the console and Bash provided by MSYS (bundled with the mingw-w64 project) but since I moved to Win10 I've been using Ubuntu under Windows Subsystem for Linux which makes a lot of these cross platform compatibility issues a lot easier to deal with.

If you're not already, I'd also advise to switch to the develop branch on the LLS repository. @Macbi: Seeing as there's been a pause in development of LLS, it would be great if you could merge that branch with master.
The latest version of the 5S Project contains over 47,000 spaceships. Tabulated pages up to period 160 are available on the LifeWiki.
wildmyron
 
Posts: 1117
Joined: August 9th, 2013, 12:45 am

Re: Logic Life Search

Postby Ian07 » December 5th, 2018, 5:35 pm

wildmyron wrote:If Macbi's suggestion of checking cygwin's PATH variable doesn't solve your problem and you still can't get LLS to run, then you might like to try using LLS with the glucose binary I posted earlier in the thread. You don't need cygwin at all then, but you may wish to use it for Bash and the nicer console. Previously I used the console and Bash provided by MSYS (bundled with the mingw-w64 project) but since I moved to Win10 I've been using Ubuntu under Windows Subsystem for Linux which makes a lot of these cross platform compatibility issues a lot easier to deal with.

It worked, thanks!
$ ./lls -S glucose-syrup -m -b 16 6 -p 3 -x 0 -y 1

Getting search pattern...
Done

Preprocessing...
Done

Number of undetermined cells: 272
Number of variables: 416
Number of clauses: 36467

Active width: 16
Active height: 6
Active duration: 4

Solving...
Done

Time taken: 0.429523229599 seconds

x = 18, y = 8, rule = B3/S23
bbbbbbbbbbbbbbbbbb$
bboobbbbbbbbbbbbbb$
bobbbbobbbobbboobb$
bboooobboobbbbbbob$
bbbbbooboboobooobb$
bbbbbbbboobobbbbbb$
bbbbbbbbbbbbbbbbbb$
bbbbbbbbbbbbbbbbbb!


wildmyron wrote:If you're not already, I'd also advise to switch to the develop branch on the LLS repository.

Done.
Ian07
 
Posts: 213
Joined: September 22nd, 2018, 8:48 am

Re: Logic Life Search

Postby JohanB » December 22nd, 2018, 12:18 pm

Search for orphans (GoE's) does not seem to work.
**EDIT: found the solution, see at the bottom**

I run lls with the following command line

./lls -S glucose -v 3 --check_orphan GoE1.txt


and the this output:

Getting search pattern...
    Creating search pattern to see if file "GoE1.txt" contains an orphan...
        Reading file "GoE1.txt" ...
        Done

        Parsing input pattern...
        Done

        Pattern parsed as:
        *0100010**
        *101010110
        0100011001
        1010000010
        0110110000
        0000110110
        0100000101
        1001100010
        011010101*
        **0100010*



        Search pattern:
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'

        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'
        0',0',0'

    Done

    Standardising variable names...
    Done

Done

Preprocessing...
    Preparing search grid ...
    Done

    Enforcing evolution rule...
        Method: 1
        Number of clauses used: 0
    Done

    Converting to DIMACS format...
    Done

Number of undetermined cells: 0
Number of variables: 0
Number of clauses: 0

Active width: 0
Active height: 0
Active duration: 0

Solving...
    Preparing SAT solver input...
        Writing file "lls_dimacs3.cnf" ...
        Done

    Done

    Solving with "glucose" ... (Start time: Sat Dec 22 18:09:16 2018)
    Done

    Formatting SAT solver output...
        SAT solver output:
            c
            c This is glucose 4.0 --  based on MiniSAT (Many thanks to MiniSAT team)
            c
            c ========================================[ Problem Statistics ]===========================================
            c |                                                                                                       |
            c |  Number of variables:             0                                                                   |
            c |  Number of clauses:               0                                                                   |
            c |  Parse time:                   0.00 s                                                                 |
            c |                                                                                                       |
            c | Preprocesing is fully done
            c |  Simplification time:          0.00 s                                                                 |
            c |                                                                                                       |
            c ========================================[ MAGIC CONSTANTS ]==============================================
            c | Constants are supposed to work well together :-)                                                      |
            c | however, if you find better choices, please let us known...                                           |
            c |-------------------------------------------------------------------------------------------------------|
            c | Adapt dynamically the solver after 100000 conflicts (restarts, reduction strategies...)               |
            c |-------------------------------------------------------------------------------------------------------|
            c |                                |                                |                                     |
            c | - Restarts:                    | - Reduce Clause DB:            | - Minimize Asserting:               |
            c |   * LBD Queue    :     50      |   * First     :   2000         |    * size <  30                     |
            c |   * Trail  Queue :   5000      |   * Inc       :    300         |    * lbd  <   6                     |
            c |   * K            :   0.80      |   * Special   :   1000         |                                     |
            c |   * R            :   1.40      |   * Protected :  (lbd)< 30     |                                     |
            c |                                |                                |                                     |
            c ==================================[ Search Statistics (every  10000 conflicts) ]=========================
            c |                                                                                                       |
            c |          RESTARTS           |          ORIGINAL         |              LEARNT              | Progress |
            c |       NB   Blocked  Avg Cfc |    Vars  Clauses Literals |   Red   Learnts    LBD2  Removed |          |
            c =========================================================================================================
            c last restart ## conflicts  :  0 0
            c =========================================================================================================
            c restarts              : 1 (0 conflicts in avg)
            c blocked restarts      : 0 (multiple: 0)
            c last block at restart : 0
            c nb ReduceDB           : 0
            c nb removed Clauses    : 0
            c nb learnts DL2        : 0
            c nb learnts size 2     : 0
            c nb learnts size 1     : 0
            c conflicts             : 0              (-nan /sec)
            c decisions             : 1              (0.00 % random) (inf /sec)
            c propagations          : 0              (-nan /sec)
            c nb reduced Clauses    : 0
            c CPU time              : 0 s

            s SATISFIABLE
            v  0

        Error (if any): ""
        Time taken: 0.00165295600891
    Done

    Removing DIMACS file...
    Done

    Substituting solution back into search grid...
    Done

Done

Time taken: 0.00165295600891 seconds

Formatting output...
    Format: RLE
Done

x = 3, y = 12, rule = B3/S23
bbb$
bbb$
bbb$
bbb$
bbb$
bbb$
bbb$
bbb$
bbb$
bbb$
bbb$
bbb!



Obviously lls is not translating the input pattern correctly. How do I fix this?


EDIT
Never mind, found it.
The solution is to put comma's in the input file, like so

*,*,1,0,1,0,1.....
.....
JohanB
 
Posts: 16
Joined: June 10th, 2016, 11:59 pm

Re: Logic Life Search

Postby Macbi » December 23rd, 2018, 3:58 am

Right, anything not separated by commas or spaces is just a very long variable name.
User avatar
Macbi
 
Posts: 667
Joined: March 29th, 2009, 4:58 am

Re: Logic Life Search

Postby LaundryPizza03 » June 22nd, 2019, 12:55 am

I cloned LLS into a directory and attempted to run it from the command line. It demands some "/usr" directory that doesn't exist. What do I do?
[my]-iMac:logic-life-search [user]$ ./lls -S lingeling -m -b 16 6 -p 3 -x 0 -y 1
-bash: ./lls: /usr/bin/python2: bad interpreter: No such file or directory

I am running in Mac OS 10.14.2.
x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!

LaundryPizza03 at Wikipedia
User avatar
LaundryPizza03
 
Posts: 301
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Logic Life Search

Postby Macbi » June 22nd, 2019, 4:13 am

LaundryPizza03 wrote:I cloned LLS into a directory and attempted to run it from the command line. It demands some "/usr" directory that doesn't exist. What do I do?
[my]-iMac:logic-life-search [user]$ ./lls -S lingeling -m -b 16 6 -p 3 -x 0 -y 1
-bash: ./lls: /usr/bin/python2: bad interpreter: No such file or directory

I am running in Mac OS 10.14.2.

If you open lls in a text editor you'll see that the first line contains "/usr/bin/python2". You need to edit this to instead be wherever python2 lives on your machine. You should be able to find this out using one of the suggestions on this thread: https://stackoverflow.com/questions/6767283/find-where-python-is-installed-if-it-isnt-default-dir.

Alternatively you should be able to just run
python2 lls -S lingeling -m -b 16 6 -p 3 -x 0 -y 1
User avatar
Macbi
 
Posts: 667
Joined: March 29th, 2009, 4:58 am

Re: Logic Life Search

Postby LaundryPizza03 » June 22nd, 2019, 7:25 am

How do I eliminate subperiods, like you did in this post? I know that forcing a different number of cells after one subperiod will work, for obvious reasons, but this might not allow the full range of solutions.
x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!

LaundryPizza03 at Wikipedia
User avatar
LaundryPizza03
 
Posts: 301
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Logic Life Search

Postby testitemqlstudop » June 22nd, 2019, 7:47 am

Umm.. first of all you're using an outdated version of LLS. Use the "development" branch instead.

To enforce the symmetry of a period, use "-s p7" or "-s p11" or "-s p(period)".
To enforce the ASYMMETRY of a period (i.e. NOT this period), use "-a p1" or "-a p(a divisor of the period)". Normally "-a p1" is required for most searches.

The wiki's outdated
User avatar
testitemqlstudop
 
Posts: 766
Joined: July 21st, 2016, 11:45 am
Location: very very very very boats

Re: Logic Life Search

Postby Apple Bottom » June 22nd, 2019, 11:52 am

testitemqlstudop wrote:The wiki's outdated


If only there were a way to edit it...! ;)
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!
User avatar
Apple Bottom
 
Posts: 1024
Joined: July 27th, 2015, 2:06 pm

Re: Logic Life Search

Postby LaundryPizza03 » June 22nd, 2019, 5:13 pm

testitemqlstudop wrote:Umm.. first of all you're using an outdated version of LLS. Use the "development" branch instead.

To enforce the symmetry of a period, use "-s p7" or "-s p11" or "-s p(period)".
To enforce the ASYMMETRY of a period (i.e. NOT this period), use "-a p1" or "-a p(a divisor of the period)". Normally "-a p1" is required for most searches.

The wiki's outdated

Okay, so how do I find a spaceship with a particular displacement? The develop branch doesn't have such an option.
x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!

LaundryPizza03 at Wikipedia
User avatar
LaundryPizza03
 
Posts: 301
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Logic Life Search

Postby wildmyron » June 22nd, 2019, 9:17 pm

LaundryPizza03 wrote:Okay, so how do I find a spaceship with a particular displacement? The develop branch doesn't have such an option.

The displacement and glide reflection of a spaceship can be specified as part of the symmetry option. So to find a 2c/4 ship with glide reflection you can do:
./lls -p ">1" -s p4 "RE-" x2 -a p2 x1 -b [X] [Y]

and to find a 2c/4 ship with bilateral symmetry you can do:
./lls -p ">1" -s p4 x2 -s "D2-" -a p2 x1 -b [X] [Y]

In both cases the '-a p2 x1' option excludes c/2 ships with bilateral symmetry which would otherwise be valid solutions and '-p ">1"' enforces a non-empty ship (although not necessary when forcing an asymmetry as that would also exclude those solutions".

@Macbi: When I try to use the notation in the help, e.g. '-s "p4 RE- x2"' I get an error:
Getting search pattern...
Traceback (most recent call last):
  File "./lls", line 327, in <module>
    assert transformation in ["RE-","RE/","RE|","RE\\"], 'Symmetry argument "' + transformation + '" not recognized'
AssertionError: Symmetry argument "P4 X2 RE-" not recognized
The latest version of the 5S Project contains over 47,000 spaceships. Tabulated pages up to period 160 are available on the LifeWiki.
wildmyron
 
Posts: 1117
Joined: August 9th, 2013, 12:45 am

Re: Logic Life Search

Postby Macbi » June 23rd, 2019, 3:39 am

wildmyron wrote:@Macbi: When I try to use the notation in the help, e.g. '-s "p4 RE- x2"' I get an error:
Getting search pattern...
Traceback (most recent call last):
  File "./lls", line 327, in <module>
    assert transformation in ["RE-","RE/","RE|","RE\\"], 'Symmetry argument "' + transformation + '" not recognized'
AssertionError: Symmetry argument "P4 X2 RE-" not recognized
LLS is getting "p4 RE- x2" all as one argument, when it wants three distinct arguments. Simply removing the quotes fixes it for me:
$ ./lls -b11 -s p4 RE- x2 -c

Getting search pattern...
Done

Preprocessing...
Done

Number of undetermined cells: 451
Number of variables: 562
Number of clauses: 62374

Active width: 11
Active height: 11
Active duration: 5

Solving...
Done

Time taken: 0.86586022377 seconds

x = 13, y = 13, rule = B3/S23
bbbbbbbbbbbbb$
bbbbbbbbbbbbb$
bbbbbbboobbbb$
bbbbbooboobbb$
bbbbboooobbbb$
bbbbbboobbbbb$
bbbbbbbbbbbbb$
bbbbbboobbbbb$
bbbbboooobbbb$
bbbbbooboobbb$
bbbbbbboobbbb$
bbbbbbbbbbbbb$
bbbbbbbbbbbbb!

User avatar
Macbi
 
Posts: 667
Joined: March 29th, 2009, 4:58 am

Previous

Return to Scripts

Who is online

Users browsing this forum: No registered users and 2 guests