Conquer Club

[Excel] Bonus Probabilities

How to make a map. Official Handbook, Guides, Tutorials and more...

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

[Excel] Bonus Probabilities

Postby MrBenn on Mon Apr 27, 2009 1:19 pm

I've spent a but of time dusting off some textbooks, and have put together a quick spreadsheet that will calculate the probability of dropping a particular bonus region on a map, that also takes 'build-your-own' bonuses into consideration...

Here it is then - and it is finally accurate:

Bonus Probability 12p.xls
MrBenn's Bonus Probability Calculator
(451.5 KiB) Downloaded 1085 times


A nice extension (which I don't intend to develop in the immediate future) would be something that calculated the probability of dropping ANY bonus, and the average/typical bonus dropped.

Happy calculating ;-)
Last edited by thenobodies80 on Sat Oct 05, 2013 4:42 pm, edited 1 time in total.
Reason: updated spreadsheet
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby john9blue on Mon Apr 27, 2009 5:26 pm

MrBenn wrote:I've spent a but of time dusting off some textbooks, and have put together a quick spreadsheet that will calculate the probability of dropping a particular bonus region on a map, that also takes 'build-your-own' bonuses into consideration...

Bonus Probabilities Spreadsheet v1

I don't think I've got my formulae wrong, but it has been a few years since I did any meaningful work using probabilities like this... If people think it would be useful, I can expand the spreadsheet to allow for more regions to be calculated simultaneously?


Wow, you put a lot of work into this- especially that giant invisible table. :lol:

My preliminary test didn't work, though. Try 9 territories with a continent of 3... each player gets 3 territs in a 2p or 3p game, and 84 ways to distribute them, so the odds are 1/84, or 1.19%. Your spreadsheet says 1.23%, so you're gonna have to tweak it.

Also, I don't get why "Bonus Probability" is the same for 2p and 3p, while "1st Player Probability" is different. In an actual game, the probability of any player getting a bonus is less for 2p than 3p, while the probability of the first player getting a bonus is the same. ;)
natty_dread wrote:Do ponies have sex?
Army of GOD wrote:the term heterosexual is offensive. I prefer to be called "normal"
(proud member of the Occasionally Wrongly Banned)
User avatar
Captain john9blue
 
Posts: 1268
Joined: Mon Aug 20, 2007 6:18 pm
Location: FlutterChi-town

Re: Bonus Probabilities

Postby Merciless Wong on Mon Apr 27, 2009 8:28 pm

I'm not getting results that make sense either when I check the results for a 2 terit area with 2 terits for bonus.
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Bonus Probabilities

Postby MrBenn on Tue Apr 28, 2009 7:01 am

john9blue wrote:My preliminary test didn't work, though. Try 9 territories with a continent of 3... each player gets 3 territs in a 2p or 3p game, and 84 ways to distribute them, so the odds are 1/84, or 1.19%. Your spreadsheet says 1.23%, so you're gonna have to tweak it.

Thanks for picking this up... I think I know where the problem lies (trying to be a bit too clever) - I'll have a play around and see if I can fix it ;-)
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby MrBenn on Tue Apr 28, 2009 10:56 am

Here's an updated version: Bonus Probabilities Spreadsheet v2
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby Teflon Kris on Thu Apr 30, 2009 1:51 pm

I'm not sure if I'm using the tool right as I got an 8517.96% chance of dropping on a 'build your own' bonus in the Midlands on the England map.

