Author Topic: Donkey Kong Trainer  (Read 70448 times)

0 Members and 5 Guests are viewing this topic.

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #30 on: June 09, 2016, 10:06:48 pm »
The DK trainer rom has been slightly revised to use the averages Jeremy provided as the basis for inter-conversions between L1 through L4 scores into L5 scores and vice versa.   I've made a few other adjustments the prediction math as well.   It should generate more sane pace values now, but this is still a work in progress.

I'll look into dropping the L1-L4 data from the pace prediction after the completion of L=05, in addition to the other suggestions in future revisions.
"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 aarontruitt

  • Elite Member
  • *
  • Posts: 259
    • AaronTruitt's Twitch
    • Awards
Re: Donkey Kong Trainer
« Reply #31 on: June 09, 2016, 11:04:51 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.

"What's wrong with carpet munching" - Robert Felstein

Lick it Wes
Arcade DK PB: 1,007,600 (KS)
Member for 9 Years CK Killscreener DK 1M Point Scorer IGBY 2016 DKF Team Member DK Killscreener 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 #32 on: June 09, 2016, 11:45:45 pm »
The DK trainer rom has been slightly revised to use the averages Jeremy provided as the basis for inter-conversions between L1 through L4 scores into L5 scores and vice versa.   I've made a few other adjustments the prediction math as well.   It should generate more sane pace values now, but this is still a work in progress.

Wow, it seems to be working much better now. I super-warped to L5 this time, getting a start of 95K, and the pace was something like 849K, which is kinda the quintessential "KS with nothing extra" score.  <Allen>

I'll look into dropping the L1-L4 data from the pace prediction after the completion of L=05, in addition to the other suggestions in future revisions.

Cool, if that's possible. If you dropped the L1-L4 data and reset the calculations after 5-6 it would probably totally solve the issue. And I have to admit, it IS kind of fun to see a pace during the early boards, even if it doesn't mean much. As long as the number becomes accurate after L5, that's what matters.

Also, not that it makes any real difference, but I was just messing around with dipswitches, and if you're on 6+1 settings, you don't get death points for the extra men, and the HOW HIGH screen starts kinda going to hell after your 4th death since there aren't enough "rows" to hold all the levels and death points. ;D I think if it's a "trainer", it probably shouldn't even have any options for lives other than 3+1.

Now that I think about it, I don't think there's a single dipswitch setting that is actually necessary for the trainer. You could re-map all of them to do whatever you want (like toggling the distances/decision point sprites on or off, start on L5, etc.)

Looking forward to more of this.
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

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #33 on: June 11, 2016, 08:26:56 am »
Wow, it seems to be working much better now. I super-warped to L5 this time, getting a start of 95K, and the pace was something like 849K, which is kinda the quintessential "KS with nothing extra" score.  <Allen>

It seems to be working pretty well now.  I'm still not satisfied with the 1-1 score conversion (the pace after 1-1 seems too low.  the source statistics I have are too skewed because most people press much harder on 1-1 than other barrels screens.)

Also, not that it makes any real difference, but I was just messing around with dipswitches, and if you're on 6+1 settings, you don't get death points for the extra men, and the HOW HIGH screen starts kinda going to hell after your 4th death since there aren't enough "rows" to hold all the levels and death points. ;D I think if it's a "trainer", it probably shouldn't even have any options for lives other than 3+1.

Now that I think about it, I don't think there's a single dipswitch setting that is actually necessary for the trainer. You could re-map all of them to do whatever you want (like toggling the distances/decision point sprites on or off, start on L5, etc.)

Yeah, I'm probably going to remove options for anything other than 3+1 lives.  Internally, it can support more lives in the calculations, but there just isn't enough real-estate on the screen to display more than 4 sacs/deaths.   The chart ends up wrapping around past the bottom and back to the top of the screen.   I have exactly run out of ROM space at this point too - hopefully removing the dip switch options will free enough ROM space to allow me to add options to toggle the extra in-game graphics on/off.   May have to remove the intro climbing sequence soon
"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 Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #34 on: June 13, 2016, 08:14:26 pm »
One more update to the pace calculations..  I'm still not 100% satisfied, but it's not too bad - I'll probably tweak it some more.

I'm trying an experimental algorithm that drops one early stage tally from the predicted average after each completed stage from L=05 onwards...   For example, after completing 5-1, it stops using the 1-1 score as part of the future stage average calculation.   After 5-2, the 1-2 score is dropped.  After 5-3, the 2-1 score is dropped,etc... until only scores from L=05+ are used for unplayed stage score prediction.

