Author Topic: Dean's DK Blog  (Read 47260 times)

0 Members and 1 Guest are viewing this topic.

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: Dean's DK Blog
« Reply #30 on: July 02, 2013, 03:37:48 pm »
Also, do you happen to know the timeframe for how long the upper conveyor will continue to move outwards, assuming you do not trigger it to change with your vertical position?  It seemed to last about a half-cycle

I think it's more like 3/4 of a cycle.

...

So this would mean that the probability that it spawns on the bottom is 96/256 = 0.375

Hey Jeff, hopefully you're still following these threads.  I've been thinking more about this whole thing and I'm still not sure if I'm convinced.  One of these days I'll have to mess around with the MAME debugger and try to get some more concrete values for some things to make the math a bit more concrete -- unless you or somebody else already knows some of this stuff, that would be helpful!

First, your figure of 3/4 of a cycle for outward moving upper conveyors sounds like a ballpark estimate (although probably a pretty good one).  I wonder if anyone knows this value more accurately?  We could probably break it down into frames.  We know that a bottom conveyor cycle, and a hammer cycle lasts 9 BONUS seconds on Level 4+, each of which ticks down after a certain number of frames.  So, one cycle = some number of frames (it would be nice to know this number).  The amount of time that the upper conveyors can move outward is some other number of frames -- if we knew these we could calculate an exact ratio.

[EDIT:  Ok, in the middle of writing this up, I decided to watch a pie factory screen.  The estimate of 3/4 of a cycle appears to be VERY accurate.  In both directions.  Meaning, the upper conveyor will switch from moving inwards to outwards after 3/4 of a cycle AND it will switch from moving outwards to inwards after 3/4 of a cycle.  If you just stand at the bottom and watch, you can see the first switch happens with Kong is in the middle moving left, the second reversal is when he is positioned at the right edge of the screen, the third reversal is when he is in the middle moving right, and the next is when he is positioned at the left edge of the screen (3 full cycles).  ]

[EDIT:  I double checked another source -- verified that the upper conveyor cycle is exactly 3/4 of the bottom conveyor cycle. ]

