hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Modulo Puzzle Rules

 
Reply to topic    hacker.org Forum Index » Modulo Puzzle View previous topic
View next topic
Modulo Puzzle Rules
Author Message
bok
Site Admin


Joined: 30 Jan 2007
Posts: 24

Post Modulo Puzzle Rules Reply with quote
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:
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:
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:
http://www.hacker.org/modulo/modulo.php?name=<username>&password=<password>&seq=010200000301

Wed Apr 25, 2007 4:02 pm View user's profile Send private message Send e-mail
mankala



Joined: 14 May 2007
Posts: 1

Post A question Reply with quote
There isn't a parameter to indicate the puzzle board and pieces?
Wed May 16, 2007 6:13 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 392

Post Reply with quote
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
Wed May 16, 2007 9:07 pm View user's profile Send private message Visit poster's website
Ttk01230



Joined: 06 Sep 2007
Posts: 1

Post Re: Modulo Puzzle Rules Reply with quote
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
Mon Sep 10, 2007 1:40 pm View user's profile Send private message
camel



Joined: 26 Dec 2007
Posts: 50
Location: Austria

Post Reply with quote
start by learning english dude.
Mon Dec 31, 2007 2:09 pm View user's profile Send private message
Zoie_Jedi



Joined: 21 Jan 2008
Posts: 1

Post Reply with quote
yes, english is good

programs and programming is even better >.<

*slinks off to practice more of the latter* Very Happy
Mon Jan 21, 2008 1:22 pm View user's profile Send private message
Allosentient



Joined: 10 Apr 2008
Posts: 273

Post Reply with quote
Anyone else find it funny that the word "neopets" is included in the meta keyword tag? Laughing
Fri Jun 20, 2008 7:37 pm View user's profile Send private message
Hippo



Joined: 01 Feb 2014
Posts: 334
Location: Praha 5

Post Reply with quote
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 ...
Tue Oct 28, 2014 2:54 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Modulo Puzzle All times are GMT
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.