Verification trick

Verification trick

fmstephe的头像

Because there are so many potential solutions it can be hard to determine if your solver is searching the entire space. I have started searching for every solution in the example puzzle to determine that changes aren't breaking completeness. Lacking any proof, the rule of thumb is 86 unique solutions for the example puzzle. If anyone else tries this trick, I'd appreciate if you could post your number of unique solutions - just to see if we can agree on that :)

10 帖子 / 0 new
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
john_e_lilley的头像

My solver doesn't output all solutions, but it does validate a solution. So if you want to post all of the solutions you found to the sample, I will validate them.

fmstephe的头像

Thanks John, I am validating them myself. I was really just trying to ensure that my search - as I am using depth first search - was totally exhaustive. :)

john_e_lilley的头像

How are you doing on the hard problems? Exhastive is good, but infeasible for a lot of problems.

fmstephe的头像

I only switch to exhaustive search of all solutions for the small problems. That is well beyond my solver to do for anything large.

fmstephe的头像

Ok, I can now do exhaustive solution enumeration on a few of the problems you posted in that zip file. It was adding in the rule that more than three white pebbles in a row forces you to zig-zag that allowed that break-through.

Daniel Trebbien的头像
Quoting fmstephe Ok, I can now do exhaustive solution enumeration on a few of the problems you posted in that zip file. It was adding in the rule that more than three white pebbles in a row forces you to zig-zag that allowed that break-through.

The path through three adjacent white circles in a row or column does not have to be a zig-zag. Here is an example from my write-up:

The solution loop zig-zags through the bottom set of three white circles in a row ((9, 2), (9, 3), and (9, 4)), but does not zig-zag through the three adjacent white circles at (5, 1), (5, 2), and (5, 3).

fmstephe的头像

That is absolutely true. Zig-zag was a poor choice of words. Parallel connections is a better way of describing it.

邓辉的头像

写字楼里写字间,写字间里程序员 程序人员写程序,又拿程序换酒钱 酒醒只在网上坐,酒醉还来网下眠 酒醉酒醒日复日,网上网下年复年
的头像

登陆并发表评论。