Author Topic: Donkey Kong Trainer  (Read 70443 times)

0 Members and 4 Guests are viewing this topic.

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1764
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Re: Donkey Kong Trainer
« Reply #15 on: May 19, 2016, 05:47:40 pm »
Another space-saving idea: remove the gameplay sequence of the attract mode and just cycle back and forth between the title screen and the Insert Coin screen. I don't think anybody feels the need to watch demo Jumpman blow it over and over.  :)
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 DK Masters - Rank D DKJR Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #16 on: May 20, 2016, 11:17:23 am »
An updated version of DK Trainer is now up.

Main additions:

-Graphical dots showing where jumpman will land if he jumps either left or right.
 (at the moment, these and many of the other 'dots' do not calculate for variable terrain... that is, it only shows where jumpman would land on a flat surface.  Even if I did add some of that in, there are cases that would just be too heavy duty for the Z80 to compute time-shifted predictions, like jumping off a girder and onto a moving elevator.)

-Graphical dots showing where barrels will be at by the time jumpman lands from his jump.
 (at the moment this does not calculate taking ladders or free-falling barrels.)

-Graphical dots showing where each spring will be one bounce in the future.
 (this one does cover falling because that calculation is entirely predictable.)

-Graphical dots showing the fireball/firefox decision point locations on-screen (!)
 (this one is really neat to see.   it does not take into account fireballs reversing from reaching ends of girders.   Right side points are solid, but left side points jitter a bit because they are not 100% predictable because of randomness, but the estimations are pretty good and they adjust in real-time.)


The barrel dots don't really seem to be all that helpful, but the firefox dots are really good at showing how their movement logic works.

There's no toggle to turn the 'dot' displays on/off yet.
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2880
  • Stop using 0.106
    • Twitch
    • Awards
Re: Donkey Kong Trainer
« Reply #17 on: May 20, 2016, 11:32:09 am »
Wow, those fireball decision points are sexy as fk.  Kreygasm
"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 IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline muscleandfitness

  • Pie Kicker
  • Elite Member
  • *
  • Posts: 329
  • Wall jump WR Holder x3
    • Awards
Re: Donkey Kong Trainer
« Reply #18 on: May 21, 2016, 01:40:59 am »
Why wasn't i told about this ,,ftttt this abuse im gone  lit
59 wall jumps new world record on mame
55 wall jumps on a cab New World Record
longest convener ride in dk history New World Record
World Record for standing behind oil can until end of lev
A Reverse finish on Rivet  board. 12 ks's HS 992900
Member for 11 Years IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member DK Killscreener Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2880
  • Stop using 0.106
    • Twitch
    • Awards
Re: Donkey Kong Trainer
« Reply #19 on: May 21, 2016, 02:26:05 am »
Why wasn't i told about this ,,ftttt this abuse im gone  lit

Because it wouldn't help even you.  :)  <stirpot>
"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 IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #20 on: June 09, 2016, 12:09:22 pm »
I've updated the DK trainer rom a bit, it now calculates pace and displays some scoring tallies in the "How High?" screen between game stages.

The pace calculation tries to predict your pace after every completed stage, so even if you only complete 1-1, it'll start displaying a pace.
(You'll have to take such early pace predictions with a grain of salt, though.. it has to make predictions for board types you haven't even played yet.)

Pace is displayed at the top of the screen where the high score would normally be.

In the "How High?" screen, it'll display score tallies for levels 1 through 22.   On the left side, it'll show individual level totals in white, and the point values for deaths and sacs in amber.

On the right side it'll show the total points after each completed level in white, and display estimated predictions for uncompleted levels in amber.


I think I still have some tweaking to do on the math, but it doesn't seem too off.   If anyone is willing to play some games, some feedback about accuracy of the pace predictions are would be appreciated.   (Keep in mind, it's not going to be super accurate early on.)

Thanks.

http://users.axess.com/twilight/sock/dk/dkong-trainer.zip
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2880
  • Stop using 0.106
    • Twitch
    • Awards
Re: Donkey Kong Trainer
« Reply #21 on: June 09, 2016, 12:46:29 pm »
 Kreygasm

