• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Better way of maintaining super big alg sheets

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,687
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
But you probably shouldn't be dependent on ACN for long term since in the next 7-8 years, ACN might face the same fate as alg.garron.us
Do not worry, I have maintained a local copy of ACN.

I have even tweaked the software a bit to identify target stickers, as it was not there in the original code, although it is not perfect right now. Identifying target stickers is crucial in making blindsolving algs.
 

Christopher Mowla

Premium Member
Joined
Sep 17, 2009
Messages
1,184
Location
Earth
YouTube
Visit Channel
Do not worry, I have maintained a local copy of ACN.

I have even tweaked the software a bit to identify target stickers, as it was not there in the original code, although it is not perfect right now. Identifying target stickers is crucial in making blindsolving algs.
There is https://cubing.net/twisty.js/ (Have Cubies and Sticker Border unchecked.) That will literally show all of the pieces of the cube, and it looks pretty neat. (Reminds me of Ryan Heise's online cube simulator for speedsolving comps.) (Link retrieved from https://cubing.net/. So it's Lucas' project as well.)

And if you have modified Lucas' alg.cubing.net source code for your local machine, if you can get a file path for an image generated by an algorithm, the VBA code that Alexander and I wrote will run much faster, because the images would be pulled from your own computer (not from the web). But I know this digresses from the main objective of being able to house more than 10,000 images. And I don't know what your current Google worksheet looks like to know how the file size compares. If you have neglected to show your sheets because they are unpublished, I understand completely. But if they are accessible online somewhere, can you provide us a link to see what you have?
 

qwr

Member
Joined
Jul 24, 2019
Messages
3,371
YouTube
Visit Channel
@abunickabhi what you must tell us is if by sheet you mean spreadsheet or more like searchable database. Because at the scale of data you are proposing, a spreadsheet may become hard to navigate.
 

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,687
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
There is https://cubing.net/twisty.js/ (Have Cubies and Sticker Border unchecked.) That will literally show all of the pieces of the cube, and it looks pretty neat. (Reminds me of Ryan Heise's online cube simulator for speedsolving comps.) (Link retrieved from https://cubing.net/. So it's Lucas' project as well.)

And if you have modified Lucas' alg.cubing.net source code for your local machine, if you can get a file path for an image generated by an algorithm, the VBA code that Alexander and I wrote will run much faster, because the images would be pulled from your own computer (not from the web). But I know this digresses from the main objective of being able to house more than 10,000 images. And I don't know what your current Google worksheet looks like to know how the file size compares. If you have neglected to show your sheets because they are unpublished, I understand completely. But if they are accessible online somewhere, can you provide us a link to see what you have?

Yes, the algsheet is there in my signature called My algs, the signature is there after every post.

Otherwise the sheet is at, https://docs.google.com/spreadsheets/d/158F-jyu8ld8kbdD4I_Lqy4fsX5vvp_MQOq7Ofg8NdSI/edit?usp=sharing

I asked stackoverflow, the limit for google sheets has been reached at 10k images, the only way I can add more images is via link (imgur links say), and that will be a manual process + it will take time to load on the google sheet.

@abunickabhi what you must tell us is if by sheet you mean spreadsheet or more like searchable database. Because at the scale of data you are proposing, a spreadsheet may become hard to navigate.
Yes I agree spreadsheet is not the best solution at the scale of 126k rows.
The only plus point is that we can share the google sheet easily online.

Ultimately, I want to have a local searchable database for big algorithm sheet as that will be productive and save time.
 

Christopher Mowla

Premium Member
Joined
Sep 17, 2009
Messages
1,184
Location
Earth
YouTube
Visit Channel
Yes, the algsheet is there in my signature called My algs,
I couldn't download a stable version of it as a .xlsx or view it in the latest version of FireFox. The file I downloaded is 286 MB but with no images. (And hardly any algorithms.) Excel notified me when I opened it that it found a problem with the file and asked if I wanted to recover as much as possible before allowing me to view.

