Code Monkey home page Code Monkey logo

voltorbflipdotcom's Introduction

Voltorb Flip Screenshot

Voltorb Flip is a puzzle minigame found in the Goldenrod Game Corner and Celadon Game Corner in Pokemon Heart Gold and Soul Silver for the Nintendo DS. It is a game of both skill and chance that plays like a cross between Picross and Minesweeper. It replaces the traditional slot machines found in past Game Corners, and appears in all languages of the games, except for the Japanese release, which instead has slot machines. For an in-depth explanation of the rules of Voltorb Flip, see Bulbapedia's article on Voltorb Flip.

VoltorbFlip.com is a website that takes Voltorb Flip puzzles as input and automatically solves them as efficiently as possible. Since Voltorb Flip has an element of chance to it though, this solver cannot successfully solve every single puzzle 100% of the time. However, it does tell the user the best moves they can make in any puzzle.

How It Works

Given a board as input, which includes the row/column totals as well as any flipped cards' values, the solver follows a simple algorithm:

  1. Run a set of heuristic algorithms against the inputted board which deduce any possible information they can about values the unflipped cards on the board. One example of one of these heuristic algorithms is "if the number of remaining hidden Voltorbs plus the number of remaining hidden points in a row totals to exactly the number of unflipped cards, then it is known that all unflipped cards in this row must have a value of 1". There are several such heuristic algorithms that this program uses. I came up with some of these heuristic algorithms myself, but some of the more inventive ones came from this Voltorb Flip guide.
  2. If there are still any unflipped 2 or 3 cards remaining, check if there are any cards that are known not to be Voltorbs on the board. If so, ask the user to flip those cards, since they are completely safe to flip.
  3. If there are still any unflipped 2 or 3 cards remaining, create a list of all possible valid solutions to the current board. This is done using a breadth-first search.
  4. Using this list, find the unflipped card on the board that is the safest guess. The safest card to guess is the one that is a Voltorb the least amount of times in all the possible solutions.
  5. Prompt the user to flip the safest card found in the previous step.
  6. Repeat until the user either finds all of the 2 and 3 cards (which means they won) or the user finds a Voltorb (which means they lost).

How to Run

To just use the solver, go to http://voltorbflip.com. To run it locally, generate the static HTML portion of the site and then use the provided Dockerfile:

cd jekyll-site
bundler exec jekyll b
cd ..
docker build -t voltorbflipdotcom .
docker run -d -p 8080:8080 voltorbflipdotcom

After completing the steps above, the solver should be accessible through the URL http://localhost:8080.

voltorbflipdotcom's People

Contributors

mrtenda 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.