This is an addendum to
this post where I was trying to make NHL ’94 more challenging.
I’ve all but given up on trying to give the computer an extra useful player in shootout mode. Giving the computer an extra player who stands and does nothing is trivial. Unfortunately, the “AI” for shootout mode is - maybe not surprisingly - hard-coded - it doesn’t even take into consideration the position of the goalie - and rewriting the AI in 65C816 assembly is beyond the scope of my free time. This is easy to show by watching the differing behaviour between when the computer gets a breakaway (in regular mode) compared to how it behaves in shootout mode.
So I play in regular mode with a 3-man handicap. E.g., we play 5-on-2. If you watched the first video from my last post, you’ll notice that handicapping yourself makes the game beep constantly. It’s very very irritating. Fixing this is actually not completely trivial. For those that are impatient, here are the memory addresses I’m using:
Address
Description
Example value
7E17A6
Number of players for the home team
3
7E18BA
Good question! See below
12
7E1864
Number of seconds left in the penalty
40
Using the values above will stop the incessant beeping.
I haven’t had time to fully explore the implications of 7E18BA. Just from observation, it seems that that the 7E1860 - 7E18C0 range is an array of player state and 7E18BA is an offset into that array which pertains to the penalty. By setting 7E18BA to 0x12, it seems, you indicate which element of the array from which to draw penalty-time-remaining information. I only use the value of 0x12 and the associated address 7E1864 because those are what came up for me during debugging (Mike Gartner, if you’re curious). I haven’t found any rhyme or reason to the number 0x12 yet, but I don’t really care too much at this point.
As a side note, someone really needs to come up with a better tool for “RAM cheating”. For those unfamiliar, the general procedure for this style of black-box debugging - usually used for cheating, though in my case I guess it’s anti-cheating - is to snapshot RAM at various stages of play. You then compare the RAM images according to what state you’re looking for. E.g., if you want to know where the numbers of players on the ice is stored in RAM, you snapshot when you have 6 players on the ice a few times and again when you have 5 players on the ice and look for the numbers “6” and “5” to consistently appear in RAM.
If you have a hacker mentality, this way of doing things can be productive, but it’s pretty crude. Generally the tools available don’t allow you to compare bit-values, only byte-values, and comparison operators are pretty limited. After half-heartedly trying to follow along with Jasna’s AI assignments, I’d be surprised if this problem hasn’t been solved generally and properly in the AI academic community. Oh well.
Originally published at
Wizardlike research. You can comment here or
there.