I'd like to see the math you're using. I played a test game. I died 3 times before Level 5. After Level 4 my score was 99,400. I played a complete Level 5, scoring 49,900 during that level. 99,400 + (49,900 x 17) = 99,400 + 848,300 = 947,700 expected score after Level 21. The trainer gave me a pace of 890,500 after Level 5.
"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 IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2880
  • Stop using 0.106
    • Twitch
    • Awards
Re: Donkey Kong Trainer
« Reply #22 on: June 09, 2016, 12:50:41 pm »
FYI, my scores for that level were:

Barrel: 8,900
Pie: 8,400
Barrel: 9,300
Spring: 5,700
Barrel: 9,400
Rivet: 8,200
"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 IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #23 on: June 09, 2016, 01:11:15 pm »
Kreygasm

I'd like to see the math you're using. I played a test game. I died 3 times before Level 5. After Level 4 my score was 99,400. I played a complete Level 5, scoring 49,900 during that level. 99,400 + (49,900 x 17) = 99,400 + 848,300 = 947,700 expected score after Level 21. The trainer gave me a pace of 890,500 after Level 5.

It's likely I'll tweak/revise it, but what it's actually doing is tallying up 4 separate totals, one for barrels, pies, springs and rivets, then dividing each total by the number of completed boards in each category to come up with an average for each board type.   Then it uses those 4 stage type averages to fill in uncompleted board scores.

So it was actually using your L=1 to 4 scores in addition to the L5 scores for the total prediction.

I know comparing L1-4 scores to L5 scores is like comparing apples to oranges, so internally it also tries to convert pre-L5 scores into their L5+ equivalents.

I tried using some of your charts to come up with some formulas to convert L1 to equivalent L5 scores, L2 to L5, L3 to L5, etc.   If there is some magic database/resource of a ton of played games, I'd revise the formulas to be more accurate.

...Or scrap that approach and make the program switch to ordinary pace calculation after L5 is completed.   In either case, both methods have some drawbacks and advantages over each other.   This one uses the L1-L4 scores as part of the prediction model, but their weight will keep diminishing the further the game progresses.

On another note, you've probably noticed all scores always end with 00.   I'm rounding everything to hundreds to keep the load off the poor Z80, reduce code size, and reduce RAM requirements of storing all the individual board scores.
« Last Edit: June 09, 2016, 01:19:49 pm by Sock Master »
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline xelnia

  • Administrator
  • Spring Jumper
  • *
  • Posts: 2880
  • Stop using 0.106
    • Twitch
    • Awards
Re: Donkey Kong Trainer
« Reply #24 on: June 09, 2016, 01:47:07 pm »
If there is some magic database/resource of a ton of played games, I'd revise the formulas to be more accurate.

There is, sort of. Obviously I have all of my charts, but they're all individual charts and not currently collected into one database...again, sort of. I'm helping Wes with a project that will hopefully create an enormous searchable database of games. Right now there are about 175 games worth of L1 - L4 scores. Since I'm working from higher scores downwards as I add scores to this super secret magic database, the averages are currently "top-heavy", but here are the current values for the first 14 boards:

1-1: 7,837
1-2: 7,617
2-1: 8,033
2-2: 6,513
2-3: 7,868
3-1: 8,998
3-2: 7,980
3-3: 6,859
3-4: 8,589
4-1: 10,565
4-2: 7,951
4-3: 10,411
4-4: 6,199
4-5: 7,633

As I add more scores, the barrel averages will drop by a larger amount than the other boards, but it's a start I guess.
"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 IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member DK Killscreener Blogger Twitch Streamer

Offline mrvaya

  • Senior Member
  • *
  • Posts: 196
    • Awards
Re: Donkey Kong Trainer
« Reply #25 on: June 09, 2016, 02:00:23 pm »
Nice John

Really like how the "how high"-screen gives a great overview. This is what I would like to see in a "tournament-edition".  Kreygasm

The logic seems really odd in the beginning tho. I know you said its not perfect early on... but its seems way off in my case: it predicts 650k then slowly rise to 865k when playing from lvl 1-5. Right now it seems more like non-accuate in the beginning. Is it even possible to complete the game at a score of only 650k?
After level 5 it seems more precise. I dont know how precise tho since im unsure of how the built in logic works.
Member for 11 Years DK Killscreener Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #26 on: June 09, 2016, 04:05:56 pm »
Since I'm working from higher scores downwards as I add scores to this super secret magic database, the averages are currently "top-heavy", but here are the current values for the first 14 boards:

