Author Topic: A Point Pressing Math Problem  (Read 14252 times)

0 Members and 1 Guest are viewing this topic.

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
A Point Pressing Math Problem
« on: June 28, 2015, 01:13:50 pm »
I'd like to start out by posing a set of math problems to the group which will require a very rigorous and highly technical solution in order to approach the high degree of accuracy that I am seeking.  To add to the fun, I will start out by leaving certain knowledge based aspects of the problem up to the reader to discover and use within their solution.  If after some time has passed it appears that no one is being detailed enough in their analysis I will begin to reveal some code analysis level knowledge which is crucial for adequately solving this problem.

This problem involves point pressing the barrel screen.  For this problem, I will use the following Ladder Numbering Convention:  The Ladders are numbered from #1 through #13 in order of their vertical locations from bottom to top, using the TOP of each Ladder as it's vertical location.  For example, the Ladder in the bottom right corner, approximately under the bottom hammer is Ladder #1.  The broken Ladder next to the oil can is Ladder #2.  Kong's Ladder is Ladder #12.  Pauline's Ladder is Ladder #13.

It is a well known point pressing strategy to stand approximately under Kong and next to the top hammer (the "Safe Spot") while intentionally trying to steer barrels down Ladders #11 and #12 in order to group them closely enough together to be able to jump over the grouping in a single jump for increased points.  Then, the player often decends the Ladder #9 in order to "rejump" the same grouping of barrels for even more points before ascending back up Ladder #8 (or #9) and returning to the original position to repeat the process.  The player's path travels in a generally clockwise manner by using Ladders #8 and #9 repeatedly.

It should be somewhat obvious that it is technically possible to traverse a similar path by repeatedly using Ladders #5 and #6 in a generally counter-clockwise manner OR by repeatedly using Ladders #3 and #4 in a generally clockwise manner.  The following problem poses the question of whether it can ever make sense to delay progress towards the Safe Spot in favor of using grouping techniques that rely on a path that uses Ladders #5 and #6 in the SPECIFIC case where the act of continuing to the Safe Spot costs zero points.

ASSUMPTIONS:

For the remainder of the screen, assume that no more wild barrels (including bombs) will be released.  Assume that the procedure will not be interrupted by the presence of fireballs.

QUESTION 1:

You are currently standing at the top of Ladder #6.  You arrived here immediately after using the bottom hammer.  You were at the bottom of Ladder #4 when the hammer expired.  The instant before it expired, you were able to smash a wild barrel which was blue (the blue barrel which was released at 6200).  The fireball and the other blue barrel were smashed.  All other rolling barrels were also smashed.  Immediately following the release of the blue wild barrel, three MORE wild barrels were released, which were all bombs (you cannot score points off of these).  Kong has just finished releasing the next barrel after that which did NOT turn down Kong's Ladder and is now just barely beyond Kong's Ladder.  (Assume that the next barrel after this will also NOT turn down Kong's Ladder.)  This has created a situation where there are currently no fireballs or blue barrels on the screen and there are no other rolling barrels above you.  You will not miss any barrels if you decide to move directly to the Safe Spot from here.  The clock reads 5800.

Using the barrel just released as Barrel #1, determine the EV ("expected value") of points gained from the first 6 barrels released when choosing to move directly to the Safe Spot.  Compare this to the EV of points gained from the first 6 barrels released when choosing to stay on our current platform and using the path containing the Ladders #5 and #6 for point pressing.  In both cases, the player intends to be located at the Safe Spot just before encountering the Barrel #7 after it has traversed its longest possible path.

QUESTION 2:

Repeat this comparison using the first 12 barrels released instead of 6.

QUESTION 3:

Repeat this comparison using the first 18 barrels released.

BONUS QUESTION:

How, specifically, are the calculations likely to change if the assumption barring wild barrels is removed?

BONUS QUESTION 2:

Given the starting conditions (but removing the assumptions), estimate the liklihood of each point pressing procedure being interrupted by the presence of fireballs.

BONUS QUESTION 3:  After (approximately) 18 barrels are released, how, specifically, will the calculations change if the current point pressing procedure is continued?

