5x5x5, 6x6x6, 7x7x7 or NxNxN solvers

So i installed two days ago on my raspberry pi and the solver did a great job. But I ran out of memory ( I had 8gb) and today I bought a 32 one, and install again the solver, the color resolver and the color tracker. Everything work fine, but when attempt to solve the cube (any cube), give me this error: Cant import pyhashxx; No file named pyhashxx
 
Last edited:
Sorry for being slow to reply. You can do “sudo pip3 install pyhashxx” and that should fix it. I updated the install instructions in the readme to include this step.
 
dwalton76,
Great work!
Several years ago I was able to make a 3x3x3 solver in C++. More recently, I've been using Python on the Raspberry Pi and am interested in getting a solver working. I'm using a Raspberry Pi 3 with 32 GB microSD.

I was able to download your NxNxN solver and get the 3x3x3 and 4x4x4 solver running smoothly. I'm having trouble generating the 5x5x5 lookup tables. I've read through the README.md file and compiled the rotate program, but, am not able to get the builder program to work. when I run with
./builder.py --cores 1 --depth 10 --type 5x5x5-B-centers-solve-unstaged
it returns a "Permission Denied" message.
Do you have any suggestions as to what can be done to fix this problem?
Below is my current directory.

pi@raspberrypi:~/rubiks-cube-NxNxN-solver $ ls -l
total 842392
drwxr-xr-x 5 root root 4096 Jul 12 10:55 build
-rw-r--r-- 1 pi pi 27612 Jul 13 11:21 builder555.py
-rw-r--r-- 1 pi pi 7277008 Jul 13 11:23 builder555ss.py
-rw-r--r-- 1 pi pi 1644626 Jul 13 00:51 builder666.py
-rw-r--r-- 1 pi pi 186496782 Jul 12 13:32 builder666ss.py
-rw-r--r-- 1 pi pi 3129039 Jul 12 13:32 builder666ss.py.gz
-rw-r--r-- 1 pi pi 37220 Jul 13 13:02 buildercore.py
-rw-r--r-- 1 pi pi 8160 Jul 13 12:55 builder-crunch-workq.c
-rw-r--r-- 1 pi pi 48211 Jul 13 12:56 builder-crunch-workq.py
-rw-r--r-- 1 pi pi 4319 Jul 13 12:57 builder-find-new-edges-pattern-states.py
-rw-r--r-- 1 pi pi 4070 Jul 13 13:01 builder-find-new-states.py
-rw-r--r-- 1 pi pi 81793 Jul 13 01:03 builder.py
-rw-r--r-- 1 pi pi 3123 Jul 13 13:03 builderui.py
drwxr-xr-x 2 pi pi 4096 Jul 12 10:58 cache
drwxr-xr-x 2 root root 4096 Jul 12 10:55 dist
-rw-r--r-- 1 pi pi 1336 Jul 13 12:54 gitignore.txt
-rw-r--r-- 1 pi pi 35141 Jul 12 10:54 LICENSE
-rw-r--r-- 1 pi pi 34028370 Jul 12 10:56 lookup-table-4x4x4-step10-ULFRBD-centers-stage.txt
-rw-r--r-- 1 pi pi 552269325 Jul 12 10:56 lookup-table-4x4x4-step110-edges.txt
-rw-r--r-- 1 pi pi 16711681 Jul 12 10:56 lookup-table-4x4x4-step11-UD-centers-stage.cost-only.txt
-rw-r--r-- 1 pi pi 16711681 Jul 12 10:56 lookup-table-4x4x4-step12-LR-centers-stage.cost-only.txt
-rw-r--r-- 1 pi pi 16711681 Jul 12 10:56 lookup-table-4x4x4-step13-FB-centers-stage.cost-only.txt
-rw-r--r-- 1 pi pi 21609000 Jul 12 10:56 lookup-table-4x4x4-step30-ULFRBD-centers-solve.txt
-rw-r--r-- 1 pi pi 2279 Jul 13 12:54 Makefile.txt
drwxr-xr-x 2 pi pi 4096 Jul 12 10:54 misc
drwxr-xr-x 2 pi pi 4096 Jul 13 14:19 NewTemp
-rw-r--r-- 1 pi pi 100360 Jul 13 13:03 process-workq-results.py
-rw-r--r-- 1 pi pi 9028 Jul 12 10:54 README.md
-rw-r--r-- 1 pi pi 15097 Jul 13 13:04 repopulate-workq.py
-rwxr-xr-x 1 pi pi 1593964 Jul 13 01:00 rotate
-rw-r--r-- 1 pi pi 127445 Jul 13 00:36 rotate.c
-rw-r--r-- 1 pi pi 658463 Jul 12 23:25 rotate_char_xxx.c
-rw-r--r-- 1 pi pi 551 Jul 12 23:33 rotate_char_xxx.h
-rw-r--r-- 1 pi pi 2440364 Jul 12 23:22 rotate_xxx.c
-rw-r--r-- 1 pi pi 755 Jul 13 00:38 rotate_xxx.h
-rw-r--r-- 1 pi pi 693662 Jul 13 00:41 rotate_xxx.py
drwxr-xr-x 2 pi pi 4096 Jul 12 10:54 rubikscubennnsolver
drwxr-xr-x 2 root root 4096 Jul 12 10:55 rubikscubennnsolver.egg-info
-rw-r--r-- 1 pi pi 438 Jul 12 10:54 setup.py
drwxr-xr-x 3 pi pi 4096 Jul 12 10:54 usr
drwxr-xr-x 2 pi pi 4096 Jul 12 10:54 utils
-rw-r--r-- 1 pi pi 7270 Jul 13 00:43 write_keepers.py
drwxr-xr-x 2 pi pi 4096 Jul 12 10:54 www
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $ ./builder.py --cores 1 --depth 10 --type 5x5x5-B-centers-solve-unstaged
bash: ./builder.py: Permission denied


