Giter Site home page Giter Site logo

mikavilpas / squanmate Goto Github PK

View Code? Open in Web Editor NEW
17.0 3.0 4.0 6.38 MB

Square-1 trainer, analysis and general learning tool

Clojure 86.26% HTML 1.05% CSS 0.98% C++ 10.86% Shell 0.07% C 0.18% JavaScript 0.60%
clojurescript figwheel html5-canvas react reagent quil devcards

squanmate's Issues

Parity scrambler should check if end result is sliceable

I got a 8/star scramble ending with … / (1,4) which is not a legal position and you cannot get in an official scramble. I tracked it down in the code but have never worked with Closure (otherwise I would have tried to fix it myself) and I believe the problem is in default_scrambler.cljs#L24 that is used by new-default-shape-scrambler without checking after if the state is sliceable.

Scramble Inspector does not work anymore with 6.7

I get this in the console when I try to inspect a scramble either from the cubeshape trainer with Inspect or by entering my own scramble.

squanmate.js:3924 Error rendering component (in nu > page > pK > pK > nK > kK > iK > EJ)
(anonymous) @ squanmate.js:3924
squanmate.js:3453 Uncaught Error: No protocol method IDeref.-deref defined for type string: (4,5)/
at x (squanmate.js:3440)
at B (squanmate.js:3453)
at Object.EJ [as reagentRender] (squanmate.js:4445)
at squanmate.js:3922
at rt (squanmate.js:3923)
at squanmate.js:3924
at Ks (squanmate.js:3900)
at Ls (squanmate.js:3901)
at it (squanmate.js:3921)
at Object.render (squanmate.js:3924)
2squanmate.js:4013 ERROR: Cannot create sketch. :host is not specified.

Add keyboard shortcuts for trainers

There is a great framework for using page-wide keyboard shortcuts in place, but only one page uses it so far (the parity game).

Currently the UI is slightly geared towards a mobile device. Laptop / desktop users might benefit a lot from easy to use keyboard bindings.

Show whether the current algorithm swaps or preserves parity

Can be done for algs that lead into cubeshape (square square):

  • start with a solved puzzle (obviously at even parity)
  • apply the given alg in reverse
  • do a parity count with Cale Schoon's method

If the count is odd, applying that alg at that position will always swap the parity count (swap the parity). Otherwise it will preserve the parity.

This is really simple, and can make designing algorithms and count positions a lot easier!

Generated image name from the shape visualizer should have another format

Currently it’s e.g. "squanmate-Wed Mar 21 2018 17_19_19 GMT+0100 (W. Europe Standard Time).png". When I now generate a new image after midnight it will start with "squanmate-Thu" and will be sorted before the image that was generated first because I sort alphabetically. Something like"2018-03-21" would be much better.

I inserted way too many wrong images because of this into my alg sheet :D I now regularely delete all these images in my download folder as I don’t want to change my default download folder in Chrome just for this and also I don’t want to change how this folder is sorted. So changing the format would be the most pleasing and easiest solution for me.

Extra commas in algorithms should throw an error

For example in the algorithm shape visualizer https://rawgit.com/sp3ctum/squanmate/master/resources/public/#/shape-visualizer/square/left-pawn/(-5%2C-4)/(-1%2C0)%2F1%2C0%2F0%2C-2%2C%2F-1%2C-2%2F

Screenshot for later when this is fixed
image

Notice the extra comma in 0,-2,/. I accidentally wrote that and could not figure out for a long time why the images were not generated for a part of the algorithm :D I would suggest, that Squanmate should check for multiple commas between two slashes and if it’s illegal, just throw an error as an unsliceable position does. I guess Squanmate does already do something like this because the visualization just stops because of an error I guess.

This is not only in the alg shape visualizer but also the scramble inspector. If I enter 1,0/-1,0,/-3,0/ I get just
image

Not only commas are a problem, but every other illegal character. If you already check if something in the algorithm is legal and get no as an answer, just pass the error to the user.

Only fill second dropdown with possible shapes in algorithm shape visualizer

I’m not sure if it is necessary to create an image for, lets say 8/8 or star/star that is not possible with a Square-1. Should be easy to implement, just count the number of edges and corners in the first selected dropdown and then filter in the second.

But might be a UI nightmare :D Maybe you could disable the second dropdown until the first is filled and also add a switch button to the right to switch top with bottom and vice versa.

Rarely, the scrambler spits out an illegal scramble with a missing /

Just got this with 6.4 when training CSP
image

/ is missing and it also becomes unsliceable. Never had this before and also no idea how to reproduce this. I had 6/90 shapes selected (the first 6 Square shapes from your Google Sheet) and generated a new scramble by pressing New scramble

PBL Trainer

I think a PBL trainer would be pretty cool, and I think there might be a good way to do it.
https://www.youtube.com/watch?v=5etIKH9fkqg is a PBL generator. It solves every PBL case (I think) with just two aux algs, both of them being 5 or less slices. For a trainer, you can give a scramble which is just two aux algs. You can do a random aux alg, random U and D turns and then another aux alg and that should theoretically cover every PBL (no parity of course) in scrambles just 10 slices or less. If you download the PBL finder, it comes with a notepad (auxAlgs_table) with every aux alg on it, which can hopefully be applied to squanmate. What do you think of this idea?

Scramble images not shown initially on firefox

When you enter the app with firefox, the images are not visible.

If you go to the page "All shapes" and then go back to the main page, the images are visible, and they will continue to be visible too.

Hotkeys for parity game

Add hoykeys for the buttons odd/even. I would go with left and right arrow keys. It is annoying to always have to click and would be much faster with hotkeys.

Set focus to second field after entering first shape in shape visualizer

image (this little symbol is from a Chrome extension btw)
After that, I press enter or leftlick and the focus should automatically switch to the field to enter the shape for the bottom layer.

I can’t think of a situation where this would not be user friendly but maybe there is. If that’s the case, please tell me, maybe I can come up with another solution.

Allow offline use

There's nothing preventing offline use after an initial load of the application. I haven't really tried it yet, so it might need work.
Use case: initial load and then the user's Internet connection breaks.

Follow usage amounts

I'm interested in seeing how many people find this a useful addition to their hobby. There's almost no interaction with the users at the moment.

Squanmate should not put a space after a / when showing algorithms

Squanmate always puts a space after a / in Sq1 notation. This has been bugging me a lot since I started using Squanmate but I was always too lazy to open an issue.

E.g. when importing a scramble I enter 1,0/-1,0/ and after the import Squanmate displays
image

So it is transformed to (1,0)/ (-1,0)/. Happens also in the algorithm shape visualizer and everywhere else where algs are shown. Either also make a space before the / or neither before or after (I think I prefer the one without spaces. I tested both versions by changing the HTML with the DevTools and it is still readable without the spaces and more compact=better).

Btw: I like the new asterisk that shows when we leave the cubeshape :) My hand/brain coordination already tells me this when reading the last numbers before we leave cubeshape because I’ve done thousands of scrambles but I still like it :)
Edit: ok just saw the highlighting. I don’t like that at all <.< Just because text selection can be done by the user and is used for something else already (a user action, not normally something an application does).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.