I asked stackoverflow, the limit for google sheets has been reached at 10k images, the only way I can add more images is via link (imgur links say), and that will be a manual process + it will take time to load on the google sheet.
That's precisely what I thought, and I'm thinking that not all images will load for every user (even with sufficient time) because wireless internet connections are unstable, for example.

But anyway, if you're interested to see what I can try to do, can you provide a download link to an Excel file with just the UF5 sheet/tab with maybe just 1,000 rows where all cells in those rows have every bit of information (algorithms, images, etc.)? EDIT: Never mind. I happened to see what I was looking for around row 62,000.

And is this just for the 3x3x3 (I can't tell at the moment), or would you like me to find a resolution that can be used for other cube sizes (and if more than just the 3x3x3, can you state which cube sizes you cover -- or will cover -- in your sheets?)?
 
Last edited:

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,687
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
I couldn't download a stable version of it as a .xlsx or view it in the latest version of FireFox. The file I downloaded is 286 MB but with no images. (And hardly any algorithms.) Excel notified me when I opened it that it found a problem with the file and asked if I wanted to recover as much as possible before allowing me to view.

That's precisely what I thought, and I'm thinking that not all images will load for every user (even with sufficient time) because wireless internet connections are unstable, for example.

But anyway, if you're interested to see what I can try to do, can you provide a download link to an Excel file with just the UF5 sheet/tab with maybe just 1,000 rows where all cells in those rows have every bit of information (algorithms, images, etc.)? EDIT: Never mind. I happened to see what I was looking for around row 62,000.

And is this just for the 3x3x3 (I can't tell at the moment), or would you like me to find a resolution that can be used for other cube sizes (and if more than just the 3x3x3, can you state which cube sizes you cover -- or will cover -- in your sheets?)?
The sheet is mainly for the 3x3, so the cube images will be required only for a 3x3. You are correct about not images being loaded up even when user gives sufficient time.

I do not know a way of sharing the offline .xlsx file. I do all the work online, and do not have an offline copy. Since the sheet is huge, export option of google sheets does not work, and some workaround with google app scripts has to be done.

I will try to get a download link for the UF5 tab and then mail it to you.
 

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,687
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
Inserting images is rather slow compared to drawing cube images in Excel, but here's alternate code to do the same thing (with a few additional features for aesthetics):

EDIT:
I used @Roman's online Mosaic tool to effortlessly produce these sketches for the 3x3x3 and 4x4x4, for example. So it's not too tedious to actually draw the cube images with Excel with an aid such as that. Of course the images need to be touched up some before the cell addresses are made into sticker colors. The hardest part (which is doable) is to implement a Rubik's cube move parser. And you can dynamically show ONE image at a time, for the currently selected algorithm cell. That way, you can make a very high resolution image and not require more than one row per algorithm.) And I'm not insisting or suggesting this be done, but this is a way to show how it can be done and why it would be advantageous.



But anyway, continuing on . . .

To run the code,
  1. Open Microsoft Excel
  2. Navigate to: File -> Open -> Trust Center -> Trust Center Settings -> Macro Settings
  3. Dot in Enable all macros (not recommended; potentially dangerous code can run)
  4. Click OK twice
  5. Press [alt] + [F11] (to open the VB editor window (VBE))
  6. Press [ctrl] + [R] (to show the left pane, if it isn't showing already)
  7. Right click anywhere in the white beneath ThisWorkbook
  8. Navigate to Insert -> Module
  9. Copy this code and paste it.
  10. Click in a NEW blank sheet
  11. With the VBE still open, left click anywhere inside of Sub Test_colls_v2()
  12. Press [F5] (or click the play arrow button in the toolbar) to run.
  13. And . . . when you go to Save As, be sure to save as .xlsm, not as .xlsx.
(And these instructions apply to running Alexander's code as well.)

(And note that commented lines in VBA begin with a ')

Code:
Option Explicit

Sub Test_colls_v2()

'Manually input algorithms into these cells.
Range("D1").Value = "R2 B2 F"
Range("B3").Value = "R2"
Range("B4").Value = "U2 F2"
Range("B5").Value = "D' R"

'Call the sub.
Call colls_v2(ActiveWorkbook, ActiveSheet.Name, "D1,B3:B5")

End Sub
Sub colls_v2(book As Workbook, sheetName As String, rangeAddress As String)

Application.ScreenUpdating = False

'url parameters:
    Dim startOfEveryURL As String
    startOfEveryURL = "http://cube.crider.co.uk/visualcube.php?"

    Dim stage As String
    stage = "&stage=pll"

    Dim picFormat As String
    picFormat = "&fmt=png"

    Dim imageSize As String
    imageSize = "&size=100"

    Dim cubeSize As String
    cubeSize = "&pzl=3"

    Dim view As String

    Dim alg As String
    Dim url As String


Dim rng As Range
Set rng = book.Sheets(sheetName).Range(rangeAddress)

'For each cell in the range,
    Dim cell As Range
    For Each cell In rng
   
        'Change size of cells in the range where images are to be inserted.
        With cell
            .RowHeight = 80
            .ColumnWidth = 15
        End With
   
        alg = cell.Value
   
        'Change the background color and font color of cells to the immediate LEFT of the cells where images are to be inserted.
        With cell.Previous
            .ColumnWidth = 35
            .Interior.Color = RGB(225, 225, 225) 'light shade of gray background color
            .Font.Color = RGB(255, 0, 0) 'red font
            .Font.Size = 16
            .Font.Name = "Times New Roman"
            .Value = alg
            .HorizontalAlignment = xlLeft
            .VerticalAlignment = xlCenter
        End With
   
        'Just for fun, make even rows have FULL view and odd rows have last layer view.
        If Modulous(cell.Row, 2) = 0 Then
            view = "&view=full"
        Else
            view = "&view=plan"
        End If
           
        url = startOfEveryURL & stage & picFormat & imageSize & cubeSize & view & "&alg=" & alg
   
        'Put a medium border around both cells (for appearance)
        Call Cell_Border(book, sheetName, cell.Address)
        Call Cell_Border(book, sheetName, cell.Previous.Address)
   
        'Now insert the images
        Call URLPictureInsert(url, book, sheetName, cell.Address)
   
    Next cell

rng.ClearContents

Application.ScreenUpdating = True

MsgBox "Program Complete!", vbInformation, "VBA Macro by Christopher Mowla"

End Sub


Sub TestURLPictureInsert()

Dim url As String
url = "http://cube.crider.co.uk/visualcube.php?stage=pll&fmt=png&size=100&pzl=3&view=plan&alg=R2F2R2"

Call URLPictureInsert(url, ActiveSheet.Name, "A5")
End Sub
Sub URLPictureInsert(url As String, book As Workbook, sheetName As String, cellAddressToInsert As String)
'Code is originally from https://www.extendoffice.com/documents/excel/4212-excel-insert-image-from-url.html
'Also check out Edit #2 of https://superuser.com/questions/940861/how-can-i-display-a-url-as-an-image-in-an-excel-cell

Dim xRg As Range
Set xRg = Range(cellAddressToInsert)

Sheets(sheetName).Pictures.Insert(url).Select

Dim Pshp As Shape
Set Pshp = Selection.ShapeRange.Item(1)

With Pshp
    .LockAspectRatio = msoFalse
    .Top = xRg.Top + 0.5
    .Left = xRg.Left + 5
End With

Set Pshp = Nothing

End Sub


Sub Test__Cell_Border()
Call Cell_Border(ActiveWorkbook, ActiveSheet.Name, ActiveCell.Address)
End Sub
Sub Cell_Border(book As Workbook, sheetName As String, rangeAddress As String)
With book.Sheets(sheetName).Range(rangeAddress)
    .Borders(xlEdgeLeft).LineStyle = xlContinuous
    .Borders(xlEdgeLeft).Weight = xlMedium

    .Borders(xlEdgeRight).LineStyle = xlContinuous
    .Borders(xlEdgeRight).Weight = xlMedium

    .Borders(xlEdgeTop).LineStyle = xlContinuous
    .Borders(xlEdgeTop).Weight = xlMedium

    .Borders(xlEdgeBottom).LineStyle = xlContinuous
    .Borders(xlEdgeBottom).Weight = xlMedium
End With
End Sub


Sub TestModulous()
MsgBox Modulous(5, 2)
End Sub
Function Modulous(a As Variant, b As Variant)
Modulous = a - b * Floor(a / b)
End Function


Sub TestFloor()
'MsgBoxP Floor(3.21), Floor(-3.21)
End Sub
Function Floor(number As Variant)
    'Code from here: https://www.mrexcel.com/board/threads/floor-function-in-vba-code.218947/#post-1069232
    Floor = Int(number) - 1 * (Int(number) > number)
End Function

Is Pete's Spreadsheet code similar or different to the one mentioned above?
The idea of drawing images in the excel sheet itself is a good solution, and as you said in your video, it will not affect the quality that much. It is a much better solution compared to inserting images, in order to not make the sheet heavier.

Okay, I did a little more "research" and have come up with a proposal of what I'm thinking to do (and have already done), if you like what you see (and hear) in that video . . . including the fact that users will have to have Microsoft Excel installed on their computers (not just online versions of Office).

The video made a lot of things clear. I give the approval for going ahead with this idea. Since most of the cube images in my sheet are Orange front and Yellow top (z2 y transform to the template image you have chosen), generating the images via Excel formulas using that orientation will be preferable. Also Orange front and Yellow top has been historically the main orientation for blindsolving a decade back.

Currently I translate all the algorithms into Yo notation externally via this code httpbs://github.com/abunickabhi/5-style/blob/master/yonotation.py .I do not know how to implement this into excel formulas. I think it can be done by using regex operations in Excel, but I am more comfortable with re library in python.
 

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,687
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
Also I am fine with the grey pixels in the background of the template, if it would not be too hard to remove, it can be preferably removed.
Also I am fine with the cube angle of the template, with UF/UFR piece shown in focus (top right of the 3D cube), but like I said above I would prefer z2 y over the cube and have Orange front and Yellow top.

I have asked Pete to share his solver which he used here, in the video he made 2 years back. I think he must have constructed a Singmaster parser in excel itself. I do not know how, but I hope I understand the approach on how it can be done via VBA/excel macros.
 

Christopher Mowla

Premium Member
Joined
Sep 17, 2009
Messages
1,184
Location
Earth
YouTube
Visit Channel
Is Pete's Spreadsheet code similar or different to the one mentioned above?
They are different. (I did not contact Pete for his code, and my code will not allow you to turn the cube, as it will just be an image.)

The idea of drawing images in the excel sheet itself is a good solution, and as you said in your video, it will not affect the quality that much.
I first mentioned to reduce 800x800 pixels to 400x400, but by the way it looks, I don't have to reduce the quality at all. And since the actual size of the images in the spreadsheet is independent of the actual file size that they are, we can simply have the cells that they are placed on be larger so that the images are large enough for the user to see.

It is a much better solution compared to inserting images, in order to not make the sheet heavier.
It's like driving on the highway at night. You can only see what's a few hundred feet in front of you anyway. And if you want a print to PDF feature (to print ALL cases), that's perfectly straight forward to do. (Images can be created as they are added to each new PDF page -- in theory. But I guess that comes later.)

Since most of the cube images in my sheet are Orange front and Yellow top (z2 y transform to the template image you have chosen), generating the images via Excel formulas using that orientation will be preferable. Also Orange front and Yellow top has been historically the main orientation for blindsolving a decade back.
Understandable. What I will do is set that color orientation as the default, but allow the user to literally choose any RGB they want for the sticker colors by coloring six cells on the separate "search engine sheet" that I mentioned.

Currently I translate all the algorithms into Yo notation externally via this code httpbs://github.com/abunickabhi/5-style/blob/master/yonotation.py

I wrote code to translate SiGN to WCA in another language before, and therefore when I saw these lines of code, it kind of threw a red flag (if my understanding of this code is correct).
Code:
string = re.sub(r'(M )(?!\')', 'm', string)
string = re.sub(r'(M\' )(?!\')', 'n', string)
string = re.sub(r'(M2 )(?!\')', 'o', string)

And also the code:
Code:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(D2,"U","a"),"U’","b"),"U2","c"),"L","g"),"L’","h"),"L2","i"),"R","j"),"R’","k"),"R2","l"),"D","d"),"D’","e"),"D2","f"),"F","v"),"F’","w"),"F2","x"),"M","m"),"M’","n"),"M2","o"),"S","s"),"S’","t"),"S2","u"),"E","p"),"E’","q"),"E2","r")
Basically, if you are going to substitute (replace) both R' and R with something else, you need to first substitute something for R' (and also R2) first, then just plain R!