Thanks!
 
dwalton76,
I've read through the README.md file and compiled the rotate program, but, am not able to get the builder program to work. when I run with
./builder.py --cores 1 --depth 10 --type 5x5x5-B-centers-solve-unstaged
it returns a "Permission Denied" message.
Do you have any suggestions as to what can be done to fix this problem?

Hey SteveCuber, you just need to make the file executable via "chmod 755 builder.py". FYI on the rubiks-cube-lookup-tables repo though:
You may have to tweak some things to get the latest version of the solver to run on a RaspberryPi if you are solving anything larger than a 5x5x5. The reason being the solver now reads the lookup-tables into memory to speed things up, it used to binary search through the lookup-tables on the disk but the disk IO was a huge bottleneck. If you go through and comment out all of the "preload_cache()" calls it will read the tables from disk but will be slower.
 
I have two older systems that I haven't been using lately. Was thinking I could offer them to make lookup tables. With access to a 12 core system, sounds like you don't need it!

The 4x4x4 solve worked well. The 5x5x5 had a memory allocation problem when ran on the raspberry pi 3. It sounds like this will only get worse with bigger cubes. I have an old dual boot laptop. Will try and see if I can get it running on Ubuntu.
 
Thanks! I dusted off my dual system laptop to find out that the Ubuntu side is corrupt. Will need to rebuild before going further with Ubuntu.

One thing I had heard, but never verified, is that that background desktop image of the Raspberry Pi can take a fair amount of memory. I changed the desktop to the "No background" option and the solver ran further. Now it stops when looking for a file 'lookup-table-5x5x5-step40-LR-t-centers-solve.txt'. This file is the in my directory and it is also not in "rubiks-cube-lookup-tables-5x5x5" on github. If this file is needed, can you post to github?

I'm sure you can interpret the warnings better than I can. Below is a part of the printout when the 5x5x5 is ran. I hope it can be of help.