Thanks, I'll run some number crunching on those numbers and see how it compares to what I've got.    In the end, I think the optimal solution will be to use an entirely average game as the baseline for converting L1 to L4 scores into L5+ scores and vice versa.

The logic seems really odd in the beginning tho. I know you said its not perfect early on... but its seems way off in my case: it predicts 650k then slowly rise to 865k when playing from lvl 1-5. Right now it seems more like non-accuate in the beginning. Is it even possible to complete the game at a score of only 650k?

Yeah, I have to improve the numbers.   I used data from some very high scoring games to work out the conversion calculations.    Top players play 1-1 much harder than 5-1 and this skews the math.   The early pace projections are lower than they should be because the 1-1 statistics I have probably equate to a pace of 1.4 million at stage 1-1 before dropping to more normal pace after 5-1
"Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Member for 9 Years snek IGBY 2016 DKF Team Member Twitch Streamer

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1764
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Re: Donkey Kong Trainer
« Reply #27 on: June 09, 2016, 05:40:58 pm »
Argh, I love this so much!

Huge post, I'm sorry!

However, I'm excited about where this is going, and can see how it could be better, so (as always) I have to make suggestions. :)

Leave PACE blank early on: the PACE number, as implemented here, is literally meaningless until at least level 4 at the very earliest. All that number is, during the early going, is a red-herring that would cause needless confusion. I've tried different styles of 1-1 and I get all sorts of crazy numbers depending on how I play it. If I just run it and skip the hammers, I get a pace of 500K-odd, which is an almost impossibly-low KS score while a weak-ish 7K gives me a 943K pace. I think that number should just stay blank until 6-1, or say "TBD" or "PENDING" or some such. IMO, a projected pace should not appear until it can have some semblance of accuracy.

Toward that end, here are some ideas.

Ignore L1 through L4 boards: Include the level totals in the tally of course, but integrating individual board-type averages from L1 through L4 into the pace is not sensible

First reason: every board up to 4-5 has a different set of rules than what comes after. Without even getting into the differences of the speed/number/behavior of the obstacles, it really boils down to the timer, which, relative to L5+, starts at a lower value, and ticks down more slowly. That one factor really changes everything when it comes to scoring, and makes these boards useless as data points for producing an average from which to extrapolate pace (though one could make the argument that the Level 4 boards are close enough, especially the elevator board, which is identical to L5+).

Consider how much more difficult it is to get 11,000 points on 1-1 than it is to get 11,000 points on 5-1, or how easy it is to get a 9,000 point 1-2 (where leeching Kong can add thousands to your score), versus getting 9,000 points on 5-6 (where leeching is almost useless, and you instead need cooperative fireballs).

Second reason: a player's start strategy often has nothing to do with middle-game strategy. For example, it's common for players who want a low 1 million type score, or even up to 1.05, to simply warp to L5 by speeding through the early boards. But if the early-board numbers are included in the average, whether or not they're somehow calculated with a mind for their "L5 equivalent", they'll muck everything up. Depending on your strategy, you can go for 1.05M with a 100K start, or go for 1M with a 120K start. I think the calculator should only take the player's post-start playstyle into account, because unless you're going for 1.1+, just about any approach to the start (fully-pressed or torn through) can get you the score you're trying to get.

Regardless of how the player approaches them, the early boards are junk data for numerous reasons, and they'll leave a strong taint <Sanders> on the averages until deep in the game.

Don't spot the player ANY death points: death points should be considered a bonus, not an expectation. When the player dies, just add those points to the final projected score. Since most deaths are accidental (unless you're Wes), they can be worth anything from 0 points to over 10,000 points, and they simply can't be predicted or averaged out before-the-fact in any reasonable way. (But if you do ultimately decide to pre-include death points, 8K per death is DEFINITELY too high! The 5K in Pauline is bad enough. I would say no higher than 3,000.)

Until at least Level 10, only calculate "real" averages for the barrel and elevator boards: I've never actually said it out loud, but I have a saying - barrels and springs are about getting what you take. Pies and rivets are about taking what you're given.