I entered:
Region A (Mid) - Size 18 - Req 4
Region B (South) - Size 15 - Req 7 (16 - 1 for M'sex being Neutral)
Region B (North) - Size 15 - Req 7

Apologies if I have messed up.
User avatar
Sergeant 1st Class Teflon Kris
 
Posts: 4236
Joined: Sun Jul 13, 2008 4:39 pm
Location: Lancashire, United Kingdom

Re: Bonus Probabilities

Postby MrBenn on Thu Apr 30, 2009 2:11 pm

Yeah - each spreadsheet uses a different method, neither of which works in all circumstances :?

v1 works well for the build-your-own bonuses, and v2 works well for the standard bonus regions... but neither is perfect :-(

I keep having glimpses of inspiration on how to resolve it, but my brain is too rusty to tie it down properly. Maybe I'll work it out properly one day... but for now I've lost the motivation :lol:


edit:
It seems like the formulae screw around if there are more territories in the bonus region than people get given... I've tried to work it all out, but I keep giving myself a headache...

I'm working on an improved /accurate version, and will update this thread once I'm happy with the solution. In the meantime, any discussion about bonus value probabilities/calculations should take place in this thread, rather than in any map threads ;-)
Last edited by MrBenn on Thu May 07, 2009 10:53 am, edited 1 time in total.
Reason: edited
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Gilgamesh; cities simplified pg 7

Postby Merciless Wong on Thu May 07, 2009 9:26 am

[quote="Incandenza"]Okay, Wong, I have a couple of questions for you:

1. using your methods, what's the chance of a person dropping australia in a classic 1v1?
2. what exactly is your goal here?
quote]

For 2 - see not maps under moderator complaints.

For 1: happy to oblige

Assuming neutral starts
1v1
Each province can go player 1, player 2 or neutral. So for simplicities sake 1/3 chance either way. In practice the chance will differ slightly if you modelled it at a lower level but that forces you to model each drop. For a 4 terit area within a 40 terit map the 1/3 is good for something you can do in your head.
There are 81 possibilities in total. Each of 4 terits can go 3 ways. 3^4 = 81

There are only 2 possibilities someone gets all 4. All player 1 or all player 2.

So odds are 2/81 = 2.4%

Assuming no neutral starts
1v1
Each province can go player 1 or player 2 . So for simplicities sake 1/2 chance either way. In practice the chance will differ slightly if you modelled it at a lower level but that forces you to model each drop. For a 4 terit area within a 40 terit map the 1/2 is good for something you can do in your head.
There are 81 possibilities in total. Each of 4 terits can go 2 ways. 2^4 = 16

There are only 2 possibilities someone gets all 4. All player 1 or all player 2.

So odds are 2/16 = 12.5%

The other standard I have seen is allowing 3 terit bonuses (see greenland)

Assuming neutral starts
1v1
Each province can go player 1, player 2 or neutral. So for simplicities sake 1/3 chance either way. In practice the chance will differ slightly if you modelled it at a lower level but that forces you to model each drop. For a 3 terit area within a 40 terit map the 1/3 is good for something you can do in your head.
There are 81 possibilities in total. Each of 3 terits can go 3 ways. 3^3 = 27

There are only 2 possibilities someone gets all 3. All player 1 or all player 2.

So odds are 2/27 = 7.4% .


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

Using classic as a standard - you basically need to see if someone starts with South A or Australia.
Odds of that not happening (with neutral starts) are
( 100% - 2.4% ) ^ 2 = 95%

So odds of a start with SA or Australia in 1v1 (with neutrals) are about 5%
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Gilgamesh; cities simplified pg 7

Postby Merciless Wong on Thu May 07, 2009 10:26 am

Merciless Wong wrote:
the.killing.44 wrote:
Merciless Wong wrote:The issue is not just the cities. Its the Cities and the Challenges. The Cities is a 9% chance of giving someone an edge.
The Challenges, another 9% or so (2/27). So your chance of having no starting bonuses or so is about (1-9%)^2.
So you are talking about a 18% chance of either 1 or 2 starting with an advantage - which would beat the 10% level you quoted

I'm not going to go into your other complaint, but your math is wrong. If you're saying that it's 9^2 with a max of 18, 9^2 = 81. Which is blatantly wrong.

.44


I'm not sure if you noticed but ^ is the power symbol.
(1-9%)
=91%
91%^2
=approx 81%

Chance of no bonus is 81%
Chance of bonus is 100% -81% = 19%

.


I'm treating it as a compound probability. It just happens that 1- ( (100%-9%)^ 2) = 18%.

Just making a point that the chance of a start with bonus with the "any 4 of 6" terits type bonus is higher than you think because the number of combinations that could get the bonus grows exponentially .

Ignoring neutral starts for 4 terits in 1 v1