Good Luck!
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 Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer DK 1M Point Scorer Individual Board Record Holder Former DK World Record Holder - MAME DK Killscreener Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2803
  • Stop using 0.106
    • Twitch
    • Awards
Re: A Point Pressing Math Problem
« Reply #1 on: June 29, 2015, 09:20:50 am »
So, is this the correct setup?

"Do not criticize, question, suggest or opine anything about an upcoming CAG event, no matter how constructive or positive your intent may be. You will find nothing but pain and frustration, trust me. Just go, or don't go, and :-X either way!" -ChrisP, 3/29/15
Member for 11 Years snek CK Killscreener DK Killscreener Blogger Twitch Streamer

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: A Point Pressing Math Problem
« Reply #2 on: June 29, 2015, 05:48:01 pm »
Yes!  Excellent picture sir.  That should definitely make it easier for people to figure out what the heck I am talking about!  Haha.

If anyone is taking a crack at this, feel free to post thoughts, work in progress, and so on in this thread.  No need to wait until you have a fully formed solution before posting! 
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 Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer DK 1M Point Scorer Individual Board Record Holder Former DK World Record Holder - MAME DK Killscreener Twitch Streamer

Offline jwade614

  • Senior Member
  • *
  • Posts: 107
    • Awards
Re: A Point Pressing Math Problem
« Reply #3 on: June 29, 2015, 06:34:44 pm »
To add to the fun, I will start out by leaving certain knowledge based aspects of the problem up to the reader to discover and use within their solution.  If after some time has passed it appears that no one is being detailed enough in their analysis I will begin to reveal some code analysis level knowledge which is crucial for adequately solving this problem.

I'll wait for the crucial knowledge.
Member for 9 Years DK 1.1M Point Scorer DK 1M Point Scorer DK Killscreener Twitch Streamer

Offline danman123456

  • Spring Jumper
  • *
  • Posts: 810
    • Twitch TV Stream
    • Awards
Re: A Point Pressing Math Problem
« Reply #4 on: June 29, 2015, 08:13:21 pm »
Assuming you can group all of them and that this is visually working in my head :D

Question 1 - Safe Spot, Group barrels 1 and 3 (300), Group Barrels 2 and 4 (300), Rejump via 8 and 9 (300). Climb Back 5 and 6 then single jumps (200) = 1100

Scenerio seems to be the same for 5 and 6 - Group 1 and 3, Jump on 4th (300) - Don't see rejumping these, Group 2 and 4 - Rejump them (600) and then 5 and 6 you could possibly get them together for a 300 hump = 1200 and then climb up.

My logic sound so far? :D
DK High : 1,059,700 (Lvl 22-1 KS!);
DK KS Speedrun : 1 Hr 16 Min 40 Sec - World Record!
DK Lvl 1 - 1: 12,400
Fix-It Felix Jr - 297,000 (World Record)
Fix-IT Felix Jr 1 Hour Limit - 177,000
Fix-It Felix Jr KS Speedrun - 1h33
Member for 11 Years DK 1M Point Scorer DK Killscreener CK Killscreener Blogger

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: A Point Pressing Math Problem
« Reply #5 on: June 29, 2015, 09:45:10 pm »
Assuming you can group all of them and that this is visually working in my head :D

Fire up a save state if necessary!  If you use the "common" grouping method from the Safe Spot of allowing the barrels to travel along their longest natural path by falling off of the end of the girder and then rolling back towards Jumpman -- the question of which barrels will be groupable with this method can actually be precisely determined from the information provided!  Are there other methods that might work better?

Quote
Scenerio seems to be the same for 5 and 6 - Group 1 and 3, Jump on 4th (300) - Don't see rejumping these, Group 2 and 4 - Rejump them (600) and then 5 and 6 you could possibly get them together for a 300 hump = 1200 and then climb up.

Not sure I'm following this description very well, but you seem to be ignoring the fact that it is possible to group (and rejump) triples from here!

Note also that the question is not necessarily about what is possible.  It is about the expected value given excellent play.  In other words, there is some randomness involved.  Each step along the way, the game might do something that you do not like (in fact, such events will occur with very specific probabilities), and so you need to think of it as sort of an average of what might occur.