If the player's style is consistent, individual barrel and elevator board scores won't deviate much from the mean, because on these board-types, the player has a high degree of control over the score achieved.

But for pie factories and rivets, "you take what you're given," and what you're given will often deviate hugely (on the plus or minus side) from expectation. So if you get an outlier board or two early in the run, they will be super-confounding data points. This can sometimes be a serious problem for pace calculation until fairly deep into the game.

It may be a controversial idea, but I think you should handle L5+ pies and rivets by pre-populating them with 17-times some fairly-reliable average value (something like 8,000 pie, 7,500 rivet), and replace with the actual numbers as the player completes boards.

Early outlier pie and rivets just cause players to over (or under) estimate their pace, and bewilder those who don't understand the problem of averaging from a small, deviant sample. Anything that can be done to prevent JCB and Brian Allen from beaming about their "1.1 million pace" on 6-1 (after just having gotten some silly 10,500 point rivet) would be a good thing. :)

While the trainer will never be able to be used for actual, submittable games, it's worthwhile to get a genuinely good pace-calculator algorithm going, since it would have the potential of being ported over to a standalone pace calculator. I have yet to see or use a pace calculator that isn't deeply flawed, and I'm hopeful about moving toward one that isn't!
« Last Edit: June 09, 2016, 06:18:51 pm by ChrisP »
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 DK Masters - Rank D DKJR Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener

WCopeland

  • Guest
Re: Donkey Kong Trainer
« Reply #28 on: June 09, 2016, 09:06:44 pm »
I agree with everything Chris wrote. Spotting death points is such a crippling "feature" of Pauline, I consider it to be a bug in the application. While the average kill screen game does have ~12,000 points in deaths according to the magic secret database, there have been world record games with almost zero in death points.

Everything in deaths should just be considered a bonus in the calculation, and nothing should be assumed because unless you can get all three sacs you're never in control of when you die.

Offline ChrisP

  • Spring Jumper
  • *
  • Posts: 1764
  • I'm going to jump next to your leg.
    • Donkey Blog
    • Awards
Re: Donkey Kong Trainer
« Reply #29 on: June 09, 2016, 09:47:21 pm »
Just some more input on this after some testing: I'm not sure exactly how it works, but including early boards makes the pace calculation very seriously flawed, to the point that Pauline, or even back-of-the-envelope math, is actually a lot more accurate.

I decided to do a "warp"-style start, which is my typical approach, reaching 5-1 with 102,300. (I died on 2-1 for 1K but kept going, so the start is technically 101,300.)

My level 5 netted 55,500. I had a free-pass pie factory, and a 7K rivet, so those are close-to-a-normal-average values.

Now, if I stop here and use the old-fashioned way of calculating pace (start + (level average * total # of levels)), I get 101,300 + (55,500*17) = 1,044,800. This is an accurate number. That is, if I continue to get 55,500 levels until the end of the game, that's exactly the score I'm gonna end up with.

The trainer, though, reported my pace as 996K! That's almost 50K below what it should have been, even WITH the extra 16K it's giving me for my remaining lives.

I decided to keep going, finishing L6 with 54,700 total, then L7 with 57,000 total. Average holding really steady so far, L7 pushed it up a tick, pace now up by about 3K to 1,048,700.

Pace estimate in the trainer = 1,027,900. Still 20K below where it should be and I'm about to start L8.

So, as inaccurate as Pauline can be on 6-1 if you have an outlier pie or rivet, whatever this method is, it's even more inaccurate if you warp to L5. Warping appears to cause the trainer to severely underestimate your pace, and it will take quite a bit of play before the numbers start to converge on reality.

I think the early board-by-board averages really need to be removed from the calculation. If I have to get to L10 for the pace to start being accurate, then the pre-start numbers not only aren't helping, they're hurting.

The simpler way (cumulative score at end of L4) seems to be the better way. :)
« Last Edit: June 09, 2016, 09:50:07 pm by ChrisP »
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 DK Masters - Rank D DKJR Killscreener IGBY 2016 DKF Team Member IGBY 2015 DKF Team Member IGBY 2014 DKF Team Member Blogger Twitch Streamer DK Killscreener CK Killscreener