****************
Location: https://media.githubusercontent.com...able-5x5x5-step30-ULFRBD-centers-solve.txt.gz [following]
--2018-07-18 09:53:20-- https://media.githubusercontent.com...able-5x5x5-step30-ULFRBD-centers-solve.txt.gz
Resolving media.githubusercontent.com (media.githubusercontent.com)... 151.101.188.133
Connecting to media.githubusercontent.com (media.githubusercontent.com)|151.101.188.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 757460 (740K) [application/octet-stream]
Saving to: ‘lookup-table-5x5x5-step30-ULFRBD-centers-solve.txt.gz’

lookup-table-5x5x5-step30-ULFRBD-centers-solve.txt.gz 100%[================================================================================================================================>] 739.71K --.-KB/s in 0.1s

2018-07-18 09:53:20 (5.69 MB/s) - ‘lookup-table-5x5x5-step30-ULFRBD-centers-solve.txt.gz’ saved [757460/757460]

2018-07-18 09:53:20,847 LookupTable.py WARNING: gunzip lookup-table-5x5x5-step30-ULFRBD-centers-solve.txt.gz
2018-07-18 09:53:21,088 LookupTable.py WARNING: 5x5x5-step30-ULFRBD-centers-solve: begin preload cache
2018-07-18 09:53:22,235 LookupTable.py WARNING: 5x5x5-step30-ULFRBD-centers-solve: end preload cache (3,145,780 bytes)
2018-07-18 09:53:22,241 LookupTable.py WARNING: 5x5x5-step101-stage-second-four-edges: begin preload cache
2018-07-18 09:53:25,145 LookupTable.py WARNING: 5x5x5-step101-stage-second-four-edges: end preload cache (6,291,508 bytes)
2018-07-18 09:53:25,154 LookupTable.py INFO: Downloading table via 'wget https://github.com/dwalton76/rubiks...-table-5x5x5-step40-LR-t-centers-solve.txt.gz'
--2018-07-18 09:53:25-- https://github.com/dwalton76/rubiks...-table-5x5x5-step40-LR-t-centers-solve.txt.gz
Resolving github.com (github.com)... 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-07-18 09:53:25 ERROR 404: Not Found.

2018-07-18 09:53:25,687 LookupTable.py WARNING: gunzip lookup-table-5x5x5-step40-LR-t-centers-solve.txt.gz
gzip: lookup-table-5x5x5-step40-LR-t-centers-solve.txt.gz: No such file or directory
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 388, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3863, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3723, in group_centers
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1201, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1018, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 900, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 221, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 'lookup-table-5x5x5-step40-LR-t-centers-solve.txt'
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $
 
You can ignore the warnings...I need to change the loglevel on those that is misleading.

Can you try the following? This should fix the lookup-table-5x5x5-step40-LR-t-centers-solve.txt error
Code:
$ cd ~/rubiks-cube-NxNxN-solver
$ git pull
$ sudo python3 setup.py install

I added memory requirements to the README...in a nutshell 4x4x4 takes 1G, 5x5x5 takes 600M, etc. I should be able to bring the memory requirements down some more though.
 
You can ignore the warnings...I need to change the loglevel on those that is misleading.

Can you try the following? This should fix the lookup-table-5x5x5-step40-LR-t-centers-solve.txt error
Code:
$ cd ~/rubiks-cube-NxNxN-solver
$ git pull
$ sudo python3 setup.py install

I added memory requirements to the README...in a nutshell 4x4x4 takes 1G, 5x5x5 takes 600M, etc. I should be able to bring the memory requirements down some more though.

Thanks for the quick response.
Unfortunately, was not able to solve the 5x5x5. I went back to verify smaller cubes. The 3x3x3 worked, but, the 4x4x4 (which previously solved) did not solve.
Below are partial outputs of the 5x5x5 then the 4x4x4.
I have a question on the memory requirements. Is 1 Gig required for the 4x4x4 and 600 Meg total required for the 5x5x5 or is it 1.6 G?

