魔方吧·中文魔方俱乐部

 找回密码
 注册
搜索
热搜: 魔方
查看: 2074862|回复: 58
打印 上一主题 下一主题

二阶魔方状态的计算程序 [复制链接]

Rank: 2

积分
487
帖子
45
精华
2
UID
4555
性别

六年元老

跳转到指定楼层
1#
发表于 2006-4-11 07:34:53 |只看该作者 |倒序浏览

本人将陆续将自己所编数据库源程序贴出, 供大家交流和研究. 由于时间和能力有限, 其中必然存在的许多不足之处, 希望各位爱好者给予指正.

本人所编程序运行时间偏长, 希望各位爱好者能找到更快、更好的方法!

多谢合作!

[此贴子已经被作者于2006-4-11 19:59:36编辑过]

魔方之友, 围棋之友.

Rank: 2

积分
487
帖子
45
精华
2
UID
4555
性别

六年元老

2#
发表于 2006-4-11 07:41:18 |只看该作者

文件名称: Cube2_V10.PRG

文件名称: Cube2_V10.PRG[本人自机运行时长约80分钟,可获得二阶魔方的所有状态及最小步数等]

******************************************************************
* 文件名称: Cube2_V10.PRG *
* 编程载体: Visual Foxpro 7.0 *
* 编程日期: 2006.02.08 *
* 程 序 员: 黑王子 *
* 主要功能: 计算并确认二阶魔方的最远状态 *
******************************************************************
SET TALK OFF
SET SAFETY OFF
SET PRIN ON
SET DEVICE TO PRINT
SET PRINT TO file Cube2_V10.SDF
CLOSE ALL DATA
CLEAR
KI=1
TIME0=TIME()
?SPACE(10)+"二阶魔方最远状态计算程序"+SPACE(8)+"编制者: 黑王子 2006.02.08"
?
?SPACE(5)+TIME()+" 下级转动库的建立"
Cube2="ABCDEFGHJKLMNPQRSWXYZ"
SELECT 0
USE DB2_00D
DELETE ALL
PACK
COPY TO DB2_01X
COPY TO DB2_01Y
COPY TO DB2_01Z
COPY TO DB2_01D
COPY TO DB2_02X
COPY TO DB2_02Y
COPY TO DB2_02Z
APPEND BLANK
REPLACE A2 with Cube2
REPLACE A3 with "0"
REPLACE A4 with 0
IF KI=1
T=Cube2
U11=subs(T,1,1)+SUBS(T,5,2)+SUBS(T,4,1)+SUBS(T,12,2)+SUBS(T,7,5)+SUBS(T,14,2)+SUBS(T,2,2)+SUBS(T,16,2)+SUBS(T,21,1)+SUBS(T,18,3)
U12=subs(T,1,1)+subs(T,12,2)+subs(T,4,1)+subs(T,14,2)+subs(T,7,5)+subs(T,2,2)+subs(T,5,2)+subs(T,16,2)+subs(T,20,2)+subs(T,18,2)
U13=subs(T,1,1)+subs(T,14,2)+subs(T,4,1)+subs(T,2,2)++subs(T,7,5)++subs(T,5,2)++subs(T,12,2)++subs(T,16,2)++subs(T,19,3)+subs(T,18,1)
U14=subs(T,20,2)+subs(T,3,4)+subs(T,1,2)+subs(T,9,1)+subs(T,8,1)+subs(T,11,2)+subs(T,7,1)+subs(T,17,1)+subs(T,14,3)+subs(T,18,2)+subs(T,13,1)+subs(T,10,1)
U15=subs(T,13,1)+subs(T,10,1)+subs(T,3,4)+subs(T,20,2)+subs(T,9,1)+subs(T,2,1)+subs(T,11,2)+subs(T,1,1)+subs(T,16,2)+subs(T,14,2)+subs(T,18,2)+subs(T,7,2)
U16=subs(T,7,2)+subs(T,3,4)+subs(T,13,1)+subs(T,10,1)+SUBSTR(T,9,1)+subs(T,21,1)+subs(T,11,2)+subs(T,20,1)+subs(T,15,3)+subs(T,14,1)+subs(T,18,2)+subs(T,1,2)
U17=subs(T,1,3)+subs(T,7,1)+subs(T,5,1)+subs(T,9,1)+subs(T,14,1)+subs(T,8,1)+subs(T,17,1)+subs(T,13,1)+subs(T,10,3)+subs(T,18,1)+subs(T,15,2)+subs(T,21,1)+subs(T,4,1)+subs(T,19,2)+subs(T,6,1)
U18=subs(T,1,3)+subs(T,14,1)+subs(T,5,1)+subs(T,17,2)+subs(T,8,1)+subs(T,21,1)+subs(T,12,2)+subs(T,10,2)+subs(T,4,1)+subs(T,15,2)+subs(T,6,2)+subs(T,19,2)+subs(T,9,1)
U19=subs(T,1,3)+subs(T,18,1)+subs(T,5,1)+subs(T,21,1)+subs(T,4,1)+subs(T,8,1)+subs(T,6,1)+subs(T,11,3)+subs(T,10,1)+subs(T,7,1)+subs(T,15,2)+subs(T,9,1)+subs(T,14,1)+subs(T,19,2)+subs(T,17,1)
USE DB2_01X
DELETE ALL
PACK
APPEND BLANK
REPLACE A2 with U11
REPLACE A3 with "1"
APPEND BLANK
REPLACE A2 with U12
REPLACE A3 with "2"
APPEND BLANK
REPLACE A2 with U13
REPLACE A3 with "3"
REPLACE ALL A4 with 1
USE DB2_01Y
DELETE ALL
PACK
APPEND BLANK
REPLACE A2 with U14
REPLACE A3 with "4"
APPEND BLANK
REPLACE A2 with U15
REPLACE A3 with "5"
APPEND BLANK
REPLACE A2 with U16
REPLACE A3 with "6"
REPLACE ALL A4 with 1
USE DB2_01Z
DELETE ALL
PACK
APPEND BLANK
REPLACE A2 with U17
REPLACE A3 with "7"
APPEND BLANK
REPLACE A2 with U18
REPLACE A3 with "8"
APPEND BLANK
REPLACE A2 with U19
REPLACE A3 with "9"
REPLACE ALL A4 with 1
USE DB2_01D
APPEND FROM DB2_01X
APPEND FROM DB2_01Y
APPEND FROM DB2_01Z
ENDIF
FOR KI=2 TO 12
?SPACE(15)+"DB2_02X.DBF的建立"
?SPACE(15)+"DB2_02Y.DBF的建立"
?SPACE(15)+"DB2_02Z.DBF的建立"
SELECT 1
USE DB2_02X
DELETE ALL
PACK
SELECT 4
USE DB2_02Y
DELETE ALL
PACK
SELECT 7
USE DB2_02Z
DELETE ALL
PACK
TIME1=TIME()
?SPACE(5)+TIME1+" 本级转动库的管理"
SELECT 2
USE DB2_01X
COUNT TO V2
SELECT 5
USE DB2_01Y
COUNT TO V5
SELECT 8
USE DB2_01Z
COUNT TO V8
?SPACE(15)+"DB2_01X.DBF的数据"+SPACE(25)+LTRIM(STR(V2))
?SPACE(15)+"DB2_01Y.DBF的数据"+SPACE(25)+LTRIM(STR(V5))
?SPACE(15)+"DB2_01Z.DBF的数据"+SPACE(25)+LTRIM(STR(V8))
TIME1=TIME()
?SPACE(5)+TIME1+" 本级转动库的处理"
SELECT 2
COPY TO DB2_U14
COPY TO DB2_U15
COPY TO DB2_U16
COPY TO DB2_U17
COPY TO DB2_U18
COPY TO DB2_U19
?SPACE(15)+"DB2_01X.DBF的分库已经生成"
??SPACE(50)
??TIME()
USE DB2_U14
REPLACE ALL A2 WITH subs(A2,20,2)+subs(A2,3,4)+subs(A2,1,2)+subs(A2,9,1)+subs(A2,8,1)+subs(A2,11,2)+subs(A2,7,1)+subs(A2,17,1)+subs(A2,14,3)+subs(A2,18,2)+subs(A2,13,1)+subs(A2,10,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"4"
REPLACE ALL A4 WITH KI
USE DB2_U15
REPLACE ALL A2 WITH subs(A2,13,1)+subs(A2,10,1)+subs(A2,3,4)+subs(A2,20,2)+subs(A2,9,1)+subs(A2,2,1)+subs(A2,11,2)+subs(A2,1,1)+subs(A2,16,2)+subs(A2,14,2)+subs(A2,18,2)+subs(A2,7,2)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"5"
REPLACE ALL A4 WITH KI
USE DB2_U16
REPLACE ALL A2 WITH subs(A2,7,2)+subs(A2,3,4)+subs(A2,13,1)+subs(A2,10,1)+SUBS(A2,9,1)+subs(A2,21,1)+subs(A2,11,2)+subs(A2,20,1)+subs(A2,15,3)+subs(A2,14,1)+subs(A2,18,2)+subs(A2,1,2)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"6"
REPLACE ALL A4 WITH KI
USE DB2_U17
REPLACE ALL A2 WITH subs(A2,1,3)+subs(A2,7,1)+subs(A2,5,1)+subs(A2,9,1)+subs(A2,14,1)+subs(A2,8,1)+subs(A2,17,1)+subs(A2,13,1)+subs(A2,10,3)+subs(A2,18,1)+subs(A2,15,2)+subs(A2,21,1)+subs(A2,4,1)+subs(A2,19,2)+subs(A2,6,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"7"
REPLACE ALL A4 WITH KI
USE DB2_U18
REPLACE ALL A2 WITH subs(A2,1,3)+subs(A2,14,1)+subs(A2,5,1)+subs(A2,17,2)+subs(A2,8,1)+subs(A2,21,1)+subs(A2,12,2)+subs(A2,10,2)+subs(A2,4,1)+subs(A2,15,2)+subs(A2,6,2)+subs(A2,19,2)+subs(A2,9,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"8"
REPLACE ALL A4 WITH KI
USE DB2_U19
REPLACE ALL A2 WITH subs(A2,1,3)+subs(A2,18,1)+subs(A2,5,1)+subs(A2,21,1)+subs(A2,4,1)+subs(A2,8,1)+subs(A2,6,1)+subs(A2,11,3)+subs(A2,10,1)+subs(A2,7,1)+subs(A2,15,2)+subs(A2,9,1)+subs(A2,14,1)+subs(A2,19,2)+subs(A2,17,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"9"
REPLACE ALL A4 WITH KI
USE
?SPACE(15)+" DB2_01X.DBF 中间库数据流向完成"
??SPACE(44)
??TIME()
SELECT 4
APPEND FROM DB2_U14
APPEND FROM DB2_U15
APPEND FROM DB2_U16
?SPACE(15)+"向 DB2_02Y.DBF 添加数据已经完成 "+STR(3*V2)
??SPACE(32)
??TIME()
SELECT 7
APPEND FROM DB2_U17
APPEND FROM DB2_U18
APPEND FROM DB2_U19
?SPACE(15)+"向 DB2_02Z.DBF 添加数据已经完成 "+STR(3*V2)
??SPACE(32)
??TIME()
SELECT 5
COPY TO DB2_U11
COPY TO DB2_U12
COPY TO DB2_U13
COPY TO DB2_U17
COPY TO DB2_U18
COPY TO DB2_U19
?SPACE(15)+"DB2_01Y.DBF的分库已经生成"
??SPACE(50)
??TIME()
USE DB2_U11
REPLACE ALL A2 WITH subs(A2,1,1)+subs(A2,5,2)+subs(A2,4,1)+subs(A2,12,2)+subs(A2,7,5)+subs(A2,14,2)+subs(A2,2,2)+subs(A2,16,2)+subs(A2,21,1)+subs(A2,18,3)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"1"
REPLACE ALL A4 WITH KI
USE DB2_U12
REPLACE ALL A2 WITH subs(A2,1,1)+subs(A2,12,2)+subs(A2,4,1)+subs(A2,14,2)+subs(A2,7,5)+subs(A2,2,2)+subs(A2,5,2)+subs(A2,16,2)+subs(A2,20,2)+subs(A2,18,2)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"2"
REPLACE ALL A4 WITH KI
USE DB2_U13
REPLACE ALL A2 WITH subs(A2,1,1)+subs(A2,14,2)+subs(A2,4,1)+subs(A2,2,2)++subs(A2,7,5)++subs(A2,5,2)++subs(A2,12,2)++subs(A2,16,2)++subs(A2,19,3)+subs(A2,18,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"3"
REPLACE ALL A4 WITH KI
USE DB2_U17
REPLACE ALL A2 WITH subs(A2,1,3)+subs(A2,7,1)+subs(A2,5,1)+subs(A2,9,1)+subs(A2,14,1)+subs(A2,8,1)+subs(A2,17,1)+subs(A2,13,1)+subs(A2,10,3)+subs(A2,18,1)+subs(A2,15,2)+subs(A2,21,1)+subs(A2,4,1)+subs(A2,19,2)+subs(A2,6,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"7"
REPLACE ALL A4 WITH KI
USE DB2_U18
REPLACE ALL A2 WITH subs(A2,1,3)+subs(A2,14,1)+subs(A2,5,1)+subs(A2,17,2)+subs(A2,8,1)+subs(A2,21,1)+subs(A2,12,2)+subs(A2,10,2)+subs(A2,4,1)+subs(A2,15,2)+subs(A2,6,2)+subs(A2,19,2)+subs(A2,9,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"8"
REPLACE ALL A4 WITH KI
USE DB2_U19
REPLACE ALL A2 WITH subs(A2,1,3)+subs(A2,18,1)+subs(A2,5,1)+subs(A2,21,1)+subs(A2,4,1)+subs(A2,8,1)+subs(A2,6,1)+subs(A2,11,3)+subs(A2,10,1)+subs(A2,7,1)+subs(A2,15,2)+subs(A2,9,1)+subs(A2,14,1)+subs(A2,19,2)+subs(A2,17,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"9"
REPLACE ALL A4 WITH KI
USE
?SPACE(15)+" DB2_01Y.DBF 中间库数据流向完成"
??SPACE(44)
??TIME()
SELECT 1
APPEND FROM DB2_U11
APPEND FROM DB2_U12
APPEND FROM DB2_U13
?SPACE(15)+"向 DB2_02X.DBF 添加数据已经完成 "+STR(3*V5)
??SPACE(32)
??TIME()
SELECT 7
APPEND FROM DB2_U17
APPEND FROM DB2_U18
APPEND FROM DB2_U19
?SPACE(15)+"向 DB2_02Z.DBF 添加数据已经完成 "+STR(3*V5)
??SPACE(32)
??TIME()

SELECT 8
COPY TO DB2_U11
COPY TO DB2_U12
COPY TO DB2_U13
COPY TO DB2_U14
COPY TO DB2_U15
COPY TO DB2_U16
?SPACE(15)+"DB2_01Z.DBF的分库已经生成"
??SPACE(50)
??TIME()
USE DB2_U11
REPLACE ALL A2 WITH subs(A2,1,1)+subs(A2,5,2)+subs(A2,4,1)+subs(A2,12,2)+subs(A2,7,5)+subs(A2,14,2)+subs(A2,2,2)+subs(A2,16,2)+subs(A2,21,1)+subs(A2,18,3)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"1"
REPLACE ALL A4 WITH KI
USE DB2_U12
REPLACE ALL A2 WITH subs(A2,1,1)+subs(A2,12,2)+subs(A2,4,1)+subs(A2,14,2)+subs(A2,7,5)+subs(A2,2,2)+subs(A2,5,2)+subs(A2,16,2)+subs(A2,20,2)+subs(A2,18,2)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"2"
REPLACE ALL A4 WITH KI
USE DB2_U13
REPLACE ALL A2 WITH subs(A2,1,1)+subs(A2,14,2)+subs(A2,4,1)+subs(A2,2,2)++subs(A2,7,5)++subs(A2,5,2)++subs(A2,12,2)++subs(A2,16,2)++subs(A2,19,3)+subs(A2,18,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"3"
REPLACE ALL A4 WITH KI

USE DB2_U14
REPLACE ALL A2 WITH subs(A2,20,2)+subs(A2,3,4)+subs(A2,1,2)+subs(A2,9,1)+subs(A2,8,1)+subs(A2,11,2)+subs(A2,7,1)+subs(A2,17,1)+subs(A2,14,3)+subs(A2,18,2)+subs(A2,13,1)+subs(A2,10,1)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"4"
REPLACE ALL A4 WITH KI
USE DB2_U15
REPLACE ALL A2 WITH subs(A2,13,1)+subs(A2,10,1)+subs(A2,3,4)+subs(A2,20,2)+subs(A2,9,1)+subs(A2,2,1)+subs(A2,11,2)+subs(A2,1,1)+subs(A2,16,2)+subs(A2,14,2)+subs(A2,18,2)+subs(A2,7,2)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"5"
REPLACE ALL A4 WITH KI
USE DB2_U16
REPLACE ALL A2 WITH subs(A2,7,2)+subs(A2,3,4)+subs(A2,13,1)+subs(A2,10,1)+SUBS(A2,9,1)+subs(A2,21,1)+subs(A2,11,2)+subs(A2,20,1)+subs(A2,15,3)+subs(A2,14,1)+subs(A2,18,2)+subs(A2,1,2)
REPLACE ALL A3 WITH SUBSTR(A3,1,KI-1)+"6"
REPLACE ALL A4 WITH KI
USE
?SPACE(15)+" DB2_01Z.DBF 中间库数据流向完成"
??SPACE(44)
??TIME()
SELECT 1
APPEND FROM DB2_U11
APPEND FROM DB2_U12
APPEND FROM DB2_U13
?SPACE(15)+"向 DB2_02X.DBF 添加数据已经完成 "+STR(3*V8)
??SPACE(32)
??TIME()
SELECT 4
APPEND FROM DB2_U14
APPEND FROM DB2_U15
APPEND FROM DB2_U16
?SPACE(15)+"向 DB2_02Y.DBF 添加数据已经完成 "+STR(3*V8)
??SPACE(32)
??TIME()
?SPACE(5)+TIME()+" 下级转动库的整理"+TIME()
SELECT 1
COUNT to HV10
APPEND FROM DB2_00
FOR I0=1 TO KI-1
File1="DB2_"+SUBSTR(LTRIM(STR(100+I0)),2,2)+"D.DBF"
APPEND FROM &File1
NEXT I0
SORT TO DB2_01E ON A2,A4
USE DB2_01E
COUNT to V10
GO TOP
T1=A2
FOR I1=2 to V10
GO I1
IF A2=T1
DELETE
ELSE
T1=A2
ENDI
NEXT I1
DELETE ALL FOR A4<KI
PACK
File2=".\过程库\DB2_"+SUBS(LTRI(STR(100+KI)),2,2)+"X.DBF"
COPY TO &File2
COPY TO DB2_01X
USE
SELECT 2
USE DB2_01X
COUNT to HV1
?SPACE(15)+" DB2_02X.DBF 的整理前"+STR(HV10)+" 整理后 "+STR(HV1)+" 排除量 "+STR(HV10-HV1)+SPACE(5)+TIME()

SELECT 4
COUNT to HV40
APPEND FROM DB2_00
FOR I0=1 TO KI-1
File1="DB2_"+SUBSTR(LTRIM(STR(100+I0)),2,2)+"D.DBF"
APPEND FROM &File1
NEXT I0
SORT TO DB2_01E ON A2,A4
USE DB2_01E
COUNT to V40
GO TOP
T1=A2
FOR I1=2 to V40
GO I1
IF A2=T1
DELETE
ELSE
T1=A2
ENDI
NEXT I1
DELETE ALL FOR A4<KI
PACK
File2=".\过程库\DB2_"+SUBS(LTRI(STR(100+KI)),2,2)+"Y.DBF"
COPY TO &File2
COPY TO DB2_01Y
USE
SELECT 5
USE DB2_01Y
COUNT to HV4
?SPACE(15)+" DB2_02Y.DBF 的整理前"+STR(HV40)+" 整理后 "+STR(HV4)+" 排除量 "+STR(HV40-HV4)+SPACE(5)+TIME()

SELECT 7
COUNT to HV70
APPEND FROM DB2_00
FOR I0=1 TO KI-1
File1="DB2_"+SUBSTR(LTRIM(STR(100+I0)),2,2)+"D.DBF"
APPEND FROM &File1
NEXT I0
SORT TO DB2_01E ON A2,A4
USE DB2_01E
COUNT to V70
GO TOP
T1=A2
FOR I1=2 to V70
GO I1
IF A2=T1
DELETE
ELSE
T1=A2
ENDI
NEXT I1
DELETE ALL FOR A4<KI
PACK
File2=".\过程库\DB2_"+SUBS(LTRI(STR(100+KI)),2,2)+"Z.DBF"
COPY TO &File2
COPY TO DB2_01Z
USE
SELECT 8
USE DB2_01Z
COUNT to HV7
?SPACE(15)+" DB2_02Z.DBF 的整理前"+STR(HV70)+" 整理后 "+STR(HV7)+" 排除量 "+STR(HV70-HV7)+SPACE(5)+TIME()

?SPACE(5)+TIME()+" 样本库的整理"
SELECT 10
USE DB2_01D
File1="DB2_"+SUBSTR(LTRIM(STR(100+KI)),2,2)+"D.DBF"
COPY TO DB2_01F
USE DB2_01F
DELETE ALL
PACK
APPE FROM DB2_01X
APPE FROM DB2_01Y
APPE FROM DB2_01Z
SORT TO DB2_01E ON A2,A4
USE DB2_01E
COUNT to V100
GO TOP
T1=A2
FOR I1=2 to V100
GO I1
IF A2=T1
DELETE
ELSE
T1=A2
ENDI
NEXT I1
PACK
COPY TO &File1

?SPACE(5)+TIME()+" 样本库的显示"
?SPACE(15)+"完成态"
??SPACE(9)
??"1"
TT=1
FOR I2=1 TO KI
File1="DB2_"+SUBSTR(LTRIM(STR(100+I2)),2,2)+"D.DBF"
USE &File1
COUNT TO V01
?SPACE(15)+"第"+SUBS((LTRIM(STR(100+I2))),2,2)+"步"
??V01
TT=TT+V01
NEXT I2
IF KI<11
?SPACE(15)+"合 计"
ELSE
?SPACE(15)+"总 计"
ENDI
??SPACE(10-LEN(LTRIM(STR(TT))))
??LTRIM(STR(TT))
?
TIME0=TIME()
?SPAC(10)+"状态库的归类"+SPAC(8)+TIME()
file1='DB2_'+SUBSTR(ALLTRIM(STR(100+KI)),2,2)+'D.DBF'
USE &file1
REPL ALL L1 with 0
REPL ALL L2 with 0
REPL ALL L3 with 0
REPL ALL L4 with 0
REPL ALL L5 with 0
REPL ALL L6 with 0
REPL ALL L1 with 1 FOR "A"$SUBS(A2,1,3)=.T. .and. "B"$SUBS(A2,1,3)=.T. .and. "C"$SUBS(A2,1,3)=.T.
?"L1计算已经完成"+SPAC(8)+TIME()
REPL ALL L2 with 1 FOR "D"$SUBS(A2,4,3)=.T. .and. "E"$SUBS(A2,4,3)=.T. .and. "F"$SUBS(A2,4,3)=.T.
?"L2计算已经完成"+SPAC(8)+TIME()
REPL ALL L3 with 1 FOR "G"$SUBS(A2,7,3)=.T. .and. "H"$SUBS(A2,7,3)=.T. .and. "J"$SUBS(A2,7,3)=.T.
?"L3计算已经完成"+SPAC(8)+TIME()
REPL ALL L4 with 1 FOR "K"$SUBS(A2,10,4)=.T. .and. "L"$SUBS(A2,10,4)=.T. .and. "M"$SUBS(A2,10,4)=.T. .and. "N"$SUBS(A2,10,4)=.T.
REPL ALL L4 with 1 FOR "P"$SUBS(A2,10,4)=.T. .and. "Q"$SUBS(A2,10,4)=.T. .and. "R"$SUBS(A2,10,4)=.T. .and. "S"$SUBS(A2,10,4)=.T.
REPL ALL L4 with 1 FOR "W"$SUBS(A2,10,4)=.T. .and. "X"$SUBS(A2,10,4)=.T. .and. "Y"$SUBS(A2,10,4)=.T. .and. "Z"$SUBS(A2,10,4)=.T.
?"L4计算已经完成"+SPAC(8)+TIME()
REPL ALL L5 with 1 FOR "K"$SUBS(A2,14,4)=.T. .and. "L"$SUBS(A2,14,4)=.T. .and. "M"$SUBS(A2,14,4)=.T. .and. "N"$SUBS(A2,14,4)=.T.
REPL ALL L5 with 1 FOR "P"$SUBS(A2,14,4)=.T. .and. "Q"$SUBS(A2,14,4)=.T. .and. "R"$SUBS(A2,14,4)=.T. .and. "S"$SUBS(A2,14,4)=.T.
REPL ALL L5 with 1 FOR "W"$SUBS(A2,14,4)=.T. .and. "X"$SUBS(A2,14,4)=.T. .and. "Y"$SUBS(A2,14,4)=.T. .and. "Z"$SUBS(A2,14,4)=.T.
?"L5计算已经完成"+SPAC(8)+TIME()
REPL ALL L6 with 1 FOR "K"$SUBS(A2,18,4)=.T. .and. "L"$SUBS(A2,18,4)=.T. .and. "M"$SUBS(A2,18,4)=.T. .and. "N"$SUBS(A2,18,4)=.T.
REPL ALL L6 with 1 FOR "P"$SUBS(A2,18,4)=.T. .and. "Q"$SUBS(A2,18,4)=.T. .and. "R"$SUBS(A2,18,4)=.T. .and. "S"$SUBS(A2,18,4)=.T.
REPL ALL L6 with 1 FOR "W"$SUBS(A2,18,4)=.T. .and. "X"$SUBS(A2,18,4)=.T. .and. "Y"$SUBS(A2,18,4)=.T. .and. "Z"$SUBS(A2,18,4)=.T.
?"L6计算已经完成"+SPAC(8)+TIME()
REPL ALL A5 with L1+L2+L3+L4+L5+L6
?"A5计算已经完成"
?
?SPACE(12)+"开始时间"+SPACE(8)+TIME0
?SPACE(12)+"结束时间"+SPACE(8)+TIME()
?SPACE(10)+"-----------------------------"
?SPACE(12)+"使用时间"+SPACE(8)
NEXT KI
SET PRINTER OFF
SET PRINTER TO
SET DEVICE TO SCREEN
CLOSE ALL DATA
SET SAFETY ON
SET TALK OFF
RETURN

[此贴子已经被作者于2006-4-11 20:36:33编辑过]

魔方之友, 围棋之友.

使用道具 举报

Rank: 2

积分
487
帖子
45
精华
2
UID
4555
性别

六年元老

3#
发表于 2006-4-11 07:48:46 |只看该作者

文件名称: DB2_00D.DBF

[基本数据库DB2_00D.DBF信息资料,运行Cube2_V10.PRG程序前建立]


表结构: E:\二阶魔方\DB2_00D.DBF
数据记录数: 1
最近更新的时间: 04/11/06
代码页: 936
Field 字段名 类型 宽度
1 A1 字符型 2
2 A2 字符型 21
3 A3 字符型 11
4 A4 数值型 2
5 A5 数值型 1
6 L1 数值型 1
7 L2 数值型 1
8 L3 数值型 1
9 L4 数值型 1
10 L5 数值型 1
11 L6 数值型 1
** 总计 ** 44


记录号 A1 A2 A3 A4 A5 L1 L2 L3 L4 L5 L6
1 ABCDEFGHJKLMNPQRSWXYZ 0 0


[此贴子已经被作者于2006-4-11 19:57:04编辑过]

魔方之友, 围棋之友.

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

4#
发表于 2006-4-27 12:45:33 |只看该作者

不错, SORT、DELETE、PACK 等语句加快了程序的进程! 加精了!
~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

5#
发表于 2006-4-27 12:45:53 |只看该作者

我准备利用 五一 黄金周 开发出快速求解程序!
~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

6#
发表于 2006-5-7 19:35:14 |只看该作者


正六面体二阶魔方-48“同态”图解,提供公式 键盘输入鼠标输入 两模式。

注: n 号位置镜像 是指: n 号位置为“后左上 0 位置”的“左右(对称)镜像”。

附件:调色工具,为大家配置自己喜欢的面块颜色。

~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

7#
发表于 2006-5-7 19:48:42 |只看该作者
以下是引用ggglgq在2006-4-27 12:45:53的发言:

我准备利用 五一 黄金周 开发出快速求解程序!


正六面体二阶魔方最远状态开解程序

虽然 五一 长假,但家务杂事颇多,暂时提供一个简易程序,容日后完善。

本程序 开解 时间: 赛扬 800 约六分钟 P4 系列计算机 约三分钟

开发环境:用速度较慢的 VB 6.0 研发测试

请大家先暂时凑合着使用 本软件

~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

8#
发表于 2006-5-7 20:31:30 |只看该作者

注:上面的程序是在 正六面体二阶魔方-48“同态” 的基础上进行的,每一态均代表
48“同态”! (希望大家不要产生误解!)

~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

9#
发表于 2006-5-12 16:13:34 |只看该作者

正六面体二阶魔方最远状态开解程序

版本升级 1.1 ,优化了 算法 ,在 P4 系列计算机 开解 约 一 分钟 !
~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

10#
发表于 2006-5-23 18:23:43 |只看该作者

顶!
~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

Archiver|手机版|魔方吧·中文魔方俱乐部

GMT+8, 2024-11-23 18:35

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部