Jump to content
buck

Heavier weighting of COM run/pass ratio ?

Recommended Posts

How/where (0x) is the COM run/pass ratio set? I'd bet there's an adjustable probability setting somewhere - that tells COM to pick a run or pass, using the setting (0,1,2,3). I don't know where to look...

I'm specifically interested in amplifying the "extreme" settings -> settings of 1 (heavy rush) or 3 (heavy pass).

***For example, I'd like a team with a "1" (heavy rush) to run the ball "even more" when I'm playing against them.

Share this post


Link to post
Share on other sites

i believe this is the code. the run/pass ratio is saved into $A2 prior to executing $AA84.

changing the CMP #$99 and CMP #$B3 should do the trick.

(sorry, but the code tags always kill my tabs)


$AA84:A5 A2 LDA $00A2 = #$00 ; get run/pass ratio
$AA86:0A ASL ;
$AA87:AA TAX ;
$AA88:BD 4E AA LDA $AA4E,X @ $AA4F = #$AA ; set jump address
$AA8B:85 3E STA $003E = #$00 ;
$AA8D:BD 4F AA LDA $AA4F,X @ $AA50 = #$9E ;
$AA90:85 3F STA $003F = #$00 ;
$AA92:6C 3E 00 JMP ($003E) = $0000 ; jump to code


;-----------------------------------------------;-#00--------------------------
$AA95:A5 40 LDA $0040 = #$7C ; keep play index from 0 to 7
$AA97:29 07 AND #$07 ;
$AA99:85 40 STA $0040 = #$7C ; save play index
$AA9B:4C 2A A7 JMP $A72A ; continue...
;-----------------------------------------------;-#01--------------------------
$AA9E:A5 40 LDA $0040 = #$7C ; if ( RAND > #$99 )
$AAA0:C9 99 CMP #$99 ;
$AAA2:90 0C BCC $AAB0 ;
$AAA4:A5 41 LDA $0041 = #$81 ; get PLAY_RAND
$AAA6:29 03 AND #$03 ; keep play index from 0 to 3
$AAA8:18 CLC ;
$AAA9:69 04 ADC #$04 ; adjust index into pass plays
$AAAB:85 40 STA $0040 = #$7C ; save play index
$AAAD:4C 2A A7 JMP $A72A ; continue...
; else
$AAB0:A5 41 LDA $0041 = #$81 ; get PLAY_RAND
$AAB2:29 03 AND #$03 ; mask play index to run plays
$AAB4:85 40 STA $0040 = #$7C ; save play index
$AAB6:4C 2A A7 JMP $A72A ; continue...
;-----------------------------------------------;-#02--------------------------
$AAB9:A5 40 LDA $0040 = #$7C ; if ( RAND > #$99 )
$AABB:C9 99 CMP #$99 ;
$AABD:90 09 BCC $AAC8 ;
$AABF:A5 41 LDA $0041 = #$81 ; get PLAY_RAND
$AAC1:29 03 AND #$03 ; mask play index to run plays
$AAC3:85 40 STA $0040 = #$7C ; save play index
$AAC5:4C 2A A7 JMP $A72A ; continue...

$AAC8:A5 41 LDA $0041 = #$81 ; get PLAY_RAND
$AACA:29 03 AND #$03 ; keep play index from 0 to 3
$AACC:18 CLC ;
$AACD:69 04 ADC #$04 ; adjust index into pass plays
$AACF:85 40 STA $0040 = #$7C ; save play index
$AAD1:4C 2A A7 JMP $A72A ; continue...
;-----------------------------------------------;-#03--------------------------
$AAD4:A5 40 LDA $0040 = #$7C ; if ( RAND > #$B3 )
$AAD6:C9 B3 CMP #$B3 ;
$AAD8:90 09 BCC $AAE3 ;
$AADA:A5 41 LDA $0041 = #$81 ; get PLAY_RAND
$AADC:29 03 AND #$03 ; mask play index to run plays
$AADE:85 40 STA $0040 = #$7C ; save play index
$AAE0:4C 2A A7 JMP $A72A ; continue...

$AAE3:A5 41 LDA $0041 = #$81 ; get PLAY_RAND
$AAE5:29 03 AND #$03 ; keep play index from 0 to 3
$AAE7:18 CLC ;
$AAE8:69 04 ADC #$04 ; adjust index into pass plays
$AAEA:85 40 STA $0040 = #$7C ; save play index
$AAEC:4C 2A A7 JMP $A72A ; continue...

Share this post


Link to post
Share on other sites

Thanks. So, CMP #$99 is comparing Accumulator (what's just been loaded) with Memory immediately at #$99...How do I translate where #$99 is? Because that will be the value to tweak, right?

Share this post


Link to post
Share on other sites

correct. these are the addresses i have:


$AAA0:C9 99 CMP #$99 at 0x018AB0
...
$AABB:C9 99 CMP #$99 at 0x018ACB
...
$AAD6:C9 B3 CMP #$B3 at 0x018AE6

add 1 to each address to get to the immediate operand.

Share this post


Link to post
Share on other sites
correct. these are the addresses i have:


$AAA0:C9 99 CMP #$99 at 0x018AB0
...
$AABB:C9 99 CMP #$99 at 0x018ACB
...
$AAD6:C9 B3 CMP #$B3 at 0x018AE6

add 1 to each address to get to the immediate operand.

yep, thanks again cxrom.

I found that increasing the number results in the COM doing more of "it".

So, to make a "1 team" run "more", increase the number at 0x018AB1. Likewise, to make a "3 team" pass more, increase the number at 0x018AE7.

Now, just need to keep COM v COM testing to find the right amount of "more"...

Share this post


Link to post
Share on other sites
Much interested in your results, sir.

Since I was focusing on the 1 and 3 levels, that's all I'll report here. I found that a value of xC0 causes a play ratio of 70% to 30%...which is what I was shooting for. Values higher (up to FF) will result in "whatever" being called at an even higher percentage.

In summary:

Teams with a "1 (heavy rush)" and "C0" results: 209 plays = 147 runs + 62 passes => around 70% run.

Teams with a "3 (heavy pass)" and "C0" results: 149 plays = 107 passes + 42 runs => around 71% pass.

I've actually set this aside for a while - once I start doing more serious matchup testing with the rom I'm working on, I'll decide if xC0 is really enough (I'm dealing with Bronko Nagurski, here...)

Share this post


Link to post
Share on other sites

@buck, would this be the set command to use for your take on the code:

 

#Heavier weighting of COM run/pass ratio
#http://tecmobowl.org/forums/topic/10511-heavier-weighting-of-com-runpass-ratio/
SET(0x018AB1,xC0)
SET(0x018AE7,xC0)

and would setting 0x018ACB to a value affect teams with more balanced offenses?

Share this post


Link to post
Share on other sites

The 4 offensive styles which are run if situational logic doesn't override them are

 

0 = random

1 = 60% run, 40% pass

2 = 40% run, 60% pass

3= 30% run, 70% pass 

 

 

The value at 0x18AB1 sets how often the team runs for offensive playstyle 1= run heavy. The defalut value of 0x99 sets the default to 60% run/ 40% pass. Changing it to 0xC0 would make it 75% run. That's super heavy run.

 

However that value is also used if the com is leading in the 4th with less than 2 minutes left.

 

The value at 0x18AE7 is only used for the team style. Again changing  to 0xC0 would make it 75% pass. 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×