15 puzzle solver: Difference between revisions
Content added Content deleted
Line 6,318: | Line 6,318: | ||
Works with PowerBASIC 6 Console Compiler |
Works with PowerBASIC 6 Console Compiler |
||
{{trans|Go}} |
{{trans|Go}} |
||
⚫ | |||
<lang PowerBASIC> |
|||
⚫ | |||
' Test not completed with 0c9dfbae37254861 (still running after about 4 hours). |
' Test not completed with 0c9dfbae37254861 (still running after about 4 hours). |
||
' Most of initialization is done in procedure fifteenSolver(), so it's possible to call it many times from the main function. |
' Most of initialization is done in procedure fifteenSolver(), so it's possible to call it many times from the main function. |
||
Line 6,327: | Line 6,325: | ||
' Program also includes a simple (text only) optional visualization of solving moves; the second (optional) parameter of fifteenSolver() is the pause between each move (in milliseconds). |
' Program also includes a simple (text only) optional visualization of solving moves; the second (optional) parameter of fifteenSolver() is the pause between each move (in milliseconds). |
||
' |
' |
||
' PowerBASIC compilers (both PBCC and PBWin) are 32 bits and |
' PowerBASIC compilers (both PBCC and PBWin) are 32 bits and is not that efficient when dealing with 64 bit integers (quad, only signed); |
||
' this is not a problem for additions and subtractions, but left/right shift are quite slow; |
' this is not a problem for additions and subtractions, but left/right shift are quite slow; |
||
' to speed up execution, left/right shift are done by inline X86 assembler (the PB statement is commented). |
' to speed up execution, left/right shift are done by inline X86 assembler (the PB statement is commented). |