Talk:15 puzzle solver: Difference between revisions

(Description of the F#/C++ algorithm)
 
Line 34:
position+_n*2.
--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:21, 28 July 2020 (UTC)
 
::Ah-ha! I think the penny has finally dropped!
let mc = manhattan_cost(puzzle)
while (not solveable_in(mc)) mc++
::Or, better yet:
let all moves which do not increase the manhattan cost be regarded as "free".
let n=0
while (not solveable_with_at_most_n_non_free_moves(n)) n++
::The new Phix solution implements this (albeit aiming for simplicity over spectacular efficiently). --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 13:18, 29 July 2020 (UTC)
 
== Code obfuscation / reference to implemented algorithm ==
As of today, 6 out of 14 implementations are translations of a same piece of code that is intentionally obfuscated and comes without any descriptions/explanations. It would be nice to see any proofs the implemented algorithm is correct (that is, detects an optimal solution).
7,794

edits