At that point it becomes the standard pace calculation, except it can calculate a new pace after each completed stage.. and that score predictions for each board are rounded to 100 point values for Z80 sanity, so it's a bit coarser.

It is nice to see pace update immediately after each stage.  You can see the pace go up if you played a good board or down if you didn't - you get instant feedback
"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 Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #35 on: June 14, 2016, 11:33:48 am »
I figured out what it was, I found a bug in my code that caused it to load incorrect values for early rivets boards in the calculations.  I've fixed the bug and updated the file on my web page.

If I play a consistent game, the reported pace stays pretty consistent... if I play one board a bit better, the pace goes up, if I play a board a bit worse, the pace goes down.   I can reliably 'call' whether it'll go up or down after each board, so it seems to jive with how I think I played.

So, I'm happy with it.   Onwards to finishing up.   (In other news, I've run out of ROM space so that's going to limit adding anything else to really small stuff.)
"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 mrvaya

  • Senior Member
  • *
  • Posts: 196
    • Awards
Re: Donkey Kong Trainer
« Reply #36 on: June 14, 2016, 04:58:23 pm »
Sounds GREAT! Is it hard to make an edition with just the pace calculator? (tournament edition or whatever you'll call it).
Member for 11 Years DK Killscreener Blogger Twitch Streamer

Offline tilt

  • Global Moderator
  • Elite Member
  • *
  • Posts: 304
  • Repair man of DKF
    • Awards
Re: Donkey Kong Trainer
« Reply #37 on: June 14, 2016, 06:44:40 pm »
Very cool... so will this be able to be added to the remix pcb(s)?
My stream is currently (http://www.twitch.tv/expandedidea/)
PB(s):
Donkey Kong: 1,116,400 (KS)
Donkey kong Hard roms(prev. world record): 914,200
Crazy Kong: 513,700 (KS)
Member for 10 Years DK 1.1M Point Scorer snek IGBY 2016 DKF Team Member DK 1M Point Scorer IGBY 2015 DKF Team Member CK Killscreener DK Killscreener IGBY 2014 DKF Team Member Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #38 on: June 14, 2016, 08:22:48 pm »
After I finish the trainer version, I'm going to look into adding just the pace to normal DK.
After that, I'm going to think long and hard about integrating it into the Remix kit.

*If* I manage to do that before the Kong Off, I am considering the possibility that I can update your kits with trainer/pace at Kong Off.   Bring your kit, I update it.   But keep in mind, I have not done this yet - it doesn't exist yet and it takes time to do.  No guarantee that I'll have this ready in time.
"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 mrvaya

  • Senior Member
  • *
  • Posts: 196
    • Awards
Re: Donkey Kong Trainer
« Reply #39 on: June 14, 2016, 10:32:47 pm »
BIG BIG BIG  Kreygasm
Member for 11 Years DK Killscreener Blogger 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 #40 on: June 14, 2016, 10:36:45 pm »
Wow! In just two revisions, this went very, very quickly from "the calculations have some serious flaws" to "this is the best pace calculator I've ever used." ;D

I'm just impressed that you're able to get the Z80 to do the math you need it to do at all. I'm no expert on the subject, but I know that the Z80 is not straightforward. You have to trick the fkn thing just to get it to do something as simple as multiply or divide. It's like some kind of sadistic abacus.

I really like how the early boards get gradually eliminated from the calculation between 5-1 and 7-2, rather than abruptly on 6-1. Keeping some data in there, or something else you're doing, appears to be protective against the "unusually huge or small early conveyor or rivet" problem. The pace isn't flying completely out of whack.

I also like the 1K per death points. That's good. 3,400 death points would be unusually low, but it's safer to go lower, and it's probably true that at least a little something should be added to pace for deaths.

I made a savestate after a 111K start, and starting from that, went in two different directions: I did one sample of L5 through L8 56Kish levels, and another sample where I played L5 through L8 as 47Kish levels. By 8-1, the numbers all seem to be smoothed out, and the pace it gives is pretty much exactly what I would expect, and what I get if I do the "simple" method.

I didn't try any super-high 1.15+ type boards, so I can't say if it works as well for maxout play, but it seems to work fine for anything lower.

I also tried doing other weird things, by cheating and board-skipping and stuff, to try to get it to put out a crazily-wrong number, but I couldn't confuse it.

Awesome!

Now we just need someone to take this algorithm and stuff it into a program that does OCR and Pauline can be updated for the modern age. :)
« Last Edit: June 14, 2016, 11:10:14 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 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

Offline Barra

  • Global Moderator
  • Spring Jumper
  • *
  • Posts: 1472
  • Pie Kicker
    • Awards
Re: Donkey Kong Trainer
« Reply #41 on: June 15, 2016, 03:42:39 am »
words

Ffttt whens 1m


(epic stuff btw John)
Member for 11 Years Former DK3 World Record Holder DK Masters - Rank A DK 1.1M Point Scorer 1M on DK, DKJR, and DK3 Difficulty 3 DK3 Repetitive Blue Screener Submit a score for every DK3 track Winner of a community event IGBY 2016 DKF Team Member DKJR Killscreener DK 1M Point Scorer CK Killscreener DK Killscreener Blogger Twitch Streamer

Offline mrvaya

  • Senior Member
  • *
  • Posts: 196
    • Awards
Re: Donkey Kong Trainer
« Reply #42 on: June 15, 2016, 05:36:46 am »
Just tested and the pace calculator works amazingly here too... began with some terrible boards and pace started at 700-something... then rose quickly to around 850k midst lvl 3 which sounds about right for my games.

Started a new game and tried some dual hammer screens and were quickly paced at above 1M. Like it!

Just cant stand playing with those dots around jumpman  ???
« Last Edit: June 15, 2016, 05:42:27 am by mrvaya »
Member for 11 Years DK Killscreener Blogger Twitch Streamer

Offline Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #43 on: June 15, 2016, 12:47:27 pm »
Wow! In just two revisions, this went very, very quickly from "the calculations have some serious flaws" to "this is the best pace calculator I've ever used." ;D

I'm just impressed that you're able to get the Z80 to do the math you need it to do at all. I'm no expert on the subject, but I know that the Z80 is not straightforward. You have to trick the fkn thing just to get it to do something as simple as multiply or divide. It's like some kind of sadistic abacus.

I'm cutting corners to keep things simple, but yeah - there's no divide or multiply in the Z80.    I did write a divide routine to calculate average scores, that was unavoidable, but I didn't bother writing a multiply routine.   I take shortcut substitutions in the case of multiply:
If I needed RESULT = VALUE * 1.3
I used a series of bit shifts and additions instead.   RESULT = VALUE + (VALUE/4) + (VALUE/16)
The result is closer to VALUE * 1.3125, but that's good enough.   Those shortcuts are only used in generating imaginary scores for stage-types that haven't been played yet (like getting a pie average when a pie hasn't even been played yet) or handling pre-L5 scores.

Once it transitions to normal pace calculation, those shortcuts aren't applied anymore so I didn't worry too much being off by a few percent for the sake of keeping things simple.


Now we just need someone to take this algorithm and stuff it into a program that does OCR and Pauline can be updated for the modern age. :)
I can share the recipe when I'm done.   It'll probably surprise everyone how far I simplified/dumbed it down.   The theory is pretty sound, though.

If we had a data set of board score averages between L1-1 to L5-6 for 850K games, and another set for 1M games, I bet I could come up with an algorithm that could predict some pretty eerily accurate pace even early in a game.

From that data it ought to even be possible to work out a way to tell the player that he's playing barrel boards at 900K level, rivet boards at 860K level, etc.. which seems like it might be handy for showing which stage types could use some improvement.

Just tested and the pace calculator works amazingly here too... began with some terrible boards and pace started at 700-something... then rose quickly to around 850k midst lvl 3 which sounds about right for my games.

Started a new game and tried some dual hammer screens and were quickly paced at above 1M. Like it!

Just cant stand playing with those dots around jumpman  ???

Yup, I think that's next..  I have to think of an easy way to toggle the extra displays that won't eat much ROM space.. maybe simply inserting coins to toggle between dots/no-dots/numbers/no-numbers.
"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 Sock Master

  • Elite Member
  • *
  • Posts: 383
    • Awards
Re: Donkey Kong Trainer
« Reply #44 on: June 17, 2016, 10:42:07 pm »
One more update is up, maybe the last for a while as I've hit the point where it's getting really difficult to free up more ROM space to add anything else to it.

You can now jump start at L=5-1 by pressing the 1P start button for 2 seconds during the intro sequence,
and also toggle the sprite indicator "dots" on or off by inserting coins during gameplay.

There's an on-screen description of the button functions in the attract mode.  I had to keep the text short, though.
"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