FlameKnight's kicking calculations + expensive mistakes

Want to know how to beat your opponents, then get advice, or give advice here.

Moderators: Valen, TFF Mods

Post Reply
FlameKnight
Emerging Star
Emerging Star
Posts: 336
Joined: Tue Aug 05, 2003 11:20 am

FlameKnight's kicking calculations + expensive mistakes

Post by FlameKnight »

Hi all,

I've been working on something, which I posted to ausbowl recently. I had been thinking about ball placement at kickoff with and without the kick skill, and the probabilities of touchbacks. I couldn't find any probability tables online, so I calculated them.

The images below show, for ball placement in each square, the percentage chance of the ball staying in-field. The calculations (sum-over-tree) include changing-weather effects.

Probabilities without the kick skill
Image

Probabilities with the kick skill always used
Image

The code to calculate this, in C, is included below. It's not elegant.

Code: Select all

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char* argv[]){

int x, y, xw, yw, xwb, ywb, xb, yb;
int x0,y0;

int dirxk,diryk;
int dirxw,diryw;
int dirxwb,dirywb;
int dirxb,diryb;
int roll;

//Board dimesions xmax=15, ymax=13

double p,ptot,pw,pwb,pb;

    

//Without kick!
for(x0=1;x0<=15;x0++){
	for(y0=1;y0<=13;y0++){
		x=x0;
        y=y0;
        ptot=0;
		//set ball at selected square
		//dir = directional rolls in each dimension
		for(dirxk=-1;dirxk<=1;dirxk++){
			for(diryk=-1;diryk<=1;diryk++){
				//skip the zero direction
				if(dirxk*dirxk+diryk*diryk>0){
                    //For no kick!
                    /*
					for(roll=1;roll<=6;roll++){
                        p=(1./8.)*(1./6.);
                    */
                    //For kick!
                    
                    for(roll=0;roll<=3;roll++){
                        if(roll==0||roll==3){p=(1./8.)*(1./6.);}
                        else{p=(1./8.)*(2./6.);}
                    
						x=x0+dirxk*roll;
						y=y0+diryk*roll;
						//if ball went out, add p to ptot
						if(x<1||x>15||y<1||y>13){
							ptot+=p;
						}
						else{
						//otherwise, trigger weather calcs, then no-weather bounce calcs
							//weather trigger, and weather direction
                            pw=(1./6.)*(5./6.)*(1./8.);
							for(dirxw=-1;dirxw<=1;dirxw++){
								for(diryw=-1;diryw<=1;diryw++){
									//skip the zero direction
                                    if(dirxw*dirxw+diryw*diryw>0){
										xw=x+dirxw;
										yw=y+diryw;
										//if weather causes ball to go out, add to prob
										if(xw<1||xw>15||yw<1||yw>13){
											ptot+=p*pw;
                                            //printf("out!\n");
										}
										//otherwise, bounce the ball
										else{
											pwb=(1./8.);
                                            for(dirxwb=-1;dirxwb<=1;dirxwb++){
												for(dirywb=-1;dirywb<=1;dirywb++){
													//skip the zero bounce
													if(dirxwb*dirxwb+dirywb*dirywb>0){
														xwb=xw+dirxwb;
														ywb=yw+dirywb;
														if(xwb<1||xwb>15||ywb<1||ywb>13){
															ptot+=p*pw*pwb;
                                                            //printf("out!\n");
														}
													}
												}
											}
										}
									}
								}
							}
                            //pb is probability of no weather scatter, either from not rolling a 7 on the table, or by not rolling "nice" on the changing weather kickoff roll
							pb=(1-pw)*(1./8.);
							for(dirxb=-1;dirxb<=1;dirxb++){
								for(diryb=-1;diryb<=1;diryb++){
									//skip the zero bounce direction
									if(dirxb*dirxb+diryb*diryb>0){
										xb=x+dirxb;
										yb=y+diryb;
										if(xb<1||xb>15||yb<1||yb>13){
											ptot+=p*pb;
                                            //printf("out!\n");
										}
									}
								}
							}
						}
					}
				}
			}
		}
        //if(ptot!=0){
        //    printf("%.2f",1/ptot);
        //}
        //else{
        //    printf("X");
        //}
        printf("%.2f",100*(1-ptot));
		if(y0<13){
			printf("\t");
		}
		if(y0==13){
			printf("\n");
		}
	}
}

return 0;}
A question came up about the effects of players on the LOS increasing the touchback odds. It gets tricky - but the effect on the odds turns out to be minor. Discussion here.


