oyyq99999 发表于 2010-5-2 21:30:18

回楼上

把-1去掉不行,我后来试的另一个打乱出现了两个16步解,而且第二个是在threshold=15的时候第一阶段16步,第二阶段0步

aubell 发表于 2011-2-6 13:35:01

回复 91# 的帖子

伪码是这样的:maxLength=9999

function Kociemba ( position p)
  for depth d from 0 to maxLength
    Phase1search( p; d )
  endfor
endfunction

function Phase1search( position p; depth d )
  if d=0 then
    if subgoal reached and last move was a quarter turn of R, L, F, or B then
      Phase2start( p )
    endif
  elseif d>0 then
    if prune1<=d then
      for each available move m
        Phase1search( result of m applied to p; d-1 )
      endfor
    endif
  endif
endfunction  
function Phase2start ( position p)
  for depth d from 0 to maxLength - currentDepth
    Phase2search( p; d )
  endfor
endfunction

function Phase2search( position p; depth d )
  if d=0 then
    if solved then
      Found a solution!
      maxLength = currentDepth-1
    endif
  elseif d>0 then
    if prune2<=d then
      for each available move m
        Phase2search( result of m applied to p; d-1 )
      endfor
    endif
  endif
endfunction  不是去掉-1。我想我要慢慢理解这个2-phase。

lovelesszhou 发表于 2011-2-6 13:38:26

支持一下,虽然看不懂。。。

锋魔方 发表于 2018-8-17 16:30:09

感谢楼主。在8年前就研究了。我这小小辈学习呢。:lol:lol:lol不过现在我用VS2017编译是出好多错误的,

锋魔方 发表于 2018-8-17 16:31:37

支持支持楼主呢:lol
页: 1 2 3 4 5 6 7 8 9 [10]
查看完整版本: 非专业分析KCube