Also, it sounds like outward moving conveyors can be triggered to immediately reverse and move inwards, but the reverse is not true -- you cannot trigger conveyors to move outwards -- it just happens after Jumpman is below the vertical threshold for a certain number of frames (this is an assumption, and may not be accurate) -- so, does this mean that the switch to moving outward is based on relative or absolute timing?  For example, if Jumpman never breaks the threshold while the conveyor is moving outwards, then it will likely switch back and forth between inwards and outwards at some default point (which could be predicted by watching the Timer), but if this cycle is broken by Jumpman breaking the threshold ... how is it handled?  Does it now reverse and travel inwards for the "full" period of time that it normally would (which would mean that it's next reversal outwards occurs at a non-default time on the Timer), or does it just finish up some fraction of its cycle and then reverses outwards again according to its default time on the Timer?  ...  If I had to guess, I would think that once it gets triggered to change from outward to inward, it is forced to remain moving inward for a set period of time.  Then, it will periodically check Jumpman's vertical position to determine whether or not to switch to moving outwards (but this periodic check isn't particularly often -- NOTE that you don't usually see it switch from inward to outwards immediately after jumpman moves down below the threshold.)

[EDIT:  Did some poking around and I'm fairly certain now that this direction change occurs only with absolute timing.  Meaning, after another 3/4 of a cycle goes by, it will check to see if the direction can be reversed, and if so, it reverses (in either direction).  Note that this means if it's normally going inward for the first 3/4, then outward for the next 3/4 and then inward again for the next 3/4 -- if Jumpman "triggers" a reversal during the second cycle so that it immediately switches from outward to inward, this means that on the 3rd 3/4 it will now switch to outward (despite the fact that with no triggers it would normally be switching from outward to inward).  ]

The next fact that would be nice to know now is the rate of pie deployment...

[EDIT:  Ok, for what it's worth, I "THINK" that a pie is deployed once every 124 frames and a full cycle is 512 frames (upper conveyor cycle is 384 frames).  However, I think there's an offset with the pies where they wait until the initial fireballs are all spawned before pies come out -- so, depending on where you are in this 124 count when the upper conveyor reverses, I'm not sure that you are (always) guaranteed the 3rd pie -- some confirmation on these numbers would be useful!  ]

Anyways, getting back to our "normal", or "best case" scenario for pressing the screen by getting the bottom hammer without delay.  Let's assume that there's no pie to "chase down" with our hammer as the conveyor moves from right to left.  The two obvious choices are:

1)  Grab the hammer with just a bit more than 1/4 of a cycle remaining -- this allows the upper conveyor to reverse to an outward direction just after the hammer is grabbed.  This lasts for 3/4 of a cycle.  HOWEVER, for the first 1/4 of a cycle you are simply waiting around doing nothing while waiting for the bottom conveyor to reverse!  Once it reverses, you are guaranteed some pie smashes for the next 1/2 cycle (how many smashes is this, I think it's still open to debate...).  Then, during the last 1/4 cycle, you "might" get more smashes depending on whether or not the pie(s) spawn at the bottom, with a probability of 3/8. 

OR:

2)  Grab the hammer with just a bit more than 0/4 of a cycle remaining.  The bottom conveyor almost immediately reverses direction, possibly yielding pies immediately.  However, the upper conveyor, which already switched from inward to outward for the most recent 1/4 cycle, now immediately reverses back to inward.  BUT, here's the thing -- I'm pretty certain that in this case, the upper conveyor remains moving inward for ONLY a 1/2 cycle!  Because the reversal times are absolute -- so the 1/4 cycle that was already used up, plus the next half cycle, means that it will reverse back to outward when the hammer is only HALF expired!  So, you have your first 1/2 cycle where you are smashing pies with 3/8 probability followed by another 1/2 cycle where you are guaranteed smashes (again, how many this is is still open to debate).  In theory, I believe it's possible to smash 5 pies that are moving left to right with this method (this does NOT include chasing down pies moving right to left). 

Granted, some of these figures are probably slightly inaccurate since you would typically grab the hammer slightly before reversal -- and, I think the 3/4 cycle of the upper conveyor might have a very slight offset -- the second reversal doesn't seem to occur EXACTLY when Kong is at the rightmost point of the screen, but a small fraction afterwards -- so some of this is thrown off slightly.  Lastly, there is the issue of being somewhat behind and out of position after the hammer expires when using option 2 so that it's impossible to maxamize smashes AND make a right side escape for 5700 Bonus -- instead you will often end up getting caught on the retractable ladder and ending up with 5100 - 5200 Bonus.  However, I think the point that I'm trying to make is that after Jeff first posted his observations, it seemed like option 1 had a clear advantage -- and now I'm not convinced.  I think it might turn out to be a wash ... which would be good -- it would give the player more flexibility to play the situation based on risk and on fireball behavior rather than based on will happen with the pies.  If anyone is able to make any of these observations more concrete, feel free to post your thoughts.
Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Member for 11 Years DK 1.2M Point Scorer Winner of a community event Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer Former DK World Record Holder - MAME DK Killscreener DK 1M Point Scorer Individual Board Record Holder Twitch Streamer

Jeffw

  • Guest
Re: Dean's DK Blog
« Reply #31 on: July 05, 2013, 05:33:49 pm »
Ok, I checked and here are the exact numbers:
The very top conveyor (dk's conveyor) reverses direction exactly once every 256 frames, so it takes dk 512 frames to travel back and forth once.
The middle conveyor reverses exactly once every 384 frames.
The bottom conveyor reverses exactly once every 510 frames (interestingly, it's slightly less than the time it takes dk to travel back and forth once).
A pie is deployed exactly once every 125 frames.

When the middle conveyor is moving outwards and Mario jumps it forces the conveyor to reverse direction, but it does not change the direction reverse counter (although the counter will be frozen while Mario is above the vertical threshold). So it won't take the full amount of time for it to reverse back to moving outwards, because the timer is starting from where it was before Mario forced the direction to switch. Note that it won't always reverse direction at the exact same absolute points because when Mario jumps off of the bottom conveyor the direction reverse timer gets frozen while Mario is above the vertical threshold so it lengthens the time until the next direction reversal.

When jumpman moves back below the vertical threshold after spending a lot of time above the threshold, the middle conveyor does not reverse direction immediately because you still have to wait for the direction reverse counter to reach 0, from whatever value it was frozen at while jumpman was above the threshold.

So, because the middle conveyor cycle is 384 frames and a pie is release every 125 frames and 384/125 = 3.072, it is impossible to have less than 3 pies spawn while the middle conveyor is moving outwards. In fact, if the timing worked out just right it would be possible for 4 pies to spawn while the middle conveyor was moving outwards. So yes, you are always guaranteed 3 pies will spawn on the bottom for you to smash if you are carrying the hammer for the entire duration that the middle conveyor is moving outwards.

I think you might be right about the first pie being delayed until the first fire appears. I might have seen something like this when I looked at the code but I don't remember.

So now looking at the two options for the situation you described, since there are no pies on screen, you can only possibly smash pies that come on the left side of the screen while the bottom conveyor is moving right. The bottom conveyor moves right for 510 frames and 510/125 = 4.08, so you are guaranteed that 4 pies will have the opportunity to spawn while it's moving left. Also, I think the timing works out that you actually have the opportunity to smash 5 pies, however, in the test I did it is EXTREMELY close and the 5th pie opportunity comes about 1 or 2 frames before the bottom conveyor reversed direction. So actually, depending on how much the first pie is delayed by you may not get the opportunity for 5 pie smashes. I should probably look into how variable the delay of the first pie is, because it seems like this is now important.

For now, I'll consider both the case where you have 4 pie opportunities and the case where you have 5 pie opportunities. In the first case with 4 pie opportunities, using option 1) you are able to exploit all 4 opportunities, the hammer ends immediately after the 4th opportunity. Not only that but the first 3 opportunities are guaranteed smashes and the 4th opportunity has a 3/8 probability of being a smash. So the total expected score from pie smashes is 525*3 + (3/8)*525 = 1772. In this case option 1) is far superior to option 2) because although option 2) is holding the hammer for a longer period while the bottom conveyor is moving left, it still only gets 4 smash opportunities, of which only the last one is guaranteed to be a smash.

In the case where the timing works out and you have 5 pie smash opportunities (which is what happened in the test I did), then the expected score from pie smashes in option 1) remains the same at 1772. However, option 2 now exploits the additional opportunity, which also happens to be a guaranteed smash because the middle conveyor will be moving outwards. So now, option 2) has three potential smashes followed by 2 guaranteed smashes with the expected score from pie smashes being 3*(3/8)*525 + 2*525 = 1641, which is still inferior to option 1). Considering the fact that option 1) gives you a significant head start towards finishing the screen puts option 1) even more in the lead over option 2). Now add to that the fact that the most likely smash to miss is the final smash, because it requires being right up against the left edge of the screen in both options (often missed due to moving right in order to smash fireballs), and in option 1) missing the final smash is no big deal because it's only worth (3/8)*525 = 197, but in option 2) missing the final smash is a huge blow of 525 points.

