用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如何编写带有连接的动态JPA查询?   子列表上的java分区列表,其中相邻子列表的第一个和最后一个元素相同   java限定符注释方法找不到作为配置类的bean   java同时抛出主异常和子类型,有合适的方法吗?   LString将是一个链表类,它模仿标准的JavaString和StringBuilder类   spring上下文关闭时java停止ConcurrentTaskScheduler   Java继承基类使用派生类方法   java Google的zxing(斑马线)条形码库的位矩阵不是它应该位于的位置   java使用springhateoas反序列化包含(_链接和_嵌入)的JSON   java破坏者如何使用环形缓冲区读取文件?   java在Android中获得用户的日常路线?   javajenkins:依赖于其他工件/项目的构建作业   java家庭替换应用程序/视图网格使用哪种布局?   java如何从签名证书创建信任库和密钥库?