For example, the expected value of smashing a blue barrel is 525 points.  Sometimes the game will do something that we do not like and award us with 300 points, but given the choice between smashing a brown barrel and smashing a blue barrel, we should clearly choose the blue barrel because of its higher expected value.

Good luck!
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 Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer DK 1M Point Scorer Individual Board Record Holder Former DK World Record Holder - MAME DK Killscreener Twitch Streamer

Beardini

  • Guest
Re: A Point Pressing Math Problem
« Reply #6 on: June 30, 2015, 01:27:21 am »
the answer is false  8)

Offline danman123456

  • Spring Jumper
  • *
  • Posts: 810
    • Twitch TV Stream
    • Awards
Re: A Point Pressing Math Problem
« Reply #7 on: June 30, 2015, 08:18:56 am »
Assuming you can group all of them and that this is visually working in my head :D

Fire up a save state if necessary!  If you use the "common" grouping method from the Safe Spot of allowing the barrels to travel along their longest natural path by falling off of the end of the girder and then rolling back towards Jumpman -- the question of which barrels will be groupable with this method can actually be precisely determined from the information provided!  Are there other methods that might work better?

Quote
Scenerio seems to be the same for 5 and 6 - Group 1 and 3, Jump on 4th (300) - Don't see rejumping these, Group 2 and 4 - Rejump them (600) and then 5 and 6 you could possibly get them together for a 300 hump = 1200 and then climb up.

Not sure I'm following this description very well, but you seem to be ignoring the fact that it is possible to group (and rejump) triples from here!

Note also that the question is not necessarily about what is possible.  It is about the expected value given excellent play.  In other words, there is some randomness involved.  Each step along the way, the game might do something that you do not like (in fact, such events will occur with very specific probabilities), and so you need to think of it as sort of an average of what might occur.

For example, the expected value of smashing a blue barrel is 525 points.  Sometimes the game will do something that we do not like and award us with 300 points, but given the choice between smashing a brown barrel and smashing a blue barrel, we should clearly choose the blue barrel because of its higher expected value.

Good luck!

I had considering the potential for triples on 5 and 6 but need to visualize it. I know you can steer them into a "triple" and then jump and re-jump that but not sure the actual setup the barrels would take without firing it up :D The first group lets say you steer the first 3 into a triple and you jump and re-jump that for 1000 points. I don't think you can work the next 3 into a triple but perhaps a double so 500+500+300+300+100+(100 if you rejump the single) for 1700 points vs the 1100? Am i getting close  <Mruczek>
DK High : 1,059,700 (Lvl 22-1 KS!);
DK KS Speedrun : 1 Hr 16 Min 40 Sec - World Record!
DK Lvl 1 - 1: 12,400
Fix-It Felix Jr - 297,000 (World Record)
Fix-IT Felix Jr 1 Hour Limit - 177,000
Fix-It Felix Jr KS Speedrun - 1h33
Member for 11 Years DK 1M Point Scorer DK Killscreener CK Killscreener Blogger

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: A Point Pressing Math Problem
« Reply #8 on: June 30, 2015, 09:57:02 am »
Ok, it looks like you are on the right track regarding what might be possible and your estimates seem reasonable.  How accurate do you think your estimates are?  What sort of variance do you suppose will exist within each scenario?

Let me pose a quick side question that might make it more clear what I'm getting at . . .

Suppose you are standing at the top of Ladder #7.  There is one barrel located directly under the top hammer.  There is another barrel directly above your position (it has just passed beyond the top of Ladder #9).  Assume that there are no other barrels or fireballs which can come into play in either a positive or negative way in the near future.  What is the expected value of these two barrels?
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 Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer DK 1M Point Scorer Individual Board Record Holder Former DK World Record Holder - MAME DK Killscreener Twitch Streamer

Offline danman123456

  • Spring Jumper
  • *
  • Posts: 810
    • Twitch TV Stream
    • Awards
Re: A Point Pressing Math Problem
« Reply #9 on: June 30, 2015, 02:14:43 pm »
Ok, it looks like you are on the right track regarding what might be possible and your estimates seem reasonable.  How accurate do you think your estimates are?  What sort of variance do you suppose will exist within each scenario?

Let me pose a quick side question that might make it more clear what I'm getting at . . .

