Coder Social home page Coder Social logo

ballsort's Introduction

Ball Sort

A solver for a ball sorting game.

In particular, this project solves this game in which a player sees a number of urns which are filled with scrambled balls. There are four balls of each color and two more urns than there are colors; two of the urns are entirely empty to start and the others are filled with a random assortment of the balls. In order to solve the puzzle, the balls must be moved around until each urn is filled with balls of only one color. Balls can be moved from the top of an urn to an empty urn or to a different urn that has fewer than four balls already and has a top ball of the same color as the moved ball.

Usage

For now, configuring the solver requires editing the code in solve.py to include the specific configuration that you are trying to solve (or to randomize a puzzle of a certain size). If you are using new color(s), add their names to the big equality at the top. Then you can describe a particular layout as a list of lists. If you want any solution, and not necessarily the most optimal, run the search function with optimal=False.

Run the solver with

python3 solve.py

or similar. It prints its results as it go

ballsort's People

Contributors

zswaff avatar

Watchers

James Cloos avatar  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.