*************
The 5x5x5 is below:
2018-07-18 18:22:39,264 __init__.py INFO: B B L R F
2018-07-18 18:22:39,264 __init__.py INFO:
2018-07-18 18:22:39,264 __init__.py INFO:
2018-07-18 18:22:39,284 LookupTable.py WARNING: 5x5x5-step11-UD-centers-stage-t-center-only.cost-only: begin preload cost-only
2018-07-18 18:22:40,002 LookupTable.py WARNING: 5x5x5-step11-UD-centers-stage-t-center-only.cost-only: end preload cost-only (7,632 bytes delta, 32,536 bytes total)
2018-07-18 18:22:40,004 LookupTable.py WARNING: 5x5x5-step12-UD-centers-stage-x-center-only.cost-only: begin preload cost-only
2018-07-18 18:22:40,720 LookupTable.py WARNING: 5x5x5-step12-UD-centers-stage-x-center-only.cost-only: end preload cost-only (16,368 bytes delta, 48,904 bytes total)
2018-07-18 18:22:40,725 LookupTable.py WARNING: 5x5x5-step10-UD-centers-stage: begin preload cache string
2018-07-18 18:22:56,194 LookupTable.py WARNING: 5x5x5-step10-UD-centers-stage: end preload cache string (340,868 bytes delta, 389,772 bytes total)
2018-07-18 18:22:56,224 LookupTable.py WARNING: 5x5x5-step21-LR-t-centers-stage: begin preload cache dict
2018-07-18 18:22:56,372 LookupTable.py WARNING: 5x5x5-step21-LR-t-centers-stage: end preload cache dict (0 bytes delta, 389,856 bytes total)
2018-07-18 18:22:56,373 LookupTable.py WARNING: 5x5x5-step22-LR-x-centers-stage: begin preload cache dict
2018-07-18 18:22:56,464 LookupTable.py WARNING: 5x5x5-step22-LR-x-centers-stage: end preload cache dict (592 bytes delta, 390,448 bytes total)
2018-07-18 18:22:56,464 LookupTable.py WARNING: 5x5x5-step20-LR-centers-stage: begin preload cache dict
2018-07-18 18:22:56,768 LookupTable.py WARNING: 5x5x5-step20-LR-centers-stage: end preload cache dict (4,436 bytes delta, 394,884 bytes total)
2018-07-18 18:22:56,776 LookupTable.py WARNING: 5x5x5-step31-UL-centers-solve.hash-cost-only: begin preload cost-only
2018-07-18 18:22:58,868 LookupTable.py WARNING: 5x5x5-step31-UL-centers-solve.hash-cost-only: end preload cost-only (45,980 bytes delta, 440,864 bytes total)
2018-07-18 18:22:58,889 LookupTable.py INFO: Downloading table via 'wget https://github.com/dwalton76/rubiks...able-5x5x5-step30-ULFRBD-centers-solve.txt.gz'
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 378, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3886, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1297, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1103, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 669, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 840, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 222, in __init__
File "/usr/lib/python3.5/subprocess.py", line 247, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1221, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $

********
The 4x4x4 is below:
2018-07-18 18:28:45,161 __init__.py INFO: R U F U
2018-07-18 18:28:45,161 __init__.py INFO:
2018-07-18 18:28:45,161 __init__.py INFO:
2018-07-18 18:28:45,165 LookupTable.py WARNING: 4x4x4-step11-UD-centers-stage.cost-only: begin preload cost-only
2018-07-18 18:28:45,885 LookupTable.py WARNING: 4x4x4-step11-UD-centers-stage.cost-only: end preload cost-only (6,084 bytes delta, 29,688 bytes total)
2018-07-18 18:28:45,887 LookupTable.py WARNING: 4x4x4-step12-LR-centers-stage.cost-only: begin preload cost-only
2018-07-18 18:28:46,607 LookupTable.py WARNING: 4x4x4-step12-LR-centers-stage.cost-only: end preload cost-only (16,368 bytes delta, 46,056 bytes total)
2018-07-18 18:28:46,609 LookupTable.py WARNING: 4x4x4-step13-FB-centers-stage.cost-only: begin preload cost-only
2018-07-18 18:28:47,325 LookupTable.py WARNING: 4x4x4-step13-FB-centers-stage.cost-only: end preload cost-only (16,368 bytes delta, 62,424 bytes total)
2018-07-18 18:28:47,329 LookupTable.py WARNING: 4x4x4-step10-ULFRBD-centers-stage: begin preload cache set
2018-07-18 18:28:50,376 LookupTable.py WARNING: 4x4x4-step10-ULFRBD-centers-stage: end preload cache set (68,888 bytes delta, 131,312 bytes total)
2018-07-18 18:28:50,445 LookupTable.py WARNING: 4x4x4-step20-highlow-edges: begin preload cache string
2018-07-18 18:28:58,346 LookupTable.py WARNING: 4x4x4-step20-highlow-edges: end preload cache string (166,676 bytes delta, 297,988 bytes total)
2018-07-18 18:28:58,348 LookupTable.py WARNING: 4x4x4-step31-reduce333-edges.hash-cost-only: begin preload cost-only
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 378, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3886, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 1384, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 1377, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 875, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 806, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 770, in __init__
MemoryError
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $

You can ignore the warnings...I need to change the loglevel on those that is misleading.

Can you try the following? This should fix the lookup-table-5x5x5-step40-LR-t-centers-solve.txt error
Code:
$ cd ~/rubiks-cube-NxNxN-solver
$ git pull
$ sudo python3 setup.py install

I added memory requirements to the README...in a nutshell 4x4x4 takes 1G, 5x5x5 takes 600M, etc. I should be able to bring the memory requirements down some more though.

I sent a reply a moment ago, but, it is under moderator review at the moment. The message (without the solver output) is:
Thanks for the quick response.
Unfortunately, was not able to solve the 5x5x5. I went back to verify smaller cubes. The 3x3x3 worked, but, the 4x4x4 (which previously solved) did not solve.
Below are partial outputs of the 5x5x5 then the 4x4x4.
I have a question on the memory requirements. Is 1 Gig required for the 4x4x4 and 600 Meg total required for the 5x5x5 or is it 1.6 G?

Part of the output from the 4x4x4 is below:

*********************
2018-07-18 18:28:58,346 LookupTable.py WARNING: 4x4x4-step20-highlow-edges: end preload cache string (166,676 bytes delta, 297,988 bytes total)
2018-07-18 18:28:58,348 LookupTable.py WARNING: 4x4x4-step31-reduce333-edges.hash-cost-only: begin preload cost-only
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 378, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3886, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 1384, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 1377, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 875, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 806, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 770, in __init__
MemoryError
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $

Part of the output from the 5x5x5 is below:
*****
2018-07-18 18:34:53,367 LookupTable.py WARNING: 5x5x5-step31-UL-centers-solve.hash-cost-only: end preload cost-only (46,848 bytes delta, 438,504 bytes total)
2018-07-18 18:34:53,378 LookupTable.py INFO: Downloading table via 'wget https://github.com/dwalton76/rubiks...able-5x5x5-step30-ULFRBD-centers-solve.txt.gz'
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 378, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3886, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1297, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1103, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 669, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 840, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 222, in __init__
File "/usr/lib/python3.5/subprocess.py", line 247, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1221, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $

A small part of the 5x5x5 is below:
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 669, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 840, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 222, in __init__
File "/usr/lib/python3.5/subprocess.py", line 247, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1221, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $
 
Last edited by a moderator:
It is just 1G for 444 and 600M for 555, not 1.6G for 555. The reason being the 555 solver doesn't need the 444 solver at all but 666 and larger NxNxN even cubes do create an instance of the 444 solver.

I just pushed another change (do the 'git pull' and 'setup.py install' again) that brings it down to 675M for 444. Give that a try and lets see if we can get you going on 444 and then we will tackle 555.

I think I can get 444 down to ~450M but I need to rebuild a big table first to do so (takes about a day).
 
4x4x4 is not solving with new pull. Below is the partial output:

