Joined: 10/20/2006
Posts: 1248
I started a TAS of this game a long time ago. You can find it here: http://dehacked.2y.net/microstorage.php/info/2403/Kuwaga_-_Mario_no_Super_Picross.smv You can solve those puzzles really fast because there are two players and two buttons to hit a square with per player. So it's possible to hit up to 2 squares every frame. But you have to move in zig zag lines, as you can't go into the same direction for two consecutive frames because the game would obviously think you just didn't let go of the button. Holding up to 6 buttons using frame advance can be quite annoying, so I wrote a major part of this WIP in hex. Finding the fastest solution can be quite troublesome too, but I'm quite confident that you can't improve any of the levels I did. However, I'm not going to work on this anymore. The reason for this is something I noticed while doing stage 1-I. 54 frames is the amount of time you need hitting all squares of a 10x10 puzzle. It took me like a whole day, I think, to come up with a 53 frame solution for 1-I. Then, after I had rewritten the level in hex, I tried to start the next level one frame earlier, but guess what. Solving the puzzle one frame faster produces 2 frames of additional lag. So the 54 frame solution is actually faster. I also tried to write a program which would find the solutions and write the hex code for me. But my algorithm sucks and it doesn't terminate on larger levels even after more than 24 hours. There has to be a better algorithm because I'm able to do better than my program, but I also suck at "reading my mind" to find the algorithm there. I guess a good algorithm would be to search the levels for basic overlapping patterns like two square thick lines, stairs or something like that, but I'm too lazy to do it. So I finally gave up. ^^ If anybody wants to continue this run, just do it.
SXL
Joined: 2/7/2005
Posts: 571
I have no doubt that it's an interesting programming experience to generate optimal solutions, but it's not the first time a picross is chosen as for a tas project, and everyone agreed that the results are boring, hence not publishable. I say that because I had an even more complicated idea than you : write a program that would actually solve every level like a human, by deduction. but it would require a "read info from screen" feature, and results wouldn't be optimized so they could be beaten by any tas such as yours, so I gave up.
I never sleep, 'cause sleep is the cousin of death - NAS
Joined: 10/20/2006
Posts: 1248
Has it really been 5 years? >_> Here's an idea: 1) Start the game 2) Run [URL=http://pastebin.com/vYXbVNhv]this[/URL] lua script 3) Select a level 4) ????? 5) Profit
SXL
Joined: 2/7/2005
Posts: 571
Hahaha, will do. I'm guessing it reads the solution from memory and try the shortest path. I still have that program that plays with just the screen indications. It solves maybe 50% of the GB levels and 30% of SNES. I work on it when I'm very bored. See you again in 5 years !
I never sleep, 'cause sleep is the cousin of death - NAS
Joined: 10/20/2006
Posts: 1248
No, it doesn't use the shortest path. It just uniformally uses the same path on all puzzles (fastest path to fill the whole picture for two players) and marks all the necessary squares on the way to solve it. At some pictures I had to insert a frame of no input or it would mess up due to lag. Nothing spectacular and horrible coding, but at least it's something. To write something that finds the actual shortest fastest possible path probably isn't worth the effort. And the problem with emulating a human solving these puzzles would probably be that there are some levels where you have to take guesses. A read from the screen feature wouldn't be necessary, as I've been able to find the relevant numbers in a RAM search (maybe you'd consider that to be cheating though?). Of course our posts above are from pre-lua times, so it wouldn't have been as easy back then. ;p
SXL
Joined: 2/7/2005
Posts: 571
I've downloaded every picross game faq I could find on gamefaqs and processed them in my (crude) tool. I've played many, included the 30x30 that are usually proposed as 4 separated 15x15 puzzles, and guesses are actually very rare, thanks to the efforts from the Nintendo game designers. So it's possible to work with just the indications, I just have to find how to extract the memory addresses... when my analyzing algorithm is decent enough. I'll try to learn LUA by reading your code and plug my tool into yours.
I never sleep, 'cause sleep is the cousin of death - NAS
Joined: 10/20/2006
Posts: 1248
The numbers displayed for each puzzle for the horizontal rows start at 0x7e1634 in memory, for the vertical ones at 0x7e1834.