Giter Site home page Giter Site logo

hypermikescube's Introduction

   __ __                    __  ____ __             _____     __            ________        
  / // /_ _____  ___ ____  /  |/  (_) /_____ ___   / ___/_ __/ /  ___      /⠡      /\       
 / _  / // / _ \/ -_) __/ / /|_/ / /  '_/ -_|_-<  / /__/ // / _ \/ -_)    /  ⠡..../..\      
/_//_/\_, / .__/\__/_/   /_/  /_/_/_/\_\\__/___/  \___/\_,_/_.__/\__/    /___⠌___/   /       
     /___/_/                                                             \  ⠌    \  /        
                                            An experimenal project        \⠌______\/         

https://www.youtube.com/watch?v=g9n0a0644B4

Given a number of cubes, how many ways could you uniquely arrange them?

The algorithm

  1. After generating an arrangment of cubes, we will compute it's hash.
  2. The number of consequative zeros at the start of the hash is the score.
  3. The last 8 bits mod num_buckets is the bucket to choose from.
  4. If the score is larger than the selected bucket's score, replace it.
  5. Repeat...
  6. Profit???
  7. Estimated arrangements = 2 ^ harmonic mean of buckets.

This results in a probabilistic method (which is suboptimal) of finding the number of cubes, but comes with far less coding, complexity, easy multithreading/scaling, and imo is "good enough" to at least get an estimate for larger numbers of cubes.

Caveats

  1. Rotation and flipping is not accounted for.
  2. It still takes quite a bit of computation.
  3. I have a potato as a PC.
  4. Have no idea when it converges (if it does?)
  5. Zero regard for multithreading, etc, just an experiment.

Results

todo

hypermikescube's People

Contributors

aveygo avatar

Stargazers

 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.