someone getting 4 out of 4 = 2 * (1/ 2 ^ 4) = 2/16

someone getting 3 or more out of 4 = 10/16

someone getting 2 or more out of 4 = 16/16 (if someone gets less than 2 the other person has more than 2, no possibility both players have < 2 terits )
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Bonus Probabilities

Postby MrBenn on Thu May 07, 2009 10:46 am

[merged] in a couple of maths/bonus calculating posts
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Gilgamesh; cities simplified pg 7

Postby Merciless Wong on Thu May 07, 2009 10:52 am

Here's my working:

2^5 = 32. There are 5 provinces with cities, assuming conquer club will place them all with on player or the other there are
2x2x2x2x2 possibilities.
In 1 of them player 1 has it all
In 1 of them player 2 has it all
In 5 of them player 1 has 4 of the 5 cities
In 5 of them player 2 has 4 of the 5 cities
That's my 12 out of 32 = 37%

The reamaining 20 out of 32 are scenarios where player 1 has 3 cities (10 possibilities)
and player 2 has 3 cities (10 possibilities)

If you wish to model the number of neutals in 1v1 (I presume its 1 out of 40+ territories) it should make a slight difference.

If its 3 starts (1 neutral, meaning neutals will be 1/3 of the board):
3^5= 243 scenarios (focuing only on non hard coded neutral provinces that matter for city bonus)
2 of them they have it all
5 of them p 1 has 4, neutrals have 1
5 of them p 2 has 4, neutrals have 1
5 of them p 1 has 4, other has 1
5 of them p 2 has 4, other has 1

Makes it 22 out of 243 = 9.1%
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Gilgamesh; cities simplified pg 7

Postby Merciless Wong on Thu May 07, 2009 10:54 am

the.killing.44 wrote:
Merciless Wong wrote:
The issue is not just the cities. Its the Cities and the Challenges. The Cities is a 9% chance of giving someone an edge.
The Challenges, another 9% or so (2/27). So your chance of having no starting bonuses or so is about (1-9%)^2.
So you are talking about a 18% chance of either 1 or 2 starting with an advantage - which would beat the 10% level you quoted

I'm not going to go into your other complaint, but your math is wrong. If you're saying that it's 9^2 with a max of 18, 9^2 = 81. Which is blatantly wrong.

.44


I'm not sure if you noticed but ^ is the power symbol.
(1-9%)
=91%
91%^2
=approx 81%

Chance of no bonus is 81%
Chance of bonus is 100% -81% = 19%


I'm not adding the 2 probabilities.. Multiplying ...
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Bonus Probabilities

Postby oaktown on Thu May 07, 2009 2:14 pm

the formatting of these last few posts is so bad I'm not sure what's being argued by whom anymore... foundry folks, when you post something please preview it first. And if you're going to use examples, please describe the example.

And Wong, please stop posting data that "ignores neutral starts in 1v1" - the site doesn't ignore neutral starts, so presenting such data is just misleading and further confusing the issue.
Image
User avatar
Captain oaktown
 
Posts: 4451
Joined: Sun Dec 03, 2006 9:24 pm
Location: majorcommand

Re: Bonus Probabilities

Postby MrBenn on Thu May 07, 2009 6:42 pm

OK, here's the rough guide to bonus probabilities... It helps to think of the map a bit like a pack of cards... the total number of territories on the map represents the size of the deck. The territories a player gets is their hand - the goal is to work out the probabiltity of being dealt a set...

The size of the map / deck: T
The number of players: p
Number of territories in each hand: h

h = Floor(T/p,1) *If p=2, then h = Floor(T/3)

From this we can work out the total number of possible combinations of hands:

Combin(T,h) = T!/h!(T-h)! = Fact(T)/Fact(h)-Fact(T-h)

For Classic, with 2 or 3 players, this gives: Combin(42,14) = 52,860,229,080 possible hands.

Of those hands, how many of them will have the Australia bonus?

The total area of Australia: A
Territories required for bonus: a

