GithubHelp home page GithubHelp logo

hex_puzzle's Introduction

Escher Cubes Solver

Author: Tong Zhang (ztqwerty)
Date: Nov.1, 2021

Intro

This is a solver (WIP) for tackling the Escher Cubes puzzle.

The Escher Cubes puzzle is a packing puzzle designed by Jean Claude Constantin. The goal is to put all pieces into the cube base. There are existing reviews about this puzzle, like this one. So let's directly jump into the solver!

Demo Solving Process

To run the solver:

>> python hexagon_puzzle.py
  • The solving screenshot should be something like this:
escher_cubes_solver.mp4

Tips

  • The location of the pin hex can be set like: pin_hex = libhex.Hex(0, -3, 3) The defintion of the hex coordinates can be found in Hexagonal Grid website.

  • Once it finds a solution, it will print in the terminal. One can also plot the solution by running: Hex_plot_current_candi(Hex_Map, pin_hex, Sol)

  • See more in the Spoiler part in hexagon_puzzle.py

  • Currently the solver is quite slow (kind of a brute-force search). Optimization work TBD.

References

  • Hexagonal Grid from Red Blob Games: This site is quite helpful for providing some fundamental knowledge including math and modeling of 2D hexagon games.

  • I bought this puzzle from PuzzleMaster

hex_puzzle's People

Contributors

ztqwerty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.