Need a little programming help. Anyone?

For Fantasy Football related chat that doesn't come under any of other forum categories.

Moderator: TFF Mods

Post Reply
plasmoid
Legend
Legend
Posts: 5334
Joined: Sun May 05, 2002 8:55 am
Location: Copenhagen
Contact:

Need a little programming help. Anyone?

Post by plasmoid »

Hi all,
I'm doing some commishing in the MBBL, and I really need some help producing a program that can crunch some numbers for the good of the BBRC.

MBBL tracks the win ratios of all races, but the number isn't all that significant, because they are affected by the skill of the involved coaches.

Therefore, I'd like to be able to calculate a teams "performance" - i.e. is it overperforming or underperforming compared to the coaches playing the race.

This is what I need:
*I need something where I can copy columns from html tables, and port them into the program.
*I need one table, where I can paste in a column of coach names and a column next to it where I can paste in the coaches average win-percentage.
That way each name should correspond to a number.
*Then, I need a second table, where I can again paste in a column of coach names, and a column of games played (by that coach) with the race I'm currently calculating.
The program should then take the coachs average win percentage (as pasted) and multiply it by his number of games with the race (as pasted) - and add up all those numbers - and divide that number by the sum of games played (with that race).

That's it.
Did it make sense.

To Clarify.
I first copy and paste 2 columns: coachs and average wins. F.ex.:
Aboon 42.30
Gilbert 33.33
Roger 50.00
Vix 72.01

Then I paste in their games with (say) Elfs:

Aboon 3
Gilbert 7
Vix 3

The expected win-percentage for Elfs would then be:
(3 * 42.30) + (7 * 33.33) + (3 * 72.01) / (3+7+3) = 44.33

If the Elf teams actual win percentage (which I've got) is higher, then it is overperforming. If it is lower then it is underperforming.

Is there anybody out there who is able and willing to do this?
Please :D
Martin

Reason: ''
User avatar
Der_Doodle
Veteran
Veteran
Posts: 268
Joined: Tue Apr 22, 2008 5:55 pm
Location: Germany

Post by Der_Doodle »

First of all I have to say that in the Win/Loss calculation of the MBBL i see a huge problem (maybe i havent understood it correctly but...)

For example I would play a high TV Dwarf team and i would challenge one low elf team or whatever else i will mostly get declined challenges. All those declined challenges count as a victory for my team and are therefor increasing my Win Ratio.

I am not saying that someone would actively try to get his ratio up this way but all these declined challenges kinda break the winning statistics.

So I prefer if a Declined Challenge will give/reduce your LP but dont count as a Victory/Loss on the statistics.

Therefor you would get a statistic that would be more "correct"

But to the real topic :)
Sorry cant help you there my programming abilitys suck. I am already more then happy that i could wite my stuff in TeX :)

Reason: ''
User avatar
Darkson
Da Spammer
Posts: 24047
Joined: Mon Aug 12, 2002 9:04 pm
Location: The frozen ruins of Felstad
Contact:

Post by Darkson »

Also, taking a coaches average w/l percentage doesn't take into account that some people play some types of teams better than others.

For example, Roger is an great Elf (other Elf races coach), but a poor Orc one, giving him his 50% record. If he wins 4 games with (Pro) Elfs, he'll skew your findings.






I think...

Reason: ''
Currently an ex-Blood Bowl coach, most likely to be found dying to Armoured Skeletons in the frozen ruins of Felstad, or bleeding into the arena sands of Rome or burning rubber for Mars' entertainment.
plasmoid
Legend
Legend
Posts: 5334
Joined: Sun May 05, 2002 8:55 am
Location: Copenhagen
Contact:

Post by plasmoid »

Hi guys,

Der_Doodle said:
All those declined challenges count as a victory for my team and are therefor increasing my Win Ratio.
True. Then again many of the games that are dodged because they would be slaughters would have been won anyway because they would have been, well, slaughters. Not all, but still...

Darkson said:
Also, taking a coaches average w/l percentage doesn't take into account that some people play some types of teams better than others.
Entirely true.
Neither does it take overdog/underdog factor into account.
But it's a start, IMO.

Cheers
Martin

Reason: ''
SillySod
Eternal Rookie
Eternal Rookie
Posts: 1952
Joined: Tue Apr 01, 2008 2:09 am
Location: Winchester

Post by SillySod »