--------------------

As a bonus, here is a calculation I did for the ideal Expensive Mistakes treasury values:

I was interested in the question of when it is worth dumping your treasury (say, by hiring and firing cheerleaders). So I made a figure. Horizontal axis is the treasury before expensive mistakes roll, vertical axis is expectation value of treasury after expensive mistakes roll.

Image

Red zones indicate regions where it is worth dumping money to 190k, 290k, 390k or 490k. It assumes that you're just trying to maximise final treasury.

Table of results included below:

Code: Select all

Treas. Before (x10k)	Treas. After (x10k)
0	0.00
1	1.00
2	2.00
3	3.00
4	4.00
5	5.00
6	6.00
7	7.00
8	8.00
9	9.00
10	9.33
11	10.33
12	11.33
13	12.33
14	13.33
15	14.33
16	15.33
17	16.33
18	17.33
19	18.33
20	17.67
21	18.58
22	19.50
23	20.42
24	21.33
25	22.25
26	23.17
27	24.08
28	25.00
29	25.92
30	23.00
31	23.75
32	24.50
33	25.25
34	26.00
35	26.75
36	27.50
37	28.25
38	29.00
39	29.75
40	25.00
41	25.58
42	26.17
43	26.75
44	27.33
45	27.92
46	28.50
47	29.08
48	29.67
49	30.25
50	23.25
51	23.67
52	24.08
53	24.50
54	24.92
55	25.33
56	25.75
57	26.17
58	26.58
59	27.00
60	27.42
61	27.83
62	28.25
63	28.67
64	29.08
65	29.50
66	29.92
67	30.33
68	30.75
69	31.17
70	31.58

Reason: ''
"In Nuffle We trust"
Line Judge, Reformed Church of Nuffle
User avatar
Saebelsultan
Super Star
Super Star
Posts: 760
Joined: Wed May 07, 2014 7:02 am
Location: Kicking off in stadiums around the Old World
Contact:

Re: FlameKnight's kicking calculations + expensive mistakes

Post by Saebelsultan »

This is awesome! At least for me as somebody who always wonders where to kick and then always takes the middle sqaure anyway, because that feels the safest.
Thanks!

Reason: ''
"This game is too good not to be played!" - Coach Pauli
Blood Bowl Beginner Kit
Saebelsultan's BB Dugouts
User avatar
Heff
Dwarf fetishist
Posts: 2843
Joined: Sat May 30, 2009 5:53 pm
Location: Where the Dwarf Hate is

Re: FlameKnight's kicking calculations + expensive mistakes

Post by Heff »

So if playing crap and dingleberry it is probably worth kicking the little bomb 3 or 4 squares forward of the sweet spot to maximise chance of a touchdown while the scatter is still acceptable

Reason: ''
Heff...Keeping the Dwarf (and lego) hate alive
If you cannot stall out for an 8 turn drive to score with dwarves then you need to go and play canasta with your dad..if you can find him.
Image
Itchen Masack
Ex-Mega Star, now just a Super Star
Ex-Mega Star, now just a Super Star
Posts: 1390
Joined: Thu Feb 09, 2012 3:12 pm

Re: FlameKnight's kicking calculations + expensive mistakes

Post by Itchen Masack »

What pretty pictures :) But I need a few more pictures factoring in the standard LOS setups and for the chance of an edge-landing combined with High Kick :P

Reason: ''
Post Reply