So from this analysis it seems to me like option 1) is far superior to option 2).

Here are some RAM values:
0x639B - pie deployment counter, a pie is deployed every time this reaches 0
0x62A0 - top conveyor direction reverse counter
0x62A1 - top conveyor direction (01 = right, FF = left)
0x62A2 - middle conveyor direction reverse counter
0x62A3 - middle conveyor direction (01 = outwards, FF = inwards)
0x62A5 - bottom conveyor direction reverse counter
0x62A6 - bottom conveyor direction (01 = right, FF = left)

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: Dean's DK Blog
« Reply #32 on: July 11, 2013, 10:01:14 pm »
So, on an actual blog-related topic, I just had one of those one in a million opportunities come up and obviously I completely duffed it.

I was at the tail end of a complete fail session and just constantly dying on 1-1 over and over and over again when all of a sudden I put together a really big start to the board AND got FOUR 800 point smashes with the bottom hammer at the same time.  The odds of getting the four 800 point smashes I'm estimating at around 1-in-1372.  (  (1/7) * (1/7) * (1/7) * (1/4)  )  Getting the type of start I got to the round is pretty rare too, maybe 1-in-100 at best and that doesn't include the fireballs climbing up into play at the exact right moment and the barrels steering fairly well with the bottom hammer.  Needless to say this chance doesn't come around very often and I'm pretty bummed right now that I blew it -- this could have been a HIGH 14k 1-1 screen if things went well and at least 14,000 even if things just went below average.

