### Bookstore

 Computer Math and Games in Pascal (preview) Lazarus Handbook

### Author Topic: Rubik's cube F2L solver  (Read 15458 times)

#### circular

• Hero Member
• Posts: 3721
##### Rubik's cube F2L solver
« on: June 11, 2012, 07:09:50 pm »
Here is my lastest program. It is a Rubik's cube program that solves the first two layers using the F2L method.

You can turn the cube in 3D and move faces using F(ront), U(p), L(eft), B(ack), D(own), R(ight), with Shift and Alt. Also you can use M, E, S for slice moves, and x,y,z to rotate the cube with the keyboard.

It can be downloaded here :
http://consume.o2switch.net/rubik_f2l.zip

Here is a screenshot :
Conscience is the debugger of the mind

#### JuhaManninen

• Global Moderator
• Hero Member
• Posts: 3959
• I like bugs.
##### Re: Rubik's cube F2L solver
« Reply #1 on: June 11, 2012, 10:12:26 pm »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

#### circular

• Hero Member
• Posts: 3721
##### Re: Rubik's cube F2L solver
« Reply #2 on: June 12, 2012, 04:40:26 pm »
For now, yes. Of course I could put the sourcecode somewhere.
Conscience is the debugger of the mind

#### typo

• Hero Member
• Posts: 3051
##### Re: Rubik's cube F2L solver
« Reply #3 on: June 12, 2012, 04:46:22 pm »

#### circular

• Hero Member
• Posts: 3721
##### Re: Rubik's cube F2L solver
« Reply #4 on: June 12, 2012, 04:51:09 pm »
Ok, I've sent it.

By the way, I want to thank Dibo and Lainz for BGRAControls, which I am using in this project.
Conscience is the debugger of the mind

#### lainz

• Guest
##### Re: Rubik's cube F2L solver
« Reply #5 on: June 12, 2012, 08:45:29 pm »
nice

#### fabienwang

• Sr. Member
• Posts: 449
• Lazarus is the best
##### Re: Rubik's cube F2L solver
« Reply #6 on: June 12, 2012, 11:00:12 pm »
awesome.

Congrats Circular.

Now i understand why you watched so many rubik's cube videos on youtube ^^
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

#### circular

• Hero Member
• Posts: 3721
##### Re: Rubik's cube F2L solver
« Reply #7 on: June 13, 2012, 12:32:07 am »
Thanks.

I've updated the program with new features like OLL search and configuration.
Conscience is the debugger of the mind

#### cocce

• Newbie
• Posts: 3
##### Re: Rubik's cube F2L solver
« Reply #8 on: October 15, 2012, 12:26:32 pm »
Very good job.

A question: Is it possibile to see/receive the source code?

Regards
Thanks.

I've updated the program with new features like OLL search and configuration.

#### circular

• Hero Member
• Posts: 3721
##### Re: Rubik's cube F2L solver
« Reply #9 on: October 20, 2012, 01:01:14 pm »
I'm not sure about releasing the source code for now.
Conscience is the debugger of the mind

#### User137

• Hero Member
• Posts: 1791
##### Re: Rubik's cube F2L solver
« Reply #10 on: October 20, 2012, 03:29:57 pm »
I can give source to my old rubik's cube (attached)    It was made back in 2006 for Delphi and doesn't know how to solve it automatically. But you are able to roll it with using just mouse.
- Mousewheel switches between 3 rotation modes (X, Y and Z rolling). (Also any key on keyboard does this too).
- Drag with left mousebutton to rotate 1 row.
- Drag with right mousebutton to rotate whole cube freely in 3D space (this is a rotation matrix implementation with OpenGL).

Uploaded win32 binary to google drive:
https://docs.google.com/open?id=0B7FII3MhcAHJa0otWjU1VE9kRTQ

And if you want to compile it, it used my old GLEngine which isn't available in public. Shouldn't be too hard to convert it to use the new nxPascal to make it run on Lazarus quite easily, if people want it.

#### Tony Stone

• Jr. Member
• Posts: 82
##### Re: Rubik's cube F2L solver
« Reply #11 on: June 26, 2021, 03:12:48 am »
So it is MANY years later.  Are you still unsure about releasing the source?  I just asked my 5 year old daughter to come up with a problem that we can solve by writing a computer program.  She brought me a Rubicks cube and said "this!! lets write a program that puts this back!"

So my skills aren't nearly good enough to solve that with Lazarus at this point!  Some day I hope... either way I would like to see if I can get her interested by using the source of a Rubicks Cube Solver.  lol... she can't really even read much yet so this may be a challenge but my older daughter who can read is very creative and smart.  So this may be the beginning of 2 genius programmers...

#### circular

• Hero Member
• Posts: 3721
##### Re: Rubik's cube F2L solver
« Reply #12 on: June 26, 2021, 04:09:58 am »
I think I lost the sources, so unfortunately I can't share it anymore.
Conscience is the debugger of the mind

#### Tony Stone

• Jr. Member
• Posts: 82
##### Re: Rubik's cube F2L solver
« Reply #13 on: July 02, 2021, 09:38:48 pm »
I think I lost the sources, so unfortunately I can't share it anymore.
Well that is sad. lol

#### MarkMLl

• Hero Member
• Posts: 3042
##### Re: Rubik's cube F2L solver
« Reply #14 on: July 02, 2021, 10:00:03 pm »
https://github.com/hkociemba/CubeExplorer might be worth a gander.

MarkMLl

Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories