• 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!

Found!

Status
Not open for further replies.
Joined
Aug 12, 2013
Messages
5,089
Location
Brazil
SS Competition Results
YouTube
Visit Channel
I'm trying this: https://github.com/adrianliaw/PyCuber
I'm working on a project related to 3x3 f2l and I'm looking for a library that models the cube but I'm having a hard time finding it

What I need is something like this:

I input the alg, like R U R' and it spits out the cube state in form of a list or something similar so I can combine various algs and see if it solves

Does anyone know anything similar to this in python? javascript would do the trick too
 

qwr

Member
Joined
Jul 24, 2019
Messages
3,371
YouTube
Visit Channel

xyzzy

Member
Joined
Dec 24, 2015
Messages
2,877
afaik there's no math that goes into a cube simulator, as compared to a cube solver. You can literally encode each sticker as a number and code in all 6 face turns as permuting arrays of numbers.
This is correct, at least if you're just doing a 2D cube representation (e.g. unfolding the sides into a net, just like PyCuber, Cube Explorer, etc.). If you want to make it 3D or have turn animations, you'd have to learn a bit about how rotations in 3D space work.

If you want to make something really general (like, say, pCubes or Twizzle), then you probably need a much better understanding of 3D geometry than the bare minimum needed just to implement a cube (which is like easy mode because everything has integer coordinates).
 

qwr

Member
Joined
Jul 24, 2019
Messages
3,371
YouTube
Visit Channel
I think even large puzzles that are non-shapeshifting and don't have sticker orientation can get away with one number per sticker. Ofc if there's sticker orientation then there could be multiple numbers per sticker location. Non-trivial shapeshifting or jumbling makes thinks more complicated.
 

xyzzy

Member
Joined
Dec 24, 2015
Messages
2,877
I think even large puzzles that are non-shapeshifting and don't have sticker orientation can get away with one number per sticker. Ofc if there's sticker orientation then there could be multiple numbers per sticker location. Non-trivial shapeshifting or jumbling makes thinks more complicated.
You could do it that way, but creating new puzzles becomes super tedious as you have to manually define all of the sticker coordinates and colours. I'm not entirely sure how pCubes works but I believe you get to specify a base shape (a cube, octahedron, etc., or even something completely custom) then cut it up with some planes, specify the legal turning angles, and it automatically defines the stickers given this information.
 

qwr

Member
Joined
Jul 24, 2019
Messages
3,371
YouTube
Visit Channel
You could do it that way, but creating new puzzles becomes super tedious as you have to manually define all of the sticker coordinates and colours. I'm not entirely sure how pCubes works but I believe you get to specify a base shape (a cube, octahedron, etc., or even something completely custom) then cut it up with some planes, specify the legal turning angles, and it automatically defines the stickers given this information.
True, true. I plan on mainly targeting nxn cubes which require no manual specification at all.
 
Status
Not open for further replies.
Top