camel wrote:
Code: Select all
my $doc='<param name="board" value="0040040400000,4434244404040,4433242322330,0040443314340,0000004010244,0004043442044,0003434302334,0444334004030,4403334004444,0333400404334,0040044440404,0040004444000,0434000403440,0404000444000"><param name="depth" value="5"><param name="pieces" value=".X.X,XX.X,.XXX,XX.. XXX ..X,XXX,X.. XXX,X..,X.. X,X,X X.X,XXX X..,XX.,.XX XX,XX XX X.X,XXX,X.X .XXX,..X.,XXX. X.X,XXX X..,XXX,..X X XX.X,X..X,XXXX,..X. XX.,.XX X.X,XXX,X.X XX.,.XX X.X,X.X,XXX XXX,X.X,XXX .X..,XX.X,.XXX ...X,X.XX,X.X.,XXX.,X.X. XXX,X.X X.X,XXX XXXX,X...,X... X..,XX.,.XX .XX.,XX..,.XXX XXX.,..XX,XXX.,.X.."><input type="text" name="gotolevel" size="3" value="9999" />';
My solver did it in 1716 ms (when meat in the middle disabled). (With meet in the middle allowed it solves the same board in 1452ms ... after 173957ms filling the meet in the middle tables).
But I am stuck on 38
Code: Select all
3
02121020,11200002,20012211,02100020,22220220,00011120,22110110,01100120
X..,X..,XXX,X.. X..,XX.,XXX,X.X,XX. XX..,.XXX,.XX.,..X.,..X. ...X.,..XX.,..XXX,.XX..,XX... XX..X,XXXXX,.X.X. .XX,XXX,.XX,.XX .XX,XXX,.X. X..,X..,XX.,XXX X...,XXXX,.XXX,XXX.,..X. ..XX.,..XXX,..XXX,XXXXX,.XX.. ...XX,XXXXX,..XXX,..XXX,.XX.. ..XXX,..X..,XXX..,.XX.. ..XX.,.XXX.,XXXXX,XXX.X,..X.. ..XX,XXX.,XXXX,..X. .X...,.XXX.,XXXXX,XXX..,..X.. X.X..,X.X.X,XXXXX,XXX.. X...X,XXXXX
anyways

.
For meet in the middle I have tried to maximize the possible table size ... I use zobrist hashing and I just set corresponding bit in the table. (Several board states could address the same bit, but when bit is not set I am sure the position is not solvable). I use 7 tables with halving size each next, addressing by different bits of 64 bit zobrist key. First table (the largest) is for level having about half possible options as is its size. There is probability about 1/2 of false match on the first level, but the probability goes quickly to 0 on next levels as the level sizes decrease much faster than the table sizes.
I am not sure the adressing overhead is worth it and heuristic counting how many squares are opened seems cuts good enough anyways. ... OK seems in levels where more than say 15 squares are left to open the meet in the middle helps.
After really long search I have solved
Code: Select all
3
02121020,11200002,20012211,02100020,22220220,00011120,22110110,01100120
X..,X..,XXX,X.. X..,XX.,XXX,X.X,XX. XX..,.XXX,.XX.,..X.,..X. ...X.,..XX.,..XXX,.XX..,XX... XX..X,XXXXX,.X.X. .XX,XXX,.XX,.XX .XX,XXX,.X. X..,X..,XX.,XXX X...,XXXX,.XXX,XXX.,..X. ..XX.,..XXX,..XXX,XXXXX,.XX.. ...XX,XXXXX,..XXX,..XXX,.XX.. ..XXX,..X..,XXX..,.XX.. ..XX.,.XXX.,XXXXX,XXX.X,..X.. ..XX,XXX.,XXXX,..X. .X...,.XXX.,XXXXX,XXX..,..X.. X.X..,X.X.X,XXXXX,XXX.. X...X,XXXXX
instead. ... Oops ... have I finally solved the original task?
And 39 was trivial ... ForwardTime: 126ms (after BackTime: 54881ms preprocessing).
Probably main reason is ... there exists a lot of solutions ...
I have cheated a bit by choosing easier level when the original looked difficult

. So finally I went among 43 level solvers ...
Level 44 is difficult especially because it has only one solution with very high probability. (It has statistically no solution, but one is guaranted by puzzle generator (I hope;)). I have chosen among given boards to have good chance to finish the computation. On previous levels, I have chosen manually from about at most 4 tasks by feel. On level 44 I have chosen from more tasks, I have used some statistics to allow the decision. Seems the chosen task is solvable in less than a day.
Yes ... it was 8h 9m 7s 428 ms forward time, 31s 30ms preprocessing. I have searched more than half of the search space.
Wow second seen task on 45 ... ForwardTime: 13s 191ms, preprocessing time 38s 657ms.
First task on 46 level estimated time 3h ... it is not worth a risk to try other tasks.
After solving 46 (in 56 minutes), I have returned to 38
Code: Select all
3
00220100,22000000,22120100,00211002,22210120,22200010,00011002,00222220
..X,XXX,.X.,.XX,XXX XX.,.XX,XX.,.X. XXXXX,XXX..,XXXX.,.X...,.X... ..X,..X,XXX,.X.,.XX X.X..,XXXX.,.XXXX,.XXXX .XXXX,.XXX.,XXX..,..X.. XX..X,.XXXX ..X..,.XX..,XXXX.,.XXXX,...X. X..,XXX ..XX,..X.,X.X.,XXXX,.XX. X.X,XXX,.X.,.XX,..X .XX..,XXXXX,..XX.,...X.,...X. .X..,XXXX XXXX.,XXXX.,XXXXX,.X... X.X..,XXX..,.XXXX,..XX. ..X..,XXX..,.XXX.,XXXXX,..X.X ..XX,..X.,XXX.
was under 8min ...
And now I can see my solution of 46 was not accepted ... and tasks are much harder now

... OK it was 45 rather than 46.
I have automated task selection ... but I have bug in level selection ... and therefore I have solved levels 47 and 48 several times

.
Level 50 seems to be next crucial level?!
Seems I should implement active border size reduction to be able to pass level 55.
... I had already 1/48 of level 55 solved ... and I have decided to restart the search ...
Wow good decision

I did it

.
But level 56 seems to bee too much ... may be using something faster than java? (Days->Hours would help...)
My attempt on level 56 is to reduce borders by placing several pieces and the task is chosen if the resulting expected solution time is reasonable. This selects one of about 80 tasks ... but the solution times are underestimated as always till now there was no solution in the reduced puzzle:(.
Task selection is much faster than task solving ... may be I should be more strict in the selection process.