****************
2018-07-18 20:00:48,205 __init__.py INFO: R U F U
2018-07-18 20:00:48,205 __init__.py INFO:
2018-07-18 20:00:48,206 __init__.py INFO:
2018-07-18 20:00:48,212 LookupTable.py WARNING: 4x4x4-step11-UD-centers-stage.cost-only: begin preload cost-only
2018-07-18 20:00:48,945 LookupTable.py WARNING: 4x4x4-step11-UD-centers-stage.cost-only: end preload cost-only (6,388 bytes delta, 30,284 bytes total)
2018-07-18 20:00:48,947 LookupTable.py WARNING: 4x4x4-step12-LR-centers-stage.cost-only: begin preload cost-only
2018-07-18 20:00:49,669 LookupTable.py WARNING: 4x4x4-step12-LR-centers-stage.cost-only: end preload cost-only (16,368 bytes delta, 46,652 bytes total)
2018-07-18 20:00:49,670 LookupTable.py WARNING: 4x4x4-step13-FB-centers-stage.cost-only: begin preload cost-only
2018-07-18 20:00:50,388 LookupTable.py WARNING: 4x4x4-step13-FB-centers-stage.cost-only: end preload cost-only (16,368 bytes delta, 63,020 bytes total)
2018-07-18 20:00:50,399 LookupTable.py WARNING: 4x4x4-step10-ULFRBD-centers-stage: begin preload cache string
2018-07-18 20:00:51,340 LookupTable.py WARNING: 4x4x4-step10-ULFRBD-centers-stage: end preload cache string (21,384 bytes delta, 84,404 bytes total)
2018-07-18 20:00:51,349 LookupTable.py WARNING: 4x4x4-step31-reduce333-edges.hash-cost-only: begin preload cost-only
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 379, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3886, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 1383, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 1376, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube444.py", line 875, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 890, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 854, in __init__
MemoryError
 
yeah that 4x4x4-step31-reduce333-edges.hash-cost-only table takes about ~450M, that is the one I am rebuilding, I may be able to cut that in half.

For 555 I just added a "--min-memory" option that tells it to download a much smaller tables for one of the phases (it will take longer to find a solution though). With that option 555 takes 250M to run. I just pushed this a second ago so you may need to pull again.
 
yeah that 4x4x4-step31-reduce333-edges.hash-cost-only table takes about ~450M, that is the one I am rebuilding, I may be able to cut that in half.

For 555 I just added a "--min-memory" option that tells it to download a much smaller tables for one of the phases (it will take longer to find a solution though). With that option 555 takes 250M to run. I just pushed this a second ago so you may need to pull again.

555 is not working. Let me know how I can help.


*****
2018-07-18 21:03:52,762 LookupTable.py INFO: 5x5x5-step11-UD-centers-stage-t-center-only.cost-only: begin preload cost-only
2018-07-18 21:03:53,473 LookupTable.py INFO: 5x5x5-step11-UD-centers-stage-t-center-only.cost-only: end preload cost-only (7,816 bytes delta, 31,972 bytes total)
2018-07-18 21:03:53,474 LookupTable.py INFO: 5x5x5-step12-UD-centers-stage-x-center-only.cost-only: begin preload cost-only
2018-07-18 21:03:54,186 LookupTable.py INFO: 5x5x5-step12-UD-centers-stage-x-center-only.cost-only: end preload cost-only (16,368 bytes delta, 48,340 bytes total)
2018-07-18 21:03:54,190 LookupTable.py INFO: 5x5x5-step10-UD-centers-stage: begin preload cache string
2018-07-18 21:04:09,708 LookupTable.py INFO: 5x5x5-step10-UD-centers-stage: end preload cache string (336,004 bytes delta, 384,344 bytes total)
2018-07-18 21:04:09,819 LookupTable.py INFO: 5x5x5-step21-LR-t-centers-stage: begin preload cache dict
2018-07-18 21:04:09,956 LookupTable.py INFO: 5x5x5-step21-LR-t-centers-stage: end preload cache dict (0 bytes delta, 385,796 bytes total)
2018-07-18 21:04:09,957 LookupTable.py INFO: 5x5x5-step22-LR-x-centers-stage: begin preload cache dict
2018-07-18 21:04:10,042 LookupTable.py INFO: 5x5x5-step22-LR-x-centers-stage: end preload cache dict (1,012 bytes delta, 386,808 bytes total)
2018-07-18 21:04:10,042 LookupTable.py INFO: 5x5x5-step20-LR-centers-stage: begin preload cache dict
2018-07-18 21:04:10,339 LookupTable.py INFO: 5x5x5-step20-LR-centers-stage: end preload cache dict (4,356 bytes delta, 391,164 bytes total)
2018-07-18 21:04:10,349 LookupTable.py INFO: 5x5x5-step31-UL-centers-solve.hash-cost-only: begin preload cost-only
2018-07-18 21:04:13,320 LookupTable.py INFO: 5x5x5-step31-UL-centers-solve.hash-cost-only: end preload cost-only (45,696 bytes delta, 436,860 bytes total)
2018-07-18 21:04:13,449 LookupTable.py INFO: Downloading table via 'wget https://github.com/dwalton76/rubiks...able-5x5x5-step30-ULFRBD-centers-solve.txt.gz'
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 381, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3887, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1309, in group_centers_guts
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 1115, in lt_init
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/RubiksCube555.py", line 681, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 924, in __init__
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/LookupTable.py", line 256, in __init__
File "/usr/lib/python3.5/subprocess.py", line 247, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1221, in _execute_child
restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
pi@raspberrypi:~/rubiks-cube-NxNxN-solver $
 