There is only one way you can hold all four of the four Australian 'cards': Combin(A, a)= Combin(4,4) = 1
the other 10 cards in your hand can be any of the other 38 terrs: Combin((T-a), (h-a)) = Combin (38, 10) = 472,733,756

Multiplying these together will give the total number of ways you can hold the Australia bonus: 1 x 472,733,756 = 472,733,756

Divide this by the total number of combinations for the hand, and you get: 472,733,756/52,860,229,080 = 0.89%
Combin(A, a) x Combin((T-a), (h-a)) / Combin(T,h)


This is a similar method to that you would use to calculate the probability of getting a full house in a game of Poker. The problems come when you start trying to take into account of the build-your-own bonuses - it's more complicated than I originally thought, and involves Hypergeometric Probabilities rather than Binomials...
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby AndyDufresne on Thu May 07, 2009 6:50 pm

**Scratches his head** I'm glad I'm surrounded by you math folks. I'm a word man, always have been.

I remember when the only math we had to figure into cartography was counting territories, counting borders, counting assault routes, and counting bonuses!

Yowza.


--Andy
User avatar
Corporal 1st Class AndyDufresne
 
Posts: 24919
Joined: Fri Mar 03, 2006 8:22 pm
Location: A Banana Palm in Zihuatanejo

Re: Bonus Probabilities

Postby LED ZEPPELINER on Thu May 07, 2009 7:20 pm

AndyDufresne wrote:**Scratches his head** I'm glad I'm surrounded by you math folks. I'm a word man, always have been.

I remember when the only math we had to figure into cartography was counting territories, counting borders, counting assault routes, and counting bonuses!

Yowza.


--Andy

LOL, same. I look at the page, see a bunch of Letters, parenthesese, %'s, *'s, and numbers, and i am like, i'm getting out of here
sailorseal wrote:My big boy banana was out the whole time :D
AndyDufresne wrote:
AndyDufresne wrote:Many Happy Bananas to everyone, lets party...with Bananas.
--Andy
Forever linked at the hip's-banana! (That sounds strange, don't quote me.)
Sergeant LED ZEPPELINER
 
Posts: 1088
Joined: Tue Nov 25, 2008 10:09 pm

Re: Bonus Probabilities

Postby MrBenn on Thu May 07, 2009 7:43 pm

That's not even half of it! :lol:

The calculations I showed above were for the probability of ME dropping Australia in a 2 or 3 player game (.89%)

If we take other players into account, then we get the following:
In a 1v1 on Classic, then there is a 1.76% chance of somebody/anybody dropping Australia
In a 3-player game, there is a 2.68% chance of somebody/anybody dropping Australia

I'll try and put these calculations into something user-friendly. I've got it completely figured out for fixed bonuses; but still have a bit of working out to do for build-your-owns ;-)
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby LED ZEPPELINER on Thu May 07, 2009 7:46 pm

:shock: :shock: :shock: :o :o
sailorseal wrote:My big boy banana was out the whole time :D
AndyDufresne wrote:
AndyDufresne wrote:Many Happy Bananas to everyone, lets party...with Bananas.
--Andy
Forever linked at the hip's-banana! (That sounds strange, don't quote me.)
Sergeant LED ZEPPELINER
 
Posts: 1088
Joined: Tue Nov 25, 2008 10:09 pm

Re: Bonus Probabilities

Postby oaktown on Thu May 07, 2009 7:47 pm

For the past hour MrBenn has been schooling me on the mathematics of probability that I should have learned 20 years ago, but you see there was this girl with really long black hair sitting in front of me in math class...

Anyway, the fixed bonuses finally make sense to me. =D>

On flexible bonuses I am close, I think.
Image
User avatar
Captain oaktown
 
Posts: 4451
Joined: Sun Dec 03, 2006 9:24 pm
Location: majorcommand

Re: Bonus Probabilities

Postby Merciless Wong on Fri May 08, 2009 11:18 am

MrBenn wrote:OK, here's the rough guide to bonus probabilities... It helps to think of the map a bit like a pack of cards... the total number of territories on the map represents the size of the deck. The territories a player gets is their hand - the goal is to work out the probabiltity of being dealt a set...

