用python解谜

puzzles的Python项目详细描述


#拼图

我最近开始喜欢拼图。在一个晚上的谈话中, 我们开玩笑说有一个数字拼图会有多酷。实际上 不会是个疯狂的想法-每个拼图都需要有某种 微小的传感器来了解它相对于其他传感器的位置,一些微小的传感器 显示图像的映射部分的数字显示器。既然如此 我们有类似kindle的技术,这种技术可以“持久和低功耗” 图像“似乎并不遥远。

但是使用传感器有点超出我的预算和现有的知识库。作为 我通常会这样做,我想把问题分解成更小的部分(双关语)。 也许有一个类似的问题我可以解决,这是正确的一步 方向?一个能解谜的机器人怎么样?

##高级算法

“机器人拼图求解器”意味着我们要执行以下操作:

  1. We take a picture of all the puzzle pieces on some consistently colored surface.
  2. The puzzle pieces are segmented.
  3. We represented features and edges of the pieces.
  4. Based on these features, the segmented pieces are put together by an algorithm.

##变量

我们需要在上面说明的一些事情(这些是一般的注意事项 现在)。

  • the puzzle pieces would ideally have consistent lighting and all be turned with picture upwards.
  • the camera, even from the top down, would introduce a bit of skew, both for shape and for color.
  • we can’t make any assumption about the shape or position of the pieces. This means that although we could represent an edge as some sort of curve, the second you introduce a weirdo pieces that doesn’t work well with the assumption, the algorithm breaks. For this reason, we might consider a pixel-based approach.
  • It could be the case that the algorithm can solve a puzzle as would a human - perhaps the edge pieces are easiest to do first, and then work from corners in?
  • We could do a recursive backtracking approach, where we start with edges, then work inwards from the corners, and choose the most probable piece given each new location with two “decided” edges. But as soon as the probabilities of a correct piece drop below some threshold, we should turn back.
  • Puzzles are real, and thus inherently imperfect. There needs to be an allowed margin of error.

##应用程序

尽管这很愚蠢,但对于机器人解谜器来说,还是有一些有趣的应用。

  • Puzzles are currently ranked on number of pieces, but I’ve found this isn’t a good representation for how difficult they are. The robot puzzle solver could come up with a metric that represents difficulty based on the algorithm.
  • Has anyone ever wondered how much harder it is to solve a puzzle if you are color blind? Given a metric of difficulty, we can see how that changes with different variables removed. For example, if we remove color, how much longer does the algorithm take?

#拼图求解器

我想记录这个过程,因为这是一个相对复杂的问题,需要 图像处理、机器学习和大量的创造力,如果不被打破的话,它们会让人感到难以承受 变成……碎片(好吧,我会阻止的)。我决定做的第一件事就是处理一些“虚拟”数据。 实际上我的位置很好,因为我有一个完全组装好的拼图,我可以拍照,贴标签 与“地面真相”,然后通过打破和拍摄在许多不同的碎片测试 方式。但首先,我想试着表现一个谜团。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
SpringWeb中的java更新/通知其他用户   java Lambda性能测试   java Bukkit插件:空白符号   java在按下按钮后改变彩色正方形的大小   javajavac相当于“D”?   java序列化接口   属性无法从属性文件返回值   java我应该使用什么查询来使用Jsoup从html页面提取符号?   java Android Studio项目结构问题   JAVA方法和返回值/公共变量(基础)   java将NativeQuery映射到POJO   java如何在下面的程序中消除NumberFormatException?   在java中获取链表与数组中的对象   java Android Firebase将用户发送到聊天室