Giter VIP home page Giter VIP logo

voltorb-flip's Introduction

Prerequisites

pip3 install attrs
pip3 install z3-solver

Use

$ python3 voltorb-flip.py
Enter col constraints left-to-right, then row constraints top-to-bottom as repeated "{sum} {voltorb count}"
5 0 6 1 4 2 6 1 3 2 6 1 3 2 6 0 6 1 3 2
Enter cell constraints as repeated "{row} {col} {val}"

num_soln 174
{1: 1.0}                              {0: 0.098, 1: 0.29, 2: 0.39, 3: 0.23} {0: 0.34, 1: 0.34, 2: 0.31}           {0: 0.098, 1: 0.29, 2: 0.39, 3: 0.23} {0: 0.46, 1: 0.54}
{1: 1.0}                              {0: 0.4, 1: 0.6}                      {0: 0.66, 1: 0.34}                    {0: 0.4, 1: 0.6}                      {0: 0.54, 1: 0.46}
{1: 1.0}                              {1: 0.69, 2: 0.31}                    {1: 0.62, 2: 0.38}                    {1: 0.69, 2: 0.31}                    {1: 1.0}
{1: 1.0}                              {0: 0.098, 1: 0.29, 2: 0.39, 3: 0.23} {0: 0.34, 1: 0.34, 2: 0.31}           {0: 0.098, 1: 0.29, 2: 0.39, 3: 0.23} {0: 0.46, 1: 0.54}
{1: 1.0}                              {0: 0.4, 1: 0.6}                      {0: 0.66, 1: 0.34}                    {0: 0.4, 1: 0.6}                      {0: 0.54, 1: 0.46}

$ python3 voltorb-flip.py
Enter col constraints left-to-right, then row constraints top-to-bottom as repeated "{sum} {voltorb count}"
5 0 6 1 4 2 6 1 3 2 6 1 3 2 6 0 6 1 3 2
Enter cell constraints as repeated "{row} {col} {val}"
2 1 2
num_soln 54
{1: 1.0}                              {0: 0.13, 1: 0.37, 2: 0.5}            {0: 0.3, 1: 0.2, 2: 0.5}              {0: 0.093, 1: 0.19, 2: 0.44, 3: 0.28} {0: 0.48, 1: 0.52}
{1: 1.0}                              {0: 0.37, 1: 0.63}                    {0: 0.7, 1: 0.3}                      {0: 0.41, 1: 0.59}                    {0: 0.52, 1: 0.48}
{1: 1.0}                              {2: 1.0}                              {1: 1.0}                              {1: 1.0}                              {1: 1.0}
{1: 1.0}                              {0: 0.13, 1: 0.37, 2: 0.5}            {0: 0.3, 1: 0.2, 2: 0.5}              {0: 0.093, 1: 0.19, 2: 0.44, 3: 0.28} {0: 0.48, 1: 0.52}
{1: 1.0}                              {0: 0.37, 1: 0.63}                    {0: 0.7, 1: 0.3}                      {0: 0.41, 1: 0.59}                    {0: 0.52, 1: 0.48}

voltorb-flip's People

Contributors

kellerb avatar

Stargazers

Zoey Greer avatar

Watchers

 avatar

Forkers

tempoz

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.