(But I will follow the instructions on pages 2-5 in this document.)

.I do not know how to implement this into excel formulas. I think it can be done by using regex operations in Excel, but I am more comfortable with re library in python.
I don't think regular expressions are as fast to use in Excel as a replacement command like Rick's, for example. (So to use his approach in our case, one would make a copy of the column of Singmaster notation and do replacements in that column/range only.) But I will probably write a function which does full translation to each individual cell (and express it as an Excel formula, and then FillDown that formula to the entire column -- which is again a copy of the Singmaster notation column.) Because this works pretty fast also, and is my "style" of coding in VBA.

But I did use a regular expression for checking if the user inputted the case correctly in the search bar or not (whether the user used only the English letters L,R,U,D,F,B in each of the two-letter edge piece identifiers (like UB, for example)).

Also I am fine with the grey pixels in the background of the template, if it would not be too hard to remove, it can be preferably removed.
Yes, certainly I will remove the background checkerboard pattern. But I might also add in an option to change the background color to something other than white.

Also I am fine with the cube angle of the template, with UF/UFR piece shown in focus (top right of the 3D cube),
Okay, as long as you're sure about that! (I don't want to do this more than once!)

but like I said above I would prefer z2 y over the cube and have Orange front and Yellow top.
And as I mentioned above, I will make this the default color orientation but also allow the user to change it.

