Results:
In the sudoku challenge there were a total of 4 entries. Puzzles were collected that contained specific techniques that needed to be used to solve the particular puzzle optimally. The time taken to give a result to each individual puzzle is shown in the table below.
|
Eric^^ |
^Vampire^ |
Rejkpolg |
b00stA |
| Challenge Page Puzzle |
531 ms |
761 ms |
271 ms |
3mins 27secs |
| Block, Column, Row Interactions |
no result |
1min 19secs |
882 ms |
13mins 4secs |
| Locked Candidates |
no result |
42 secs |
no result |
1hr 25mins 37secs |
| Naked Pair/Triplet/Quads |
no result |
36 secs |
681 ms |
|
| Hidden Pairs |
no result |
1min 23secs |
761 ms |
|
| X-Wing |
no result |
22mins 12secs |
no result |
|
| Swordfish |
no result |
3 mins 26secs |
no result |
|
| Colouring |
no result |
1 min 8secs |
661 ms |
|
| Forcing Chains |
no result |
6 secs |
no result |
|
|
Nishio |
no result |
17mins 21secs |
2 secs |
|
'no result' means the puzzle was not solved.
Eric^^
Eric stated in his entry that it would only solve very simple puzzles, for example the one seen on the challenge page. His entry did not complete any other particular puzzle. The entry employs simple logic to solve puzzles and the code is roughly commented stating what aliases do what. His code seems slow in that it recursively looks for candidates for cells. It would be much more efficient to find candidates initially and then remove candidates as time goes along. When his entry did give solutions, it done so extremely efficiently. Although it goes without saying that Sudoku solvers should be able to solve all different kinds of puzzles.
4,239 bytes
^Vampire^
Vampire's entry solved all puzzles that were thrown at it. It was slow to generate solutions to puzzles but it would eventually get there. What I found particularly nice about this entry was the real-time view of what the solver was doing. A window was generated in which showed you what the solver was trying to do at the time. The code seemed to rely on using $line over and over again rather than using global variables which I found odd. The code appears to be using the more guess-and-check method.
2,501 bytes
Rejkpolg
This entry ran like the wind. It was fast. However, it failed to solve almost half of the puzzles. The code to solve the puzzles is somewhat complex. You could clearly see in the code the approach was to solve puzzles logically. However the opposite could be said for b00stA -
9,323 bytes
b00stA
This entry I ended up refusing to run after the '1hr 25mins 37secs' puzzle. Locked candidates is one of the more simpler techniques - yet for the most part I thought the entry went into an endless loop. If anyone wants to volunteer for giving their system up for a week to test the rest of the puzzles - be my guest. Though I sincerely doubt this entry will be winning any prizes for speed.
1,510 bytes
Winner
I honestly thought about this for a long time and still think its an inconclusive decision between Vampire's and Rejkpolg's entry. Vampire's entry solves all puzzles and was small in size and relatively quick for the most part. Rejkpolg's entry was lightning speed but failed almost half of the puzzles and was almost quadruple the size of Vampire's entry.
It was also hard to decide between Eric and b00stA entry. Although the challenge was for fastest and smallest sudoku solver - and Eric's entry was faster than b00stA - there were not many results to compare the two with. After long thinking I decided upon the following:
| 1st place | Vampire and Rejkpolg
|
| 2nd place | b00stA
|
| 3rd place | Eric
|
Congratulations to all participants. It has been hard work deciding how to judge the entries. Comments are welcome in the forum below.
Good luck on the next challenge.
garreh
|
Top Entries
Invalid Entries
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!