Here's the inp.  The death is pretty epic.

Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Member for 11 Years DK 1.2M Point Scorer Winner of a community event Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer Former DK World Record Holder - MAME DK Killscreener DK 1M Point Scorer Individual Board Record Holder Twitch Streamer

Offline tudose

  • Spring Jumper
  • *
  • Posts: 536
    • Awards
Re: Dean's DK Blog
« Reply #33 on: July 11, 2013, 10:11:25 pm »
yeah man that was an absolutely insane 1-1 start. wouldve been easily 11k+ before the top hammer and 14k+ finish. i wouldve loved to see you complete that board  :(
Member for 11 Years Former CK World Record Holder - MAME DKJR World Record Holder - MAME DK Masters - Rank D DKJR Killscreener DK 1.1M Point Scorer IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member Blogger Winner of a community event DK 1M Point Scorer DK Killscreener CK Killscreener Twitch Streamer Former DK Level 1-1 World Record Holder

corey.chambers

  • Guest
Re: Dean's DK Blog
« Reply #34 on: July 11, 2013, 10:28:50 pm »
Nice start with that bottom hammer. Hate to see someone die like that in such a case as that. Rare things do happen that way. That is how I got my best 1-1 score, just had those lucky 500-800 smashes. Once I actually smashed three fireballs in a row on the barrel board, without barrels in between. Now that is odd. Has anyone ever done 4 in a row?

Offline marinomitch13

  • Spring Jumper
  • *
  • Posts: 1806
    • How to Play DK
    • Awards
Re: Dean's DK Blog
« Reply #35 on: July 11, 2013, 10:33:06 pm »
I did that just the other day, Corey! 3 fireballs and 1 blue barrel; in that order.
"Thou hast made us for Thyself, and our heart is restless until it finds its rest in Thee." -Augustine, Confessions.
Member for 11 Years IGBY 2015 DKF Team Member DK Killscreener Blogger Twitch Streamer

corey.chambers

  • Guest
Re: Dean's DK Blog
« Reply #36 on: July 11, 2013, 10:37:27 pm »
I felt special there for a moment.... and then it went away.  :'(

Offline marinomitch13

  • Spring Jumper
  • *
  • Posts: 1806
    • How to Play DK
    • Awards
Re: Dean's DK Blog
« Reply #37 on: July 11, 2013, 11:06:29 pm »
No, that is actually very rare... I realized this fact when it happened to me the other day, so you're still special! :D
"Thou hast made us for Thyself, and our heart is restless until it finds its rest in Thee." -Augustine, Confessions.
Member for 11 Years IGBY 2015 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: Dean's DK Blog
« Reply #38 on: July 16, 2013, 02:49:58 pm »
So, I had another decent game today while streaming.  If anyone cares to check out the archive and put together some stats or to just watch the game it should be there for a week or so before getting erased.

This one featured a Level 4 death, which I've been playing out more and more often if I feel like the score is good.  I didn't die again until Level 12, just a dumb situation where I chased after a group of barrels with the hammer and it ran out on me at the last second, I thought I had enough time but I didn't.  The last two deaths were pretty big screwings on the same Level 16 Pie Factory screen which is a shame because I was still feeling pretty good and I was pretty confident that I would have ended that game with over 1.2 million points.  Bummer -- I've had a handful of these sorts of close calls in the 800k+ range now so it seems like it's just a matter of time now.

I had several really big levels towards the first half of the game which is encouraging -- it's nice to be able to string together a few 64k+ Levels because it really allows for somewhat of a buffer now where I feel like I could still get to 1.2 million without perfect deaths, which wasn't the case not too long ago.  In this game, by the end of Level 14, I was already above the mark (780k) needed to be able to hit 1.2 million with just 60k / level to finish the game AND I still had an extra man.  So, at this point, I had a legitimate shot at around 1,230,000 if everything went perfectly, although I suspect (especially after suffering a really poor Level 15) that a more likely final score after some fatigue and an unintentional death would have been in the 1,200,000 - 1,210,000 range.

With a few games like this under my belt, it's beginning to feel just slightly less urgent to try for a perfect start.  I wonder if I was aiming for 132,000 - 135,000 instead of 137,000 - 140,000 if I could withstand those lost points and still have a comfortable chance to reach 1.2 million -- and if so, how much would my start success rate improve and would that improve my overall chances to hit my goal due to more longer games played?  Something to think about . . .
Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Member for 11 Years DK 1.2M Point Scorer Winner of a community event Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer Former DK World Record Holder - MAME DK Killscreener DK 1M Point Scorer Individual Board Record Holder Twitch Streamer

Offline sevenup1203

  • New Member
  • *
  • Posts: 17
    • Awards
Re: Dean's DK Blog
« Reply #39 on: July 16, 2013, 03:25:49 pm »
I saw the game Dean, it was a good game.  Those fireballs were brutal on that last Pie Factory.  :'(
Member for 11 Years Twitch Streamer DK Killscreener Blogger

Offline stella_blue

  • High Score Moderator
  • Spring Jumper
  • *
  • Posts: 1530
    • Awards
Re: Dean's DK Blog
« Reply #40 on: July 17, 2013, 05:22:14 am »
So, I had another decent game today while streaming.  If anyone cares to check out the archive and put together some stats or to just watch the game it should be there for a week or so before getting erased.

Hey Dean, any chance of attaching the INP here, if you still have it?  I missed the live session, but would like to watch the game in its entirety, and also generate a game summary for the DK library.  The only problem is, I doubt I'll get to it before the Twitch video is gone forever.

« Last Edit: July 17, 2013, 05:38:51 am by stella_blue »
DK High Score 
1,064,500
  (L22-1)
DK Level 1-1 
13,400
DK No Hammer 
535,300
  (L15-2)
Member for 11 Years Most Time Online DK 1M Point Scorer DK Killscreener Blogger Twitch Streamer

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: Dean's DK Blog
« Reply #41 on: July 20, 2013, 06:00:54 pm »
Sorry Scott, I don't normally save inps for that sort of game.  It had already been overwritten by the time I saw that you had asked for it.  Hopefully it's still in the Twitch archive!

. . . . . . . .

Meanwhile, I put together another strong game earlier this afternoon.  See attached inp for this game.  I'm quite pleased that these deep runs are starting to come together consistantly now with a very high pace.  In fact, the game today may have had better raw pace up through the half way point in the game than any other that I can remember -- and it wasn't feeling like a struggle.  I definitely felt like I was somewhat "in the zone" for that portion of the game today, combined with above average luck with fireball behavior, which yielded some level totals that even I was surprised about.  I'm having sort of a hard time understanding just where this new found pace is coming from -- I've actually been exceeding what I've been aiming for in a handful of games lately.  Hey, I'm not complaining, I just hope it continues!

As an example of what I'm talking about, I went back and quickly compiled the scores after each screen and computed the Level totals and again I'm pleasantly surprised with the results.  Here's how the game played out:

9800
22800

End of 1:  22800

33900
41300
53500

End of 2:  53500

(58300) 71300
79700
88600
99700

End of 3 (with 1 death):  99700

113800
122100
134900
142500
150200

End of 4 (with 1 death):  150200

163700
172000
185500
192700
204900
213700

Level 5:  63500

226500
235700
248500
255600
(258400) 270400
278500

Level 6 (not including death points):  62000

290900
299300
312100
320300
332900
339300

Level 7:  60800

350900
362200
374800
382200
397500
408500

Level 8:  69200

423000
433600
446300
454000
467200
475000

Level 9:  66500

486800
495200
507800
515500
528900
537000

Level 10:  62000

550700
557700
(562600) 577000
584400
597700
604800

Level 11 (not including death points):  62900

616800
626200
638300
645800
658900
665300

Level 12:  60500

677900
686200
698300
706000
718400
725400

Level 13:  60100

736500
744800
758900
766100
776800
784700

Level 14:  59300

(790200)


Any time you get a 69,200 and a 66,500 back to back a good ways into a full game, things are going extremely well to say the least.  I'm also very happy that I didn't fall below 60k on any level until level 14 (which was 59300).

Unfortunately for me, this was one of those sessions (which happens a lot for me) where I really didn't quite have time to play a full game and was trying to squeeze it in -- then, of course it took me over an hour to get a start.  So, at around the beginning of Level 11, I began having major distractions which caused me to seriously consider aborting an excellent game and definitely adversely impacted my mental concentration resulting in an almost immediate 3rd death and then a general downturn in pace as I pretty much knew one way or the other I probably wouldn't be able to finish the game.

But, still a very positive result for me -- if I can keep getting deep into the game with this sort of pace it seems like finishing a game should be coming soon.  We'll see!
Donkey Kong:  1,206,800  Kill Screen
Donkey Kong:  898,600     16-5
D2K:                 380,200     L=9
Donkey Kong Junior:  In Progress
Member for 11 Years DK 1.2M Point Scorer Winner of a community event Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer Former DK World Record Holder - MAME DK Killscreener DK 1M Point Scorer Individual Board Record Holder Twitch Streamer

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1764
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Re: Dean's DK Blog
« Reply #42 on: July 20, 2013, 09:08:53 pm »
Level 8:  69200
Level 9:  66500

Fking gross.

This is getting absurd!
http://donkeykongblog.blogspot.com

4 Quarters :-* - 800K Avg. Per Qtr. :o - No Restarts 8) - No Proof :'(

7/26/2013   Coin 35,946   710,800   18-1
7/28/2013   Coin 35,947   903,700   22-1
8/16/2013   Coin 35,948   694,100   17-6
8/17/2013   Coin 35,949   893,100   22-1

3,201,700: the $1 World Record?
Member for 11 Years DKJR Killscreener DK Masters - Rank D IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener

hchien

  • Guest
Re: Dean's DK Blog
« Reply #43 on: July 20, 2013, 09:50:14 pm »
Those numbers are mind boggling.  Looks like you are going to shatter your record soon.  Looking forward to seeing what you put up!

Offline marinomitch13

  • Spring Jumper
  • *
  • Posts: 1806
    • How to Play DK
    • Awards
Re: Dean's DK Blog
« Reply #44 on: July 20, 2013, 11:00:45 pm »
Nice game, Dean! You'll be at 1.2m+ soon enough!

And people didn't believe Vince and me when we came out and said that we thought 1.265m might be the humanly-possible max...

If Dean doesn't get it, at least we know Rudy will.  ;D
"Thou hast made us for Thyself, and our heart is restless until it finds its rest in Thee." -Augustine, Confessions.
Member for 11 Years IGBY 2015 DKF Team Member DK Killscreener Blogger Twitch Streamer