Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Library of Enlightenment > Thread: Spell probabilities by town type
Thread: Spell probabilities by town type This thread is 6 pages long: 1 2 3 4 5 6 · NEXT»
Ecoris
Ecoris


Promising
Supreme Hero
posted May 13, 2006 01:06 PM
Edited by Ecoris at 16:15, 18 May 2006.

Spell probabilities by town type

I was searching the forums for information about spell probabilities by town type. e.g. if I'm playing Inferno what is the chance that I will get armageddon in my mage guild?
I found a link to a page with a list of these probabilities: spell probabilities.
However this was not exactly what I wanted. The table contains probabilities per spell slot in the mage guild: Magic Arrow has a probability of appearing of 30% for each slot. But this is somewhat useless information. The question we want the answer to is: What is the chance that it will appear in one of them?

Since the same spell can't appear twice in a mage guild the answer is not just 1 - 0.7^5 (1 minus the chance that it won't appear): Assume that View Air is selected as the first spell. It won't be selected again so the probability that Magic Arrow is selected as the second one increases. It is actually 0.30/(1-0.03) = 31%. If it is not selected as the second one the probability will increase again. But how much it increases depends on the already selected spells which makes the problem quite difficult. There is just no simple formula for calculating these probabilities. In fact, we have to try every ordered combination of spells for each level. i.e. the probability that we receive the spells (Magic Arrow, Slow, Dispel, Cure, Shield) is not the same as the probability that we receive (Slow, Magic Arrow, Dispel, Shield, Cure).

Computing these probabilities in hand would be extremely time consuming so I wrote a few Java classes to do the job.

But let me skip the rest of the math before this post becomes too long. If anyone is interested in the details or want to see the code I used I can post it.

The results are (hopefully) displayed below.

EDIT: 18. May 2006.
Tables have been updated and removed. They are displayed later in this thread.



High values (above 0,50 = 50% have been colored green). Spells that can't appear are colored red.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
maretti
maretti


Responsible
Supreme Hero
posted May 15, 2006 03:14 PM

Very usefull info. Nice work.
____________
Crag rules, Orrin and Ivor suck

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 15, 2006 03:19 PM

Thank you. If anyone have probabilities like the ones from spell probabilities from gamespot for Conflux I can easily do the calculation for that town type as well.
I guess I'll do Tower with Library soon.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
sick_46_boy
sick_46_boy


Known Hero
*Lord of the bones*
posted May 15, 2006 03:26 PM

I am interested how u calculate all of theat
____________
Once I used to be what you are now! And you will become what I am!"

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 15, 2006 03:42 PM

Calculation

Basically: Try every ordered combination of spells at the current level  for each town type and calculate its probability. Then for each spell add the probabilities of all combinations that include the given spell.

E.g at level 1: (View Air, Magic Arrow, Slow, Dispel, Cure) is not the same as (Magic Arrow, View Air, Slow, Cure, Dispel). The probabilities are not the same but both of them contribute to the total probabilty of each of the 5 mentioned spells.
Example: Magic Arrow has a 30% chance to show up as the first spell. Then we have to select the second one. But since we can't pick Magic Arrow the other spells probabilities increase. The probbility of View Air is now  3% / (1 - 0.30) = 4.29 %. Suppose View Air is selected. The probability that Slow is selected next is then (depending on town type) 10% / (1 - 0.30 - 0.03) = 14.92% or 5% / (1 - 0.30 - 0.03) = 7,46% since neither Magic Arrow nor View Air can be chosen now. And so on.

Notice that Magic Arrow is less probable to show up in dungeon towns even though the basic probability is the same for all town types (30%). This is because Dungoen is the only town type that may receive any first level spell.
But let me known if you want the code.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted May 16, 2006 09:47 PM

Here's Conflux.

Level 1
Bless 5
Bloodlust 5
Cure 5
Curse 0
Dispel 10
Haste 10
Magic Arrow 30
Prot Fire 3
Prot Water 3
Shield 5
Slow 10
Stone Skin 5
Summon Boat 3
View Air 3
View Earth 3

Level 2
Blind 8
Death Ripple 0
Disguise 2
Disrupt Ray 8
Fire Wall 8
Fortune 2
Ice Bolt 25
Lightning Bolt 25
Precision 2
Prot Air 2
Quicksand 4
Remove Obstacle 4
Scuttle Boat 4
Visions 2
Weakness 4

Level 3
Air Shield 4
Animate Dead 0
Anti-Magic 12
Destroy Undead 4
Earthquake 4
Fireball 12
Force Field 8
Forgetfulness 8
Frost Ring 12
Hypnotize 12
Land Mine 4
Mirth 4
Misfortune 4
Prot Earth 4
Teleport 8

Level 4
Armageddon 0
Berserk 5
Chain 10
Clone 10
Counterstrike 5
Fire Shield 5
Frenzy 5
Inferno 10
Meteor 10
Prayer 5
Resurrection 5
Slayer 5
Sorrow 5
Town Portal 10
Water Walk 10

Level 5
Air Elemental 12
Dimension Door 13
Earth Elemental 12
Fire Elemental 12
Fly 13
Implosion 13
Magic Mirror 13
Sacrifice 0
Water Elemental 12
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 16, 2006 09:58 PM

