Submission Text Full Submission Page
  • Aims for fastest time
  • One player controls two players
  • Plays each stage once
  • Manipulates luck
  • Resets midway through
  • Genre: Puzzle
I wanted to try improving the solutions for this existing TAS because they seemed suboptimal and solving these puzzles in the fewest steps was an interesting problem to analyze.
Each puzzle can be simplified and reduced to an instance of the traveling salesman problem, where each of the ingots to be revealed is a vertex to be visited in the graph. For the easier (red) stages, each ingot needs to be duplicated as two nodes depending on which direction you are traveling through it since this affects the distance from that point to other points. This makes the problem a "generalized TSP" meaning that rather than visit every point we only need to visit one point out of each "cluster" of points. This type of problem can be easily converted into a regular TSP problem with some manipulation.
However, this only applies to the red stages. Where it gets interesting (as noted in the previous submission) is that after the first stage of each loop, the game begins to prohibit certain turns. Specifically, it prohibits a RD turn directly into a DR turn, and an UR turn directly into a RU turn. This is presumably because the player speed increases with each level which causes the player to miss the very small frame window allowing for switching between a CW or CCW turn (normally 1 or 2 frame window on the slowest speed). In order to account for this in my model I instead duplicated every vertex in the graph a maximum of six times depending on which direction the player travels through it and whether they are going straight, clockwise or counterclockwise. Then in the ensuing graph, I made sure not to directly connect any vertices that would only be directly connected by one of these illegal turns. This produces a distance matrix from which any ensuing solution will avoid these turns.
The 5th stage in each loop as well as the bonus stage both seem to have additional turn restrictions, however this is not actually the case. As it turns out, for some turns if you do a full connected 180-270 degree turn (by holding the button down the whole time), if you try to switch out of it into an opposite turn it won't let you. However, if instead of doing a full turn, you break it down into smaller turns (that is, if you are turning CW three times you do a 90 degree turn, release, grab back on and continue for another 90 degree turn, and so on), it delays your movement just slightly so that you are within the right frame window and are able to make that turn that seemed impossible.
After producing the distance matrix for each puzzle I then used the program LKH-3 ( http://akira.ruc.dk/~keld/research/LKH-3/ ) to solve the multiple TSP problem for 2 vehicles. Specifically you indicate the "min-max" objective meaning that you are trying to balance the paths in order to minimize the maximum path length for any vehicle.
Some problems with this simplified form of the puzzle are:
  • I simplified the distance between any two points in the graph as a generic cost of 1, except for doing U-turns via bumps against the stage boundary or rubber walls which are a distance of 2 to account for the time it takes for the animation. In actuality there is some slight frame invariance that comes up and not every "turn" is equal in length. But it's close enough to have produced very good improvements.
  • For some stages even if I complete the actual level faster, the ensuing tally screen might be longer resulting in an overall slower solution. I double checked the "true" length of each of my new solutions to make sure it was actually faster than my previous best.
  • In some stages, the proposed solution either results in the players colliding, or in a situation where too many ingots are being collected at once which will cause at least one of them to not register properly as the player passes over it (due to all of the "100 point" sprites on screen). In order to get around this in some stages I had one of the players start later than the other one so that they didn't pass over the same point at the same time & so not as many ingots are collected at once.
  • The behavior of the hidden rubber walls is a little harder to model because the way they work is that they are only revealed once you try passing through them straight, but you can freely rotate through them beforehand.
As for the tally screen:
  • Time is wasted awarding points for killed enemies so I don't kill any. For the most part I try to manipulate RNG to avoid enemies completely but in cases where I had to stun the enemies I made sure not to then crush them against a wall.
  • For stages with an even number of ingots, if each player collects exactly half of the ingots then the point tally will be shorter & neither player will be awarded a bonus. A lot of my solutions evenly divide the ingots but in some cases there were superior solutions where the number was intentionally uneven because the amount of frames added in the tally screen was much less than what was saved in the actual stage.
  • The game tallies down the game timer in increments of 10 time units. For solutions that would normally end with a multiple of 10 on the timer, usually if you intentionally stall yourself so that the timer runs down one additional time unit, you will save time overall.
There seems to be a frame rule in effect where delaying your completion of the level by a few frames still results in the next stage starting at the same time. In some cases it actually saves you time to delay a frame or two. Sometimes I intentionally delay a frame in order to avoid the clock item spawning in the next stage (since this causes the other player to stop moving).
For resetting back to the title screen, the original publication was kind of vague as to exactly when this should be done ("after the last screen flash") so I defined it here as making sure there are exactly 242 frames between when the P1/P2 sprites disappear and when the title screen is visible after resetting. Manipulating which stages appear in the loops is a matter of delaying when you press start (the level order for each loop is visible in RAM starting at 0x720) but getting each stage to appear among each of the 4 loops is kind of tricky. Rather than being truly random it seems like only about a third of the 1028 total possible combinations will ever appear as the pattern for the first loop. I spent 301 frames total manipulating this particular stage order but it's possible an improvement exists.

Memory: Judging
Memory: So this would appear to be a solid improvement over [2161] NES Clu Clu Land "2 players" by pdk in 11:06.17...
But unfortunately the published run and this one don't actually clear the hardest difficulty increment in an otherwise endless game. If you beat the stages without resetting, when the game loops, it enters a harder difficulty. According to our endless game rules, if there is a set amount of difficulty increments, one must beat all of them. Additionally, just because a published movie breaks the rule, that doesn't make it acceptable for runs going forward.
As such, rejecting.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15561
Location: 127.0.0.1
This topic is for the purpose of discussing #6855: Jigwally's NES Clu Clu Land in 10:31.54
RetroEdit
Any
Editor, Reviewer, Player (169)
Joined: 8/8/2019
Posts: 152
Hey! I just watched this and it looked pretty cool. I've wanted to see an updated run of Clu Clu Land for a while, and it's nice to be able to see one now. I also appreciate the modeling work that went into optimizing the solutions, and look forward to taking the time to read and understand it. By the way, you don't have to cancel your submission and make a whole new submission when you accidentally submit the wrong movie file. You can just ask for it to replaced, and a site staff member will be happy to replace it. (Also relevant in cases where there are small improvements that don't significantly alter the substance of the run.)
tormented
He/Him
Editor, Player (227)
Joined: 9/25/2015
Posts: 37
CrazyTerabyte wrote:
According to: http://www.gamefaqs.com/nes/563396-clu-clu-land/faqs/72591
Once you successfully complete all four of the patterns from the gold stage (completing 21 stages in total, including the bonus stages), […] if you cross over a revealed gold bar, it now flips over to reveal its dull, non-reflective side. Crossing over it again will toggle the gold bar between its regular shiny side and its dull, bland side.
In other words, an improvement to this movie would be to actually complete all patterns without resetting (or maybe reset only after the first level, since the first level doesn't repeat). That way, when the patterns start repeating, they will be in a "hard" difficulty (passing through a revealed gold bar will flip it). The movie would then re-complete the levels with this extra challenge. Tha means the movie would be twice as long for "true" completion of the game. Maybe a bit too boring.
This was brought up in the last submission thread, but I don't see any mention of it here. Could this be necessary for a full completion, since this game has no ending?
Jigwally
He/Him
Active player (427)
Joined: 3/11/2012
Posts: 119
I genuinely didn't know about that. Oops Okay, the problem of solving those levels then becomes a lot more complex & I'm not sure yet the best way to do it
Memory
She/Her
Site Admin, Skilled player (1552)
Joined: 3/20/2014
Posts: 1765
Location: Dumpster
How does this work exactly and why is not resetting required?
[16:36:31] <Mothrayas> I have to say this argument about robot drug usage is a lot more fun than whatever else we have been doing in the past two+ hours
[16:08:10] <BenLubar> a TAS is just the limit of a segmented speedrun as the segment length approaches zero
Jigwally
He/Him
Active player (427)
Joined: 3/11/2012
Posts: 119
In the current TAS only the first version of the stages are played. Without resetting you'd have to play the bonus stage 3 times (between each loop) to show all content. If I redo the TAS with the harder version of the stages I have to beat them all in a row without resetting, which means playing the Bonus Stage at least 7 times. (I think the Bonus Stage is identical regardless of the loop it's on so playing it a final 8th time may be redundant). Anyway I think I have a way to modify my current solver for the harder version of the levels. A valid solution has every ingot visited an odd number of times, but rarely will any ingot need to be visited more than once. So if I assume that the solution has each ingot visited exactly once, then I can modify the distance matrix to only reflect paths where no intermediary ingots are crossed. In other words, if it is impossible to go from ingot A to ingot B without crossing over ingot C, the distance between A and B is functionally infinite (999). So I'll try that out but I have to make a new movie from the start without any resets. All of my level solutions can very easily be copy-pasted with just minor modifications to account for RNG manip so that part will go very quickly.
Jigwally
He/Him
Active player (427)
Joined: 3/11/2012
Posts: 119
Remaking the TAS has been harder than I anticipated, specifically the issue I mentioned with the ingots not spawning when too great a density of them are collected. Initially this was only an issue for a few levels & I was able to work around it but I'm having a lot more trouble now for certain stages. If I worked out a measure of what that density is I could write an A* search that works around that constraint but I don't know how long it would take to produce a decent solution. Which version of the TAS is to be made hinges on whether or not the 2nd set of levels is considered required for "all game content". The levels themselves look the same both times but the change in gameplay makes then technically different. However from a casual viewer's perspective the gameplay looks nearly the same & it wouldn't even be obvious the TAS is doing anything but replay the same exact levels twice unless they read the notes. And like I said in that version of the TAS without any resets you'd have to show the same Bonus stage 7 or 8 times which is very repetitive. For reference here are some of the solutions I produced that satisfy the "Ingot Flips Back Over" rule: https://imgur.com/a/xXZ000y So there's probably a case that the current submitted version is the better publication material. But if that's not the consensus then I might request this submission be cancelled so you aren't waiting on me to finish the other version.
Joined: 10/21/2010
Posts: 6
It was interesting to watch optimal pathing, and controlling two players at once makes it even better.
Submission wrote:
For stages with an even number of ingots, if each player collects exactly half of the ingots then the point tally will be shorter & neither player will be awarded a bonus. A lot of my solutions evenly divide the ingots but in some cases there were superior solutions where the number was intentionally uneven because the amount of frames added in the tally screen was much less than what was saved in the actual stage.
Thanks, I was wondering about that when watching. It reminded me of the round bonus in Zombies Ate My Neighbors.
Memory
She/Her
Site Admin, Skilled player (1552)
Joined: 3/20/2014
Posts: 1765
Location: Dumpster
I've discussed it and we absolutely would prefer the run with the harder difficulty included.
[16:36:31] <Mothrayas> I have to say this argument about robot drug usage is a lot more fun than whatever else we have been doing in the past two+ hours
[16:08:10] <BenLubar> a TAS is just the limit of a segmented speedrun as the segment length approaches zero
TASVideosGrue
They/Them
Joined: 10/1/2008
Posts: 2785
Location: The dark corners of the TASVideos server
om, nom, nom... *burp*!
Joined: 10/28/2013
Posts: 130
Location: United States
I really like the work done here! I hope it gets developed into a longer submission that includes the harder difficulty increments.