Description:
After a long break period I return with another mIRC scripting challenge.
In this challenge you are asked to solve a given Sudoku grid. The grid will be made in the traditional 9x9 grid and 3x3 regions. The puzzle to solve will be in the window called @Sudoku. The puzzle in the window may look like so:
(line1) 530070000
(line2) 600195000
(line3) 098000060
(line4) 800060003
(line5) 400803001
(line6) 700020006
(line7) 060000280
(line8) 000419005
(line9) 000080079
|
Note: (lineX) will not be present in the window @Sudoku - I merely added it to aid demonstration of the data format.
The number zero ('0') presents the unknown number in which needs to be solved. This particular example is taken from
Wiki Sudoku .
You will assume that the grid to solve resides in the window @Sudoku.
Your 'sudoku' alias must then return a new window to which the solved grid resides.
If the Sudoku puzzle in @Sudoku is unsolvable (error in the grid) then the alias should return $null instead of the new window name.
The full window name must be returned, e.g. '@solved' instead of just 'solved.'
The numbers in the new window must be in the same format as the original @Sudoku window.
The algorithm you use will reflect the speed of your alias - which is a scoring factor in this challenge.
Speed of the alias weighs more on your final score than the size of your code.
Example:
For reference to examples of different grids and their solution, follow these links:
Rules:
Alias name must be 'sudoku'
Alias MUST return the window name in which the solved grid resides.
Alias MUST return $null if the grid is impossible to solve
No dlls, coms, sockets or regular expressions
One submission per user
Your code will be taken for EXACTLY as submitted. Nothing will be changed in your submitted code - even if a subtle mistake is found.
Alias will be run on mirc v6.17.
Script must give correct results after consecutive runs.
File will be loaded into the remotes section
File we will be using to count the code: countcode.mrc
Code which exploits countcode.mrc will be rejected.
Alias will be run on a mirc with no variables set - a clean mirc.
Entries will be judged on code size, speed and whether they return the correct solved grid.
Feel free to ask any questions in the forum below.
Good luck!