I have asked Pete to share his solver which he used here, in the video he made 2 years back. I think he must have constructed a Singmaster parser in excel itself. I do not know how, but I hope I understand the approach on how it can be done via VBA/excel macros.
It only took me an hour to both figure out and code a functions (each its own) to do apply the moves F and F', reset the cube, and simplify (determine) the net piece orientations. So doing the remaining moves should be easy. The only "challenge" now is to associate the moves with the stickers.
 
Last edited:

Habsen

Member
Joined
Dec 10, 2019
Messages
81
WCA
2020HABE01
I recently started to build an alg sheet generator based on python and latex. Maybe this is of interest for you.

I maintain my algs in plain text files that only contain the alg name and the alg itself, e.g.:
Code:
Ua    R U' R U R U R U' R' U' R2
Ub    R2 U R U R' U' R3 U' R' U R'
H    M2 U M2 U2 M2 U M2
Z    M2 U M2 U M' U2 M2 U2 M'

My python script reads these files from a given directory, applies the inverse of the alg on a solved cube, and generates a tikz description of the cube. Finally, everything is put into a latex template which can be build with pdflatex. I have attached my PLL list to illustrate the result.

I intend to implement multiple extensions that support hierarchical directories, different cube visualizations (optional LDB face visibility, U-face view for LL algs, remove color from stickers that are not relevant for the alg set), and fix some minor issues (rotations, ...).

