Page 1 of 1

Modulo Puzzle Rules

Posted: Wed Apr 25, 2007 4:02 pm
by bok
If you've tried the Modulo puzzle you will have noticed that the puzzle gets pretty insanely hard to solve by hand when you pass the first few levels.
This is normal, the idea is that clever hackers will use all the resources at their disposition to solve the puzzle. For example, programming a puzzle solver on a computer, or network of computers, might help :wink:
We've made the HTML page very simple, so it is easy to parse and extract the puzzle parameters for any given level. You'll get the board layout, the list of shapes, and the board depth (how many colors can be on the board). You can also automate the submission of your solutions by requesting a URL with parameters.

Play the game, and see how far clever solvers can get.

RULES:
Each puzzle is an initial board, where each cell has a color, and a list of pieces. When you put a piece on the board, all the cells on which a part of the piece lands moves to the next color. The 'next' color for a cell is the current color number plus 1, modulo the depth of the board. Grey is 0, blue is 1, Yellow is 2 (you'll see other colors as puzzle levels go up). For example, for a board of depth 3, if a piece hits a cell of color 1, the color will become 2. If a piece hits a cell of color 2, the color will become 0, etc...
You need to place all the pieces, in order, on the board such that when all pieces are placed, the board only contains cells with color 0.
As the levels go up, you will see the difficulty level go up (more pieces, larger boards, more colors).

NOTES:
Here are a few details that will help if you want to automate your puzzle solver:

Get Parameters from the HTML page:
If you look at the source of the HTML page for the puzzle, you'll see an <applet> tag and some applet parameters. There are 3 parameters to each puzzle: 'depth', which is the number of different colors that can be on the board; 'board', which gives a representation of the initial board; 'pieces', which gives the list of the pieces to put on the board.
The 'board' string is a sequence of rows separated by ','. Each row is a sequence of cells, where a cell is represented by its color number.

Code: Select all

Example: <param name="board" value="0101001,0010101,1000011,0001100,1101000">
The 'pieces' string is a sequence of pieces separated by ' '. Each piece is a sequence of rows separated by ','. A row is a sequence of 'X' and '.', where 'X' is where the piece has a square, '.' is where the piece has a hole.

Code: Select all

Example: <param name="pieces" value="XX..,XX..,.XXX X....,X....,XXXXX,XXX.. X...,XXXX,X... ...X,.X.X,XXXX,..X. .XX,XX.,.X.,.X.,.X. ..X,XXX XX..,.XX.,..XX,..XX,..X. X..X,XXXX,.X.. XX..,.XX.,..XX,..X. XX...,XXXXX,XX... .XX,XX.,X.. X..X,XX.X,.XXX,..X.">

Submit a Solution via an HTTP GET:
The URL for the puzzle is http://www.hacker.org/modulo/modulo.php
The URL will accept parameters in the query part of the URL:
name=<username>
password=<password>

To submit a solution, use the following parameter:
seq=<coordinates>
where the coordinates are the coordinates at which to put the pieces, in order, each coordinate being a CCRR where CC is a hex number for the column and RR the hex number for the row (top-left corner of the board is column 0, row 0). For example, to submit a solution where the first piece goes to (1,2), the second to (0,0) and the third to (3,1), you would to an HTTP GET on the following URL:

Code: Select all

http://www.hacker.org/modulo/modulo.php?name=<username>&password=<password>&seq=010200000301

A question

Posted: Wed May 16, 2007 6:13 pm
by mankala
There isn't a parameter to indicate the puzzle board and pieces?

Posted: Wed May 16, 2007 9:07 pm
by adum
do you mean for submitting the solution? no, just the sequence. the board and pieces are expected to be the same (and same order) as when they were displayed in the page to you.

adum

Re: Modulo Puzzle Rules

Posted: Mon Sep 10, 2007 1:40 pm
by Ttk01230
Hello my good friend,
I'm Ttk a new member of hacker .org. really it just that i dont really no aba this hacker online and pls i need to know somthing aba hacker org.how can i work on hacker.org and i wanna no how this site works
REGARDS
Ttk01230

Posted: Mon Dec 31, 2007 2:09 pm
by camel
start by learning english dude.

Posted: Mon Jan 21, 2008 1:22 pm
by Zoie_Jedi
yes, english is good

programs and programming is even better >.<

*slinks off to practice more of the latter* :D

Posted: Fri Jun 20, 2008 7:37 pm
by Allosentient
Anyone else find it funny that the word "neopets" is included in the meta keyword tag? :lol:

Posted: Tue Oct 28, 2014 2:54 pm
by Hippo
Do I understand it well ... the board for given level changes over the time?

Is it guaranted that the board is changed for the account only after it is solved?

Or does go to the level changes the board?

Seems one can choose among the boards the board which more suits him ...