Quote:
Here's Conflux.

@ Binabik
Where did you got those numbers?
Anyway, thanks. Now I can finish the job. I'll post tables for conflux and Tower with Library soon.

BTW am I the only one who experienced troubles with that image server today (imgmonkey.com)?
Perhaps I should use another one. Any recommendations?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted May 16, 2006 10:09 PM

The numbers came from game data so they are accurate. But like the skills probabilities, there may be other factors involved.

Your images were still working about an hour ago, so the problem is recent.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
angelito
angelito


Honorable
Undefeatable Hero
proud father of a princess
posted May 16, 2006 10:12 PM

Quote:
....BTW am I the only one who experienced troubles with that image server today (imgmonkey.com)?
Perhaps I should use another one. Any recommendations?

Try imageshack.us ...works fine for me..
____________
Better judged by 12 than carried by 6.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 16, 2006 10:20 PM

They might be experiencing technical difficulties, I can't evet open www.imgmonkey.com . Well, lets see if it gets any better.
Quote:
But like the skills probabilities, there may be other factors involved.

Like the magic skill at level 4 and wisdom at level 6 (if not before)?
Of course I've made some (realistic) assumptions but the only way to verify the probabilties is a brute force test. I actually noted the number of appearances of all spells in 50 Inferno towns before doing the calculation. The expected appearances lie very close to the number of observed in most cases. I guess a lot more than 50 samples are needed to reduce the probability of high deviation (because of the high number of spells)...
Currently I'm not bored enough to do this

I'll move the pics to imageshack.us if the monkey remains dead.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted May 17, 2006 11:25 AM
Edited by dimis at 11:41, 17 May 2006.

Interesting work Ecoris! Can you upload source code as well?
Thank you in advance.

@Xarfax: If you have some data, please share! Even on Volcanic Wastelands! That way you won't post permanently here in Library, as you wish ...
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 17, 2006 11:44 AM

Quote:
Interesting work Ecoris! Can you upload source code as well?
Yes, but it's rather long, and it would look quite awful because the spacing is removed. I can send you a mail with the source code attached. I don't know of any server where I could upload it an make it available, does anyone?

I haven't done Conflux and Tower with library yet, but it can be done quite easily now.

Should I send you the source code now or when I've done the rest?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted May 17, 2006 11:54 AM
Edited by dimis at 11:58, 17 May 2006.

Quote:
I haven't done Conflux and Tower with library yet, but it can be done quite easily now.

Should I send you the source code now or when I've done the rest?

When you 've done the rest, send them via e-mail. Use my link below to send me an e-mail.
As a temporary solution I can upload it for you on an account I have if you want; I don't know though a place where you can freely do that.

If you want anything else, feel free to use HC-Messenger to contact me so that we don't spam your thread.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 17, 2006 11:58 AM

Very well then. I'm having an exam later today and as you may know the Champions League final is played today so i guess I'll do the rest tomorrow morning. ( It's 11:57 AM here).

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
angelito
angelito


Honorable
Undefeatable Hero
proud father of a princess
posted May 17, 2006 12:46 PM

@Binabik

Maybe itīs just me, but arenīt these numbers (percentages) u posted about the spells in the Conflux town a bit missleading?

What does the "3" behind "view air" tell me?
- 3% chance to get view air in first slot of level 1?
- 3% chance to get view air as level 1 spell in any slot? (doubtful)

Or is my interpretation just wrong?
____________
Better judged by 12 than carried by 6.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 18, 2006 11:43 AM

Quote:
@Binabik

Maybe itīs just me, but arenīt these numbers (percentages) u posted about the spells in the Conflux town a bit missleading?

What does the "3" behind "view air" tell me?
- 3% chance to get view air in first slot of level 1?
- 3% chance to get view air as level 1 spell in any slot? (doubtful)

Or is my interpretation just wrong?

Yes, you have a 3% chance to get view air in first slot of level 1. These are the same numbers that I have used for the tables. The tricky part begins when you have to select a spell for the second/third/../ slot. But I have alreaady described this earlier; how to calculate the total probability.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 18, 2006 04:13 PM bonus applied.
Edited by angelito at 19:07, 12 Oct 2006.

Updated

I've done Conflux and Tower with Library now. I'll remove the old tables.





Hope that they'll prove to be helpful.





Edit by angelito
Very good work here. Sorry for the late reward. Well earned +qp!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted May 18, 2006 07:38 PM

a comment

I think it would be nicer if you place both columns regarding Tower, one with Library and one without Library. I don't think there will be misinterpretations.

Thanks again for your work.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
classic
classic


Hired Hero
Paladin
posted May 18, 2006 07:40 PM

there is no Armagedon spell????
damn

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Ecoris
Ecoris


Promising
Supreme Hero
posted May 18, 2006 07:46 PM
Edited by Ecoris at 19:50, 18 May 2006.

@ dimis
ok, I'll do that. But I don't think Tower should count twice in the TOTAL column at the rigth. It'll only require a little copy-pasting.

@ classic
Yes there is an armageddon spell, it's a level 4 spell. However, only the 'evil' towns may get it. It's so pwerful with a conflux army.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 6 pages long: 1 2 3 4 5 6 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0543 seconds