File: 11-spiegel-improved.script

package info (click to toggle)
pybik 0.5-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 776 kB
  • sloc: python: 4,591; makefile: 4; sh: 1
file content (203 lines) | stat: -rw-r--r-- 6,678 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
File-Version: 1.0
Copyright: 2011, B. Clausius <barcc@gmx.de>
Model: Cube 3
Ref-Blocks: f l u b r d

################################
# Solution: pos, block, moves
#  1. position on the cube, e.g. "rf" for the front-right edge or "ufr" for
#     the uppper-front-right corner. The order does not matter, "ufr" is equal to "fur".
#     Multiple blocks are separated by spaces.
#  2. The block at the position. The order matters and depends on the first field.
#     The number of blocks must be the same as in field 1.
#     "fr|fl": "fr" or "fl" is allowed at the position
#     "!fru": every block except "fru" is allowed at the position
#     "*fru": a block in any rotation state of "fru" is allowed at the position (fru, ruf, ufr)
#     "!*fru": every block except all "fru" rotations is allowed at the position
#     "f?u": "?" can be every face
#  3. The moves that should be applied to the cube.

Path: /Solvers/Spiegel improved
Depends: /Solvers/Spiegel improved/Bottom corner orient

Path: /Solvers/Spiegel improved/Top edges
Solution:
        uf=uf  ur=ur  ub=ub  ul=ul,  @@solved
        # Initial orientation of the top slice
        ur=uf   ub=!ub  ul=!ul,  u
        uf=!uf  ub=ur   ul=!ul,  u
        uf=!uf  ur=!ur  ul=ub,   u
        uf=ul   ur=!ur  ub=!ub,  u
        ur=!ur  ub=!ub  ul=uf,   u-
        uf=ur   ub=!ub  ul=!ul,  u-
        uf=!uf  ur=ub   ul=!ul,  u-
        uf=!uf  ur=!ur  ub=ul,   u-
        ur=!ur  ub=uf   ul=!ul,  uu
        uf=!uf  ub=!ub  ul=ur,   uu
        uf=ub   ur=!ur  ul=!ul,  uu
        uf=!uf  ur=ul   ub=!ub,  uu
        # uf is on top slice
        fu=uf,   fu-ru
        ur=*uf,  r-
        ub=*uf,  b
        ul=*uf,  l
        # uf is on middle slice
        fr=fu,  f-
        fr=uf,  u-ru
        fl=fu,  f
        fl=uf,  ul-u-
        br=fu,  uubuu
        br=uf,  u-r-u
        bl=fu,  uub-uu
        bl=uf,  ulu-
        # uf is on bottom slice
        fd=fu,  ff
        fd=uf,  f-u-ru
        dr=uf,  d-ff
        dr=fu,  rf-r-
        dl=uf,  dff
        dl=fu,  l-fl
        db=uf,  ddff
        db=fu,  u-d-ruf-
        # next edge
        ur=!ur, U
        ul=!ul, U-
        ub=!ub, UU

Path: /Solvers/Spiegel improved/Top corners
Depends: /Solvers/Spiegel improved/Top edges
Solution:
        ufr=ufr  urb=urb  ubl=ubl  ulf=ulf,  @@solved
        # corner is one of front bottom
        frd=fur,  r-d-r
        frd=rfu,  fd-f-r-ddr
        frd=urf,  fdf-
        fld=ruf,  r-dr
        fld=fru,  f-rfr-fd-f-
        fld=ufr,  d
        # corner is one of back bottom
        brd=fru,  d-
        brd=ufr,  fd-f-
        brd=ruf,  d-
        lbd=fru,  fdf-r-d-r
        lbd=ufr,  fddf-
        lbd=ruf,  d
        # corner rotated
        #fru=fru,
        fru=ufr,  r-dr
        fru=ruf,  fd-f-
        # corner is one of upper front
        flu=rfu,  ldl-
        flu=urf,  ld-l-
        flu=fur,  lr-dl-r
        # corner is one of upper back
        bru=rfu,  b-d-b
        bru=urf,  fb-d-f-b
        bru=fur,  rdrrddr
        blu=fru,  l-r-ddrl
        blu=ufr,  l-dlr-ddr
        blu=ruf,  l-fddf-l
        # Next corner
        bru=!bru,  U
        flu=!flu,  U-
        blu=!blu,  UU
        
