View Single Post
Old 01-27-2007, 07:11 PM   #17 (permalink)
KnifeMissile
 
KnifeMissile's Avatar
 
Location: Waterloo, Ontario
Quote:
Originally Posted by Sharon
This seems like an INCREDIBLY difficult game... is it actually playable (by humans) at the higher levels?
Apparently, it is playable unless there are better problem solvers out there than I am. There are, literally, millions of Neopets users so it's not outrages that some of them have managed to finish the entire string of puzzles (or know programmers who can solve the problem).

By the way, I'm glad to see you participating in various forums, here. Welcome to TFP!

Now, to give some more context to the discussion, here's the puzzle that my algorithm finds intractable.



Quote:
Originally Posted by twilight
Hmm, maybe you have overseen one aspekt of my last post - the row by row thing. This highly reduces the number of possible tries and solutions for the remaining lines.
Usually the last row requires the fewest number of shapes to solve than any other row. Once a row is solved, try to solve the next row with the remaining shapes.
Let's take a 8x8 blocks field with 20 shapes. Beginning with the last row, even if the last line requires 14 shapes to be solved, you only have to check, possible shape postions (you only need to multiply all possible x-positions of each shape),e.g.:
2 x 4 x 4 x 8 x 2 x 3 x 4 x 5 x 8 x 3 x 5 x 4 x 6 x 3 = 265.420.800
Why only 14? Easy the 6 remaining shapes are not enough to cover all remaining fields that need to be turned (this may be an additional check in your routine).
I guess, you can imagine that is it very unlikely that you need 14 images to solve the last row. In practice you need around numOfShapes/4, with our 20, this would mean 5 shapes to solve the last line...
With each solved row you GREATLY reduce further calculations, because both, field size and number of shapes to be tested against are reduced.
Okay, I did miss this "row by row thing" about your post but, after re-reading your original post as well as this quoted one, I still don't understand what you're saying.

I'm guessing that you made all those numbers up just as an example but I don't know why you think that "6 remaining shapes are not enough to cover all remaining fields." Also, I don't know why you think that "the last row requires the fewest number of shapes to solve than any other row." As far as I can tell, how many shapes each row needs to be solved with is independent of each other. Now, I do understand that the edge rows will statistically have fewer shapes on them but this is just as true for the first row as it is for the last. The second row as much as the second last row, etc... This doesn't sound like what you're trying to say. Furthermore, it sounds like you think that after we "solve" one row, we can use that solution to solve the other rows. Again, as far as I can tell, there are multiple solutions for each row and the only way to know which one contributes to the final solution is to iterate over all combinations of them and see which one actually works.

Going back to your original post, I'm not sure what distinction you're making between solving "one-field" at a time and "checking against a whole line." In order to check that a line is solved you need to verify that each "field" in the line is solved, right?

Finally, is your first language English? If it's not, I'm sure you're doing the best you can and, in all fairness, it's pretty good. If it is your first language, can you proof read your posts, please? Normally, it's not a big deal but when talking about complicated and very technical subjects, grammatical mistakes can seriously impedge clarity. Thank you...

As an aside, I can't help but notice that the two posts that you've made in this thread are the only posts you've ever made on this forum. Did you join this forum just to participate in this thread? If so, I find that very interesting. How did you come across it?

Quote:
Originally Posted by JinnKai
Because each state requires 0 or 1 hits in order to achieve the correct state (the sword thing, in this case), the shapes themselves can be abstracted away and you basically have a "Travelling Salesman" situation, do you not?

If so, your problem is NP-Complete, and intractable. If you solve it, you'd be eligible for almost $7 million in research rewards for solving NP-Complete problems of this type.
I don't think it's a travelling salesman problem. It may very well be NP-complete, I don't know, but the travelling salesman problem is a problem about optimal path finding under very specific constraints and I don't immediately see a reduction to that from ShapeShifter...


I'm glad people are still reading this thread, especially considering how dead Tilted Knowledge has become. I hope no one has given up and this problem because I haven't quite yet. I actually have some new ideas that I haven't implemented yet. I know they will reduce the execution time, I just don't know if they will reduce it enough and I can't until I actually implement them and run the program. Big bucks, no whammies!

Thank you all for participating...
KnifeMissile is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360