The size of the map / deck: T
The number of players: p
Number of territories in each hand: h

h = Floor(T/p,1) *If p=2, then h = Floor(T/3)

From this we can work out the total number of possible combinations of hands:

Combin(T,h) = T!/h!(T-h)! = Fact(T)/Fact(h)-Fact(T-h)

For Classic, with 2 or 3 players, this gives: Combin(42,14) = 52,860,229,080 possible hands.

Of those hands, how many of them will have the Australia bonus?

The total area of Australia: A
Territories required for bonus: a

There is only one way you can hold all four of the four Australian 'cards': Combin(A, a)= Combin(4,4) = 1
the other 10 cards in your hand can be any of the other 38 terrs: Combin((T-a), (h-a)) = Combin (38, 10) = 472,733,756

Multiplying these together will give the total number of ways you can hold the Australia bonus: 1 x 472,733,756 = 472,733,756

Divide this by the total number of combinations for the hand, and you get: 472,733,756/52,860,229,080 = 0.89%
Combin(A, a) x Combin((T-a), (h-a)) / Combin(T,h)


This is a similar method to that you would use to calculate the probability of getting a full house in a game of Poker. The problems come when you start trying to take into account of the build-your-own bonuses - it's more complicated than I originally thought, and involves Hypergeometric Probabilities rather than Binomials...


I'm not devoting time to checking this but at the very least, you've only done it for one hand or 1 player. Not 2-3 players. Trust me and simulate or approximate. It will hurt less.
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Bonus Probabilities

Postby MrBenn on Fri May 08, 2009 12:24 pm

Here it is then - and it is finally accurate:

MrBenn's Bonus Probability Calculator

A nice extension (which I don't intend to develop in the immediate future) would be something that calculated the probability of dropping ANY bonus, and the average/typical bonus dropped.

Happy calculating ;-)
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby AndyDufresne on Fri May 08, 2009 12:38 pm

It's colorful, like a rainbow. I like rainbows, and ducks, and daisies. Oh, look I see a butterfly.

**Wanders off like a monkey without an understanding of math.**

Good work, though, I think, maybe? :)


--Andy
User avatar
Corporal 1st Class AndyDufresne
 
Posts: 24919
Joined: Fri Mar 03, 2006 8:22 pm
Location: A Banana Palm in Zihuatanejo

Re: Bonus Probabilities

Postby Merciless Wong on Fri May 08, 2009 12:40 pm

Nice.

-Note that you aren't doing compounding. The second bonus is identical to the first.

-Rounding of number of tertis is also an approximation.

But it should be close enough for discussion.

This stuff should be used for benchmarking anyway. E.g. the chance is less than or more than an Australia start in classic risk using the same model
Sergeant 1st Class Merciless Wong
 
Posts: 199
Joined: Wed Feb 06, 2008 8:12 pm

Re: Bonus Probabilities

Postby MrBenn on Fri May 08, 2009 1:12 pm

MrBenn wrote:A nice extension (which I don't intend to develop in the immediate future) would be something that calculated the probability of dropping ANY bonus, and the average/typical bonus dropped.

Merciless Wong wrote:-Note that you aren't doing compounding. The second bonus is identical to the first.

You're right. Each of the probabilities is independent. It got too complicated with the number of permutations with the build-your owns.
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: Bonus Probabilities

Postby MrBenn on Sun Jan 23, 2011 4:14 am

Subject: Re: Thyseneal: V 3.6 with XML v1.3 [Gp][Gr][Xml] [Beta]

MrBenn wrote:
MrBenn wrote:I've updated my Bonus Probabilities Spreadsheet to account for starting positions, but am having trouble uploading it anywhere :-k

Got it.... http://www.fileden.com/files/2009/1/9/2259283//BonusProbability2.xls

Play around with the bonus spreadsheet a bitand see if there is some combination of neutral starts, or larger starting position groups that help. It might be that by ADDING terrs to the starting group, you can increase the number of dropped territories to 19 or 20 for 1v1 games (which is better than 18)
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
Lieutenant MrBenn
 
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Next

Return to Tools & Guides

Who is online

Users browsing this forum: No registered users