Coder Social home page Coder Social logo

sgs's Introduction

A set of base orders and strong generating sets for some twisty puzzles. These go with cubing.js and twsearch. Still under development.

To try it out:

npm install
make test # Run default puzzle test

# Run a particular puzzle
npx ts-node --transpile-only ./src/test/benchmark.ts [name of puzzle] [number of tries]

Sample output:

npx ts-node --transpile-only ./src/test/benchmark.ts 2x2x2
Benchmarking 100 random-move scrambles for 2x2x2.
....................................................................................................

# Solution lengths

5 | ##                                                           | 1
6 | ##                                                           | 1
7 | #########                                                    | 4
8 | #######                                                      | 3
9 | ####################                                         | 9
10 | ########################################                     | 18
11 | ############################################################ | 27
12 | #################################################            | 22
13 | ###########################                                  | 12
14 | ##                                                           | 1
15 | ####                                                         | 2

# Milliseconds to solve

22 | ##############                                               | 8
23 | ############################################################ | 35
24 | ##################################                           | 20
25 | ###############                                              | 9
26 | ###############                                              | 9
27 | #################                                            | 10
28 | #######                                                      | 4
29 | ##                                                           | 1
31 | ###                                                          | 2
35 | ##                                                           | 1
40 | ##                                                           | 1

Todo:

  • Merge/cancel moves between algorithms
  • Merge/cancel moves with respect to commutating moves
  • Make trembling respect canonical sequences.
  • Make trembling include pre/post rotations.
  • Make trembling permit mid-solution rotations.
  • Make trembling consider inverse positions.
  • Make trembling use a beam search approach.
  • Make different sgs for different move sets (i.e., block vs slice for the 4x4x4).

To integrate into twizzle, we'll need to either update the way twizzle generates random positions (so it doesn't move centers on the 3x3x3, for instance) or else add code to rotate the whole puzzle appropriately before trying these algorithms.

sgs's People

Contributors

lgarron avatar rokicki avatar

Watchers

 avatar  avatar  avatar

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.