Path: /Solvers/Spiegel improved/Middle slice
Depends: /Solvers/Spiegel improved/Top corners
Solution:
        fr=fr  rb=rb  bl=bl  lf=lf,  @@solved
        # Move edges from the bottom slice
        fd=fr,  d-
        rd=fr,  dd
        bd=fr,  d
        ld=fr,  r-drdfd-f-
        fd=fl,  d
        rd=fl,  ld-l-d-f-df
        bd=fl,  d-
        ld=fl,  dd
        # Next edge
        fd=rf|rb,  U
        rd=rf|rb,  U
        bd=rf|rb,  U
        ld=rf|rb,  U
        fd=lb|lf,  U-
        rd=lb|lf,  U-
        bd=lb|lf,  U-
        ld=lb|lf,  U-
        fd=br|bl,  UU
        rd=br|bl,  UU
        bd=br|bl,  UU
        ld=br|bl,  UU
        # If all above fails, move a wrong edge to the bottom slice
        fd=*?d  rd=*?d  bd=*?d  ld=*?d  fr=!fr,  r-drdfd-f-
        fd=*?d  rd=*?d  bd=*?d  ld=*?d  fl=!fl,  ld-l-d-f-df
        br=!br,  U
        bl=!bl,  U-

Path: /Solvers/Spiegel improved/Bottom edge place
Depends: /Solvers/Spiegel improved/Middle slice
Solution:
        df=*df  dl=*dl  db=*db  dr=*dr,  @@solved
        # Move the bottom slice is enough
        #df=*df  dl=*dl  db=*db  dr=*dr,      #flbr
        df=*dr  dl=*df  db=*dl  dr=*db,  d   #rflb
        df=*db  dl=*dr  db=*df  dr=*dl,  dd  #brfl
        df=*dl  dl=*db  db=*dr  dr=*df,  d-  #lbrf
        # Swap two edges is enough
        df=*dr  dl=*dl  db=*db  dr=*df,  dfldl-d-f-  #lfbr flrb fblr rlbf
        df=*df  dl=*dr  db=*dl  dr=*db,  ddfldl-d-f- #rlfb bflr rfbl frlb
        df=*db  dl=*df  db=*dr  dr=*dl,  d-fldl-d-f- #brlf rbfl lrfb bfrl
        df=*dl  dl=*db  db=*df  dr=*dr,  fldl-d-f-   #fbrl lrbf blrf lbfr
        # More than two edges needs to be swapped
        df=*dr  dl=*db  db=*dl  dr=*df,  d-fldl-d-f- #rblf
        df=*df  dl=*dr  db=*db  dr=*dl,  fldl-d-f-   #frbl
        df=*dl  dl=*df  db=*dr  dr=*db,  dfldl-d-f-  #lfrb
        df=*db  dl=*dl  db=*df  dr=*dr,  ddfldl-d-f- #blfr
        #
        , U

#TODO: Modify the previous paragraph so that this is not necessary
Path: /Solvers/Spiegel improved/Bottom edge orient
Depends: /Solvers/Spiegel improved/Bottom edge place
Solution:
        df=df  dl=dl  db=db  dr=dr,  @@solved
        # Turn edge
        dl=?d,  lu2lu2lu2lu2
        # Proceed to the next edge
        db=?d,  d
        df=?d,  d-
        dr=?d,  dd
        # Done, only turn back the bottom slice
        df=dr,  d
        df=dl,  d-
        df=db,  dd

Path: /Solvers/Spiegel improved/Bottom corner place
Depends: /Solvers/Spiegel improved/Bottom edge orient
Solution:
        dfl=*dfl  dlb=*dlb  dbr=*dbr  drf=*drf,  @@solved
        dfr=*dlf  dlf=*drb  drb=*dfr  dbl=*dbl,  fuffuuffu-f-d-fuffuuffu-f-d
        dfr=*dbl  dlf=*dfr  drb=*drb  dbl=*dlf,  fuffuuffu-f-dfuffuuffu-f-d-
        dfr=*dlf  dlf=*dfr  drb=*dbl  dbl=*drb,  fuffuuffu-f-ddfuffuuffu-f-dd
        dfr=*dbl  dlf=*drb  drb=*dlf  dbl=*dfr,  fuffuuffu-f-dfuffuuffu-f-d-
        #
        , U

Path: /Solvers/Spiegel improved/Bottom corner orient
Depends: /Solvers/Spiegel improved/Bottom corner place
Solution:
        dfl=dfl  dlb=dlb  dbr=dbr  drf=drf,  @@solved
        # Turn corner
        dfl=?d?,  lf-l-flf-l-f
        dfl=??d,  f-lfl-f-lfl-
        # Proceed to the next corner
        dlb=!d??  fl=!fl,  d
        drf=!d??  fl=!fl,  d-
        dbr=!d??  fl=!fl,  dd
        # Done, only turn back the bottom slice
        df=dr  dfl=d??  dlb=d??  drf=d??  dbr=d??,  d
        df=dl  dfl=d??  dlb=d??  drf=d??  dbr=d??,  d-
        df=db  dfl=d??  dlb=d??  drf=d??  dbr=d??,  dd
        #
        , U