用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第三方库


热门话题
java Android Studio:我的短信应用程序不是默认短信应用程序的选项之一   java处理字符串问题   java为什么我的程序打印“null”而不是字符串?   java为什么要创建一个无限循环?   java循环在一段时间后将布尔值更改为false?   java Android Rest Api Post 400错误请求   java调用另一个方法以获取resultset并正确关闭连接?   java我想在2d数组中添加一行   Java:我需要从outputstream中获取字节数组   C语言中Java元注释的等价物#   java如何在从web下载图像时保持原始图像的dpi?   java中基于输入值的spring boot动态值   java从请求中获取主机名   java可以复制Swing代码并在intelliJ中的designer中查看它吗   spring如何使用java配置多个ldap   安卓如何在Java中使用具有多个类似参数的JSON请求/响应循环?   java LIbGDX如何在语言更改时翻译所有文本?