In general, this approach should scale up to 100k algs. The python part is sufficiently fast. pdflatex isn't when the pdf is built from scratch. However, the cube images don't need to be rebuilt every time the pdf is updated.

Let me know if you can use this and I will keep you updated.
 

Attachments

  • pll.pdf
    54 KB · Views: 6

Christopher Mowla

Premium Member
Joined
Sep 17, 2009
Messages
1,184
Location
Earth
YouTube
Visit Channel
Okay. My hands are hurting. I just spent like 3 hours in Microsoft paint getting rid of all shades of colors except for 7 in the image (including the background color.) This is the image I started with, and this is the image that I ended with. (Although it's not really part of the program, if someone wants to simply color the stickers of this cube in Microsoft Paint, for example, it's very easy to do so.)

So, besides the image that I "ended with" being 9.4 times smaller (file size wise, but the same pixel density) is the quality lost?

(And I had to rotate the cube a little from the one that I showed in my video because the DB edge wasn't showing, but now all piece stickers are showing!)
 

qwr

Member
Joined
Jul 24, 2019
Messages
3,371
YouTube
Visit Channel
Okay. My hands are hurting. I just spent like 3 hours in Microsoft paint getting rid of all shades of colors except for 7 in the image (including the background color.) This is the image I started with, and this is the image that I ended with. (Although it's not really part of the program, if someone wants to simply color the stickers of this cube in Microsoft Paint, for example, it's very easy to do so.)

So, besides the image that I "ended with" being 9.4 times smaller (file size wise, but the same pixel density) is the quality lost?

(And I had to rotate the cube a little from the one that I showed in my video because the DB edge wasn't showing, but now all piece stickers are showing!)

Manual labor is never the right answer! The transparency background is probably generated by the program itself. It may have been a one line change...
If not, it can be done in 30 seconds in photoshop by selecting by color (since the white does not match the background)

And also the code:
Code:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(D2,"U","a"),"U’","b"),"U2","c"),"L","g"),"L’","h"),"L2","i"),"R","j"),"R’","k"),"R2","l"),"D","d"),"D’","e"),"D2","f"),"F","v"),"F’","w"),"F2","x"),"M","m"),"M’","n"),"M2","o"),"S","s"),"S’","t"),"S2","u"),"E","p"),"E’","q"),"E2","r")