Try this...everytime you see a "wget https..." that fails run that wget manually from the command line and then run the solver again. You are just running out of memory, how much memory do you have?
 
All Raspberry Pi 3 boards have 1G of memory.

Excellent progress.
For reasons I don't understand, after downloading and decompressing the lookup-table-5x5x5-step30-ULFRBD-centers-solve.txt.gz file from the 5x5x5 lookup table directory (and putting it into the rubiks-cube-NxNxN-solver), the 5x5x5 program ran much further. It ran to where the cube was ready for a 3x3x3 solve, but, the program stopped, saying there was a parity error.
I took the 3x3x3 equivalent and loaded it into the cube solver at www.rubiks-cube-solver.com and it solved in 22 moves.
The kociemba listed was kociemba ULUUUFDBBLUFBRBUDFLLDDFRUBRLDBRDRDLDFRFLLFBFBRDLUBURFR. I'll send the latter part of my output file in a following message.

Very close!!
 
Below is the latter part of my message when running the 5x5x5:

146 147 148 149 150

2018-07-19 08:20:06,603 __init__.py INFO: U L L L U
2018-07-19 08:20:06,604 __init__.py INFO: U U U U F
2018-07-19 08:20:06,604 __init__.py INFO: U U U U F
2018-07-19 08:20:06,605 __init__.py INFO: U U U U F
2018-07-19 08:20:06,605 __init__.py INFO: D B B B B
2018-07-19 08:20:06,605 __init__.py INFO:
2018-07-19 08:20:06,606 __init__.py INFO: F R R R F L L L L D L U U U F R D D D L
2018-07-19 08:20:06,606 __init__.py INFO: L L L L F D F F F R B R R R B U B B B U
2018-07-19 08:20:06,606 __init__.py INFO: L L L L F D F F F R B R R R B U B B B U
2018-07-19 08:20:06,606 __init__.py INFO: L L L L F D F F F R B R R R B U B B B U
2018-07-19 08:20:06,607 __init__.py INFO: B F F F B U B B B R U D D D F R F F F R
2018-07-19 08:20:06,607 __init__.py INFO:
2018-07-19 08:20:06,607 __init__.py INFO: L D D D B
2018-07-19 08:20:06,608 __init__.py INFO: R D D D R
2018-07-19 08:20:06,608 __init__.py INFO: R D D D R
2018-07-19 08:20:06,608 __init__.py INFO: R D D D R
2018-07-19 08:20:06,608 __init__.py INFO: D L L L D
2018-07-19 08:20:06,609 __init__.py INFO:
2018-07-19 08:20:06,609 __init__.py INFO:
2018-07-19 08:20:06,610 __init__.py INFO:
URL : https://alg.cubing.net/?puzzle=5x5x...2_Dw_F2_Dw-_L2_B2_F2_Uw_EDGES_GROUPED_y_y_x_y
2018-07-19 08:20:06,610 __init__.py INFO:
Solution: Uw2 L' Fw R2 Uw' D2 Fw' Dw' Bw' Rw Uw Dw F R' Uw' B Bw2 Dw' R' Dw2 Lw2 Uw' Uw2 L2 Bw2 Dw2 L' Fw2 Lw2 Fw2 Rw2 Dw2 B2 Dw2 F' Rw2 CENTERS_SOLVED Lw' U2 F L' U2 F' Lw U2 B' D' Fw2 D' Bw2 F2 R2 Bw2 D Fw2 Dw' L2 Dw' L2 F2 Dw2 L2 F2 Dw' F2 Dw' x Dw B2 Dw R2 F2 Uw' F2 Dw' F2 Uw2 R2 Uw z' Dw2 F2 Dw' R2 Dw F2 Dw' L2 B2 F2 Uw EDGES_GROUPED y y x y
Uw2 L' Fw R2 Uw' D2 Fw' Dw' Bw' Rw Uw Dw F R' Uw' B Bw2 Dw' R' Dw2 Lw2 Uw' Uw2 L2 Bw2 Dw2 L' Fw2 Lw2 Fw2 Rw2 Dw2 B2 Dw2 F' Rw2 CENTERS_SOLVED Lw' U2 F L' U2 F' Lw U2 B' D' Fw2 D' Bw2 F2 R2 Bw2 D Fw2 Dw' L2 Dw' L2 F2 Dw2 L2 F2 Dw' F2 Dw' x Dw B2 Dw R2 F2 Uw' F2 Dw' F2 Uw2 R2 Uw z' Dw2 F2 Dw' R2 Dw F2 Dw' L2 B2 F2 Uw EDGES_GROUPED y y x y
2018-07-19 08:20:06,611 __init__.py INFO: 96 steps total
ULLLUUUUUFUUUUFUUUUFDBBBBLUUUFBRRRBBRRRBBRRRBUDDDFLLLLDDFFFRDFFFRDFFFRUBBBRLDDDBRDDDRRDDDRRDDDRDLLLDFRRRFLLLLFLLLLFLLLLFBFFFBRDDDLUBBBUUBBBUUBBBURFFFR
Traceback (most recent call last):
File "./usr/bin/rubiks-cube-solver.py", line 381, in <module>
cube.solve()
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3906, in solve
File "/usr/local/lib/python3.5/dist-packages/rubikscubennnsolver-1.0.0-py3.5.egg/rubikscubennnsolver/__init__.py", line 3112, in solve_333
rubikscubennnsolver.RubiksSide.SolveError: parity error made kociemba barf, kociemba ULUUUFDBBLUFBRBUDFLLDDFRUBRLDBRDRDLDFRFLLFBFBRDLUBURFR
 
Two earlier messages I sent out are awaiting moderator approval. Here is a very brief summary so this message can have the right context.
The 5x5x5 program was reran after the lookup-table-5x5x5-step30-ULFRBD-centers-solve.txt.gz file was decompressed and put into the rubiks-cube-NxNxN-solver directory. The 5x5x5 program ran much further than previously, but, stopping due to what the program called a parity error. I put the output ULUUUFDBBLUFBRBUDFLLDDFRUBRLDBRDRDLDFRFLLFBFBRDLUBURFR into another online solver and it solved in 22 moves.

Since those email, I've put the above configuration into the 3x3x3 solver from your program and it solved correctly! Hope these clues help.
 
More information ...
There are 7 initial positions for a 5x5x5 cube listed in the rubiks-cube-solver.py file. I tested the first 5 of those 7 with the NxNxN solver. Four of the five positions said there was a "parity error". All four positions reached a solution when ran with the NxNxN program when the 3x3x3 position was entered. The fifth initial position was a solved cube and no turns were necessary.
I don't know how to interpret this. Do you have any suggestions?
 
Back
Top