Suppose you are standing at the top of Ladder #7.  There is one barrel located directly under the top hammer.  There is another barrel directly above your position (it has just passed beyond the top of Ladder #9).  Assume that there are no other barrels or fireballs which can come into play in either a positive or negative way in the near future.  What is the expected value of these two barrels?
Expected value is 300 for me as I would use Ladder 8 to steer it into a double group.
DK High : 1,059,700 (Lvl 22-1 KS!);
DK KS Speedrun : 1 Hr 16 Min 40 Sec - World Record!
DK Lvl 1 - 1: 12,400
Fix-It Felix Jr - 297,000 (World Record)
Fix-IT Felix Jr 1 Hour Limit - 177,000
Fix-It Felix Jr KS Speedrun - 1h33
Member for 11 Years DK 1M Point Scorer DK Killscreener CK Killscreener Blogger

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: A Point Pressing Math Problem
« Reply #10 on: June 30, 2015, 07:09:44 pm »
Let me pose a quick side question that might make it more clear what I'm getting at . . .

Suppose you are standing at the top of Ladder #7.  There is one barrel located directly under the top hammer.  There is another barrel directly above your position (it has just passed beyond the top of Ladder #9).  Assume that there are no other barrels or fireballs which can come into play in either a positive or negative way in the near future.  What is the expected value of these two barrels?

Ok, so my answer to this side question is 275 points.

From the code we know that on Level 5 (it looks like I forgot to specify that this side question pertains to Level 5 . . . oops!) when we attempt to steer a barrel down a ladder, that barrel will steer 75% of the time.  When we successfully steer this barrel, it will be grouped closely enough with the other barrel for us to perform a 300 point jump over both barrels.  When it does not steer, we will have to perform two seperate jumps over single barrels for a total of only 200 points.

EV = 0.75(300) + 0.25(200) = 275 points

This could get REALLY complicated over the course of 6 released barrels!   <gasp>
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 Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer DK 1M Point Scorer Individual Board Record Holder Former DK World Record Holder - MAME DK Killscreener Twitch Streamer

Jeffw

  • Guest
Re: A Point Pressing Math Problem
« Reply #11 on: June 30, 2015, 09:38:00 pm »
If you are really ambitious you could try the ULTRA BONUS QUESTION: Compare the limit as n goes to infinity of E(n)/n between the two strategies where n is the number of barrels and E(n) is the expected number of points from n barrels.

I might give question 1 a shot but it's hard to compute any expected value precisely due to the combinatorial explosion in the number of possible paths all 6 barrels can take.

Offline up2ng

  • Senior Member
  • *
  • Posts: 242
    • Awards
Re: A Point Pressing Math Problem
« Reply #12 on: July 02, 2015, 02:21:09 pm »
Ok, time for some hints:

The Level (or at least the internal difficulty) can be determined from the problem description.

The pattern of how Kong will release the upcoming barrels can be determined from the problem description, combined with some knowledge of how that process works.  Perhaps Jeff or someone else can post a link to the forum posts which describe in precise detail how this works according to the code.  But, in summary, Kong usually releases the barrels with a certain regularity.  Every so often (as determined by the internal difficulty), he will pause, which causes barrels to be released with slightly wider spacing.  This spacing will determine if and how barrels can be grouped with each other.

In addition to pausing, Kong will also occasionally perform a long pause, or a super long pause (etc).  Whether or not he will do so can also be determined from the problem description!

Barrel steering:  Again, perhaps someone can post a link to a forum post with a detailed, code specific description.  But, in general, when attempting to steer a barrel, you will succeed a certain percentage of the time (as determined by the internal difficulty).  When NOT trying to steer a barrel, the barrel will go down the ladder on its own anyway a certain percentage of the time (also determined by the internal difficulty -- a lot of people are actually wrong about this percentage).

I guess that's it for now!  I can't think of any other randomness that will come into play for this problem that could further widen the decision tree here.  Good luck!
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 Wildcard Rematch Champion Blogger Former DK Level 1-1 World Record Holder Former DK No-Hammer World Record Holder DK 1.1M Point Scorer DK 1M Point Scorer Individual Board Record Holder Former DK World Record Holder - MAME DK Killscreener Twitch Streamer