Timeline for Npuzzle solver using A* with Manhattan + Linear Conflict (Updated Code)
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 24, 2018 at 6:59 | comment | added | abyssmu | I just noticed I spelled heed by head... Whoops. Can't edit it either... lol. | |
| Oct 23, 2018 at 8:21 | comment | added | abyssmu | Heading your advice, I've gone through and renamed a few things to more appropriately reflect what they do. As for the n being needed all over the place, I've considered doing numerous things with it to get rid of passing it through everything. Now that I've got it actually solving everything it generates, I'm going to go through and expand it to different sized boards. And encode/decode, I wrote those thinking that they would be a rather fast way to create a key for a hash table. They most definitely fail at anything greater than 16 square tiles. lol. I'm working on that. | |
| Oct 21, 2018 at 10:43 | comment | added | G. Sliepen |
But you don't have to pass the size explicitly to functions anymore, so it should cancel out in many cases. Actually, if the board size is always constant, maybe using a global const variable n, and storing boards as std::array<int, n * n> would probably be the way to go. Or turn namespace Npuzzle into class Npuzzle, and make n a member variable of Npuzzle.
|
|
| Oct 21, 2018 at 10:32 | comment | added | user673679 | Just to note that storing the size with the board means a lot of unnecessary duplication in this case (an extra int or two for every board). But perhaps that's not worth worrying about. | |
| Oct 20, 2018 at 10:24 | history | edited | G. Sliepen | CC BY-SA 4.0 |
added 285 characters in body
|
| Oct 20, 2018 at 9:57 | history | edited | G. Sliepen | CC BY-SA 4.0 |
added 173 characters in body
|
| Oct 20, 2018 at 9:42 | history | answered | G. Sliepen | CC BY-SA 4.0 |