Then again many of the games that are dodged because they would be slaughters would have been won anyway because they would have been, well, slaughters. Not all, but still...
Isnt this the inherrant problem? :) Perhaps including the difference between the team values as a factor in "how big a win" a game was would help. That way a TV250 elf team that trys to challenge only struggling halflings whenever possible cant skew the statistics too much.

I would assume that MBBL runs from a database and it already has some statistics so using the same software but just building new queries and a page to host/call them into the website looks like the way to go.

Alternatively, try building something in java. I know that some of the leagues for fumbbl have built some passers that run automatically call up all the match reports of a coach or team and then process them for information including wins, casualties, and corresponding team strength. I think someone even developed an extrenal tool that ran through the match replays and then told you how violent your vampires were to their thralls and which thralls had been bitten the most etc :lol:

Reason: ''
Victim of the Colonel's car boot smash. First person to use Glynn's bath.
Update: the Hartlepool family Glynn now has a virgin bath.

Barney is a clever dog.
plasmoid
Legend
Legend
Posts: 5334
Joined: Sun May 05, 2002 8:55 am
Location: Copenhagen
Contact:

Post by plasmoid »

Hi Sillysod,
the problem is coming up with a working formula that encompases all those variables in a meaningful way.
I don't know if it can be done.
I sure can't.

So until someone figures that out, I'll settle for less.

Second problem is that I have no programming skills, and don't know anybody involved with the code who has the time to do this.

This is why I'm looking for a simple external solution.
And even that I need help with.
Anyone?

Cheers
Martin

Reason: ''
User avatar
Darkson
Da Spammer
Posts: 24047
Joined: Mon Aug 12, 2002 9:04 pm
Location: The frozen ruins of Felstad
Contact:

Post by Darkson »

Can't Galak provide it? He has the complete database.

Reason: ''
Currently an ex-Blood Bowl coach, most likely to be found dying to Armoured Skeletons in the frozen ruins of Felstad, or bleeding into the arena sands of Rome or burning rubber for Mars' entertainment.
Cramy
Super Star
Super Star
Posts: 824
Joined: Wed Jul 06, 2005 5:35 pm
Location: Gatineau, Quebec, Canada

Post by Cramy »

Programming wise, I'd use Excel with macros. Use VBA (Visual Basic for Applications).

Copy the columns and paste them in the Excel spreadsheet. Then run the macro the crunch the numbers.

I have built a tournament spreadsheet that computes rankings using different tie-breakers, then figures-out match-ups making sure that coaches don't play each-other twice. I compute the initial match-ups taking into account place of origin, hence making sure that your first opponent is not somebody that you play against on a regular basis.

The latest version was for the Q'ermitt, so I made sure that no coach played on the same custom pitch twice.

You need to know the basics of programing though. The Internet can easily teach you the details of the syntax of the different statements.

Reason: ''
Cramy
User avatar
DoubleSkulls
Da Admin
Posts: 8219
Joined: Wed May 08, 2002 12:55 pm
Location: Back in the UK
Contact:

Post by DoubleSkulls »

Isn't most of that information available on the HTML MBBL pages already?

In which case it may be possible just to use Excel's web import to load the page into Excel directly and manipulate the data in there.

Reason: ''
Ian 'Double Skulls' Williams
plasmoid
Legend
Legend
Posts: 5334
Joined: Sun May 05, 2002 8:55 am
Location: Copenhagen
Contact:

Post by plasmoid »

Hi Ian and Cramy,
thanks... I think :wink:
See - what you're writing is bordering in gibberish to me. Yes - I'm really that cpu inept!
But never mind a friend of mine has promised to do it in excel, next time there's a rainy day in Denmark :D

Cheers
Martin :oops:

Reason: ''
User avatar
GalakStarscraper
Godfather of Blood Bowl
Posts: 15882
Joined: Tue Jun 26, 2001 12:00 am
Location: Indiana, USA
Contact:

Post by GalakStarscraper »

SillySod wrote:
Then again many of the games that are dodged because they would be slaughters would have been won anyway because they would have been, well, slaughters. Not all, but still...
Isnt this the inherrant problem? :)
Don't know that I agree that it is.

I've played the game where I had the lowly Elf type team playing the TV 230+ Dwarf team and I found the inducements gave me the 30 to 35% chance to win like there were supposed to.

I also has plenty of opportunties to load up on Mercs and extra apothecaries to limited the CAS impact.

Galak

Reason: ''
Impact! - Fantasy Football miniatures and supplies designed by gamers for gamers
Image
Post Reply