This cannot be the best way to do things right?
 

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,687
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
Okay. My hands are hurting. I just spent like 3 hours in Microsoft paint getting rid of all shades of colors except for 7 in the image (including the background color.) This is the image I started with, and this is the image that I ended with. (Although it's not really part of the program, if someone wants to simply color the stickers of this cube in Microsoft Paint, for example, it's very easy to do so.)

So, besides the image that I "ended with" being 9.4 times smaller (file size wise, but the same pixel density) is the quality lost?

(And I had to rotate the cube a little from the one that I showed in my video because the DB edge wasn't showing, but now all piece stickers are showing!)
Its fine if the some checkered pixels do remain in the background. All the pieces are visible in the new template, so it will a good image representation for BLD algs. Its fine if the image is 9.4 times smaller in size too. User being able to change orientation by some toggle setting in the sheet is also a good idea.

Working on drawing images itself is a big relief for me, that such an idea exists. I thought I had to manually enter setup moves in alg.cubing and get the images for every case.

Thanks @Alexander , for the regex equivalent in excel. I hope it works.
 

Christopher Mowla

Premium Member
Joined
Sep 17, 2009
Messages
1,184
Location
Earth
YouTube
Visit Channel
@abunickabhi
Okay, I took care of the pixilized cube in Excel. I used this online tool with these settings. (And I manually -- which was not a big deal, due to what I did previous to the image -- colored the stickers (of the image that I dragged into that tool) to the exact RGB of the color palette selection from that online tool to hopefully give the best result.)

The online tool (which can clearly be used to create Rubik's Cube Mosaics) could only produce a 500 width x 523 height pixilized version of the cube in Excel, but this is an actual drawing! (This is the final result of what it's going to look like.)

I am using conditional formatting (which I coded with VBA to be set automatically) to color the stickers. Even though conditional formatting in Excel is very fast, when you have 500*523 = 261,500 cells to color, it's slow. (It took about 5 seconds to color the stickers!) But I thought to merge cells as much as I could. Now, it takes less than a second to color the stickers. (Coloring the stickers is a part of the algorithm parser.)

Please take a look at the image very carefully and let me know if the cube stickers are acceptable. (Again, you can choose any RGB color shade of the colors of the stickers and the background. So just the sticker's shape.)

In the meantime, I will resume the algorithm parser code.

EDIT:
Here's what was bothering me about the picture. (Both stickers of midge FR and the top sticker of corner UBR.) Fixed.

EDIT2:
The algorithm parser is complete. It takes all possible moves of Singmaster notation. (It auto corrects the format of algorithms which are not strictly moves separated by a single space except for when you wrote F'2 instead of F2 or F2', or if there is a character that doesn't below.)

Now I just have to tie the algorithm parser and sticker coloring feature together.
 
Last edited:

Habsen

Member
Joined
Dec 10, 2019
Messages
81
WCA
2020HABE01
I did some tests with my python/latex-based alg sheet generator to find out if it's suitable for 100k algs.

I used a 1k alg set and built the alg sheet on my laptop (Core i7-6500U). Please note, that a modern desktop CPU should easily be 3x-4x faster.
Here are my results:
1. Generating the .tex and .tikz files with the python script takes less than a second.
2. Building the pdf file with pdflatex takes a bit more than four minutes when the pdf is built from scratch.
3. Building the pdf file with pdflatex takes only a few seconds when the cube images are already generated.

In conclusion, this approach will take a few hours when a 100k alg sheet is built for the first time, but it is sufficiently fast when the sheet is built progressively or requires only minor modifications.

I hope to finish the implementation of a stable version by the end of the week. When this is done, I will put the code and templates on github.
 

Christopher Mowla

Premium Member
Joined
Sep 17, 2009
Messages
1,184
Location
Earth
YouTube
Visit Channel
@Habsen,
I am assuming that you have read the thread before posting (and have watched my video) and still believe that a large PDF is better for users to use than an interactive search engine spreadsheet.

Can you explain why your PDF output would be better? (If you didn't read all of the posts, note that @abunickabhi, @qwr, and I already agreed that a large PDF is not the solution, because it's not easy to search for cases. Either a database or what I'm doing is practical to use to find cases.)

All in all, I think you should start a new thread about your software, as it definitely deserves attention (and doing so will attract those interested in such software to you). It can be used for solution guides and future cubing books (may I be bold to say "textbooks"?) for sure! But unless you can make the PDF interactive, I don't think it would be good for anything other than producing printouts.
 

Habsen

Member
Joined
Dec 10, 2019
Messages
81
WCA
2020HABE01
@Habsen,
I am assuming that you have read the thread before posting (and have watched my video) and still believe that a large PDF is better for users to use than an interactive search engine spreadsheet.

Can you explain why your PDF output would be better? (If you didn't read all of the posts, note that @abunickabhi, @qwr, and I already agreed that a large PDF is not the solution, because it's not easy to search for cases. Either a database or what I'm doing is practical to use to find cases.)

All in all, I think you should start a new thread about your software, as it definitely deserves attention (and doing so will attract those interested in such software to you). It can be used for solution guides and future cubing books (may I be bold to say "textbooks"?) for sure! But unless you can make the PDF interactive, I don't think it would be good for anything other than producing printouts.

My approach is not supposed to solve the maintenance problem for the alg set. I just provided a lightweight way to generate high-quality cube images from a single line of text (containing the alg). Let us just ignore that I put all images in one pdf. The generated images can be used separately.
In my opinion, cube images are not necessary for the UF5 alg set. Every person interested in these types of algs (even 3-Style) should be able to know what happens to the cube when we use the UF-UR-LB 3-cycle for example, without visualization. But the OP defined the image generation as one of the main problems, and for big alg sets in general this is a valid assumption, which is why I wanted to share my approach here, especially after reading about images generated from an array of colored excel cells, etc..

My approach is platform-independent, it doesn't require commercial software, and it doesn't depend on external tools. It is reasonable to expect that python and latex are still available in a couple of years. My approach is also quite fast and easy to use, which makes it especially useful for very large alg sets.
 
Top