Donkey Kong Forum

General Donkey Kong Discussion => General Donkey Kong Discussion => Topic started by: ebinsugewa on December 09, 2013, 12:58:34 am

Title: What do you think a tool-assisted score of arcade DK would look like?
Post by: ebinsugewa on December 09, 2013, 12:58:34 am
I saw an interesting discussion in the shoutbox so I figured I would open it up for a bit more discussion. There are tools that allow you to play games essentially frame-by-frame, allowing perfect play. Given that DK still has some random elements, what do you think a tool-assisted score would look like? I saw 1.5 and 2 million thrown out there as guesses to start.
Title: Re: What do you think a tool-assisted score of arcade DK would look like?
Post by: marinomitch13 on December 09, 2013, 01:18:29 am
Vince and I once calculated around 4.5m for the theoretical max, so, just looking at that, I'd say maybe 2-2.5m would be tops for a simple savestate TAS. Anything beyond that I would imagine would be so tedious that it would likely never be attempted at that level. Even above 2m might be pushing it. I mean, I once spent like 5 hours just trying to savestate 20k+ on 1-1, when (if I remember correctly) the theoretical max is in the low 30Ks!
Title: Re: What do you think a tool-assisted score of arcade DK would look like?
Post by: Jeffw on December 09, 2013, 10:34:16 am
Well, assuming you could do perfect RNG manipulation the maximum possible score is unbounded, meaning any finite score is possible to achieve. In fact, any finite score is possible to achieve on the first screen alone. The way to do this is to continuously manipulate RNG to force donkey kong to pause indefinitely and never release a barrel, and then rack up points by leaching the fireballs. You would have infinite time on the screen to get as many points as you want.

In practice, making a TAS like this would be extremely tedious because for 5 consecutive frames for every 32 frames you would have to make sure that the lowest bit of the RNG is 0. Since a single jump to get points takes more than 32 frames you will be passing over these 5 consecutive frames while in the air. There is little that you can do to manipulate RNG while in the air, so making sure that the RNG bit is 0 for all 5 consecutive frames would be a matter of manipulating RNG before the jump by trial and error until you happen to get a 1/32 case where the RNG bit is 0 for all 5 frames during the jump.
Title: Re: What do you think a tool-assisted score of arcade DK would look like?
Post by: up2ng on December 09, 2013, 03:30:15 pm
Wow, that's so sick, I never thought of that! 
Title: Re: What do you think a tool-assisted score of arcade DK would look like?
Post by: qnz on December 09, 2013, 03:55:44 pm
Well, assuming you could do perfect RNG manipulation the maximum possible score is unbounded, meaning any finite score is possible to achieve. In fact, any finite score is possible to achieve on the first screen alone. The way to do this is to continuously manipulate RNG to force donkey kong to pause indefinitely and never release a barrel, and then rack up points by leaching the fireballs. You would have infinite time on the screen to get as many points as you want.

In practice, making a TAS like this would be extremely tedious because for 5 consecutive frames for every 32 frames you would have to make sure that the lowest bit of the RNG is 0. Since a single jump to get points takes more than 32 frames you will be passing over these 5 consecutive frames while in the air. There is little that you can do to manipulate RNG while in the air, so making sure that the RNG bit is 0 for all 5 consecutive frames would be a matter of manipulating RNG before the jump by trial and error until you happen to get a 1/32 case where the RNG bit is 0 for all 5 frames during the jump.
That's an awesome idea.  If that level of control is really possible, you might be able to (ab)use the same thing to get past the kill screen, too, no?!  That is if you can't leach forever on a given board, for some reason.  Or you just feel like doing it because...

I kind of suspect the RNG isn't controllable to that degree, but who knows.


Todd
Title: Re: What do you think a tool-assisted score of arcade DK would look like?
Post by: Jeffw on December 09, 2013, 07:05:19 pm
Yes, the killscreen is technically possible to complete, however it's too unlikely to ever happen in a real game.

I don't see why the RNG wouldn't be controllable enough to do this. Every frame you have 3 possible inputs that you can give: either left, right, or nothing. Each choice will result in a different sequence of random numbers, and not only that, but due to the nature of the DK random number generator the three possible sequences very quickly diverge to become totally independent of each other. This is just with a single frame, now if we look at say, 10 frames, with 3 possible inputs on each frame we get 3^10 = 59049 possible sequences of random numbers, which seems like more than enough to be able to find one that allows getting a 0 least significant bit for 5 consecutive frames.
Title: Re: What do you think a tool-assisted score of arcade DK would look like?
Post by: up2ng on December 10, 2013, 10:07:22 am
I had a thought that the killscreen might not be passable in this manner since that 1/32 chance for an extra pause is only allowed on L5+ after the Timer ticks down from 8000 to 4000.  However, after a quick check back at the code, it looks to me like it SHOULD work, given what we know about what's going on internally with the Timer during the killscreen.  (Double check this at lines 2C33 - 2C40)  What's odd about this is that what's actually displayed as the initial Timer value is 100 I believe and it quickly changes to 4000 and counts down from there -- but I'm pretty sure that internally the screen starts with 400 on the clock -- however, the memory address that is checked in that code segment will probably still return 8000 (double check this also), which would allow for the "1/32" section of the code to execute immediately and for the remainder of the killscreen.

Good stuff!