Great new script chip! I find it really appealing. My first thoughts are all re the Pathfinder section since it's the most exciting part and so I've not played with the Quick Calc. [And Statistics is TBD - "to be developed" ?]

These are just me thinking aloud. No overt negative criticism is intended and I'm guessing you 'know' most/all of this already ...

I find the Odds values hard to relate to ... First of all because the values (between 0 and 1) are 'probabilities' not 'odds' ... which is strange given that the script is called "Assault Odds". A probabiltiy of '0.25' is equivalent to odds of '4 to 1 against' ... a probabity of 0.50 is 'evens' [or '1 to 1' I guess ?] ... But I digress ...

Pure vocabulary aside perhaps a probabilty isn't the best way to express the situation anyway. Instead of 0.05 we could have 'odds' ie '20 to 1' or alternatively perhaps a percentage '5%' ... Either of these might be more easy to relate to for the masses? '100%' means it's definitely going to happen [we'd never need that here at CC of course ] and '0%' means it cannot happen. I think I'd find either of these options easier to 'get a handle on' than the current raw decimal probabilty.

And talking of which - if no alternative presentation is decided upon as outlined above - is there any (user) need to display 17 significant digits of accuracy?

Finally, how about an additional column - using the one already produced, but empty above the 'refresh' button would be perfect - that displays the number of armies remaining (based on probabilty) after each attack in the sequence. [If it's not clear what I mean here let me know and I'll elaborate.]

Thanks for the comments... ahem... but I have to point out there is already a format option to show percentages.

Look in the left menu on the game page for Assault Odds and choose percentage format.

About your second suggestion, I am currently bashing my head doing that, as I did with the improved calculation.Most of the problem stems around releasing load on the browser, the maths is reasonably straightforward.

I will come up with something, but at the moment it may require an additional button to produce the extra stats as Idon't want to load the overall calculation as it's fast and needs to be.

chipv wrote:I have to point out there is already a format option to show percentages.

Aha. "Noted"

Strange that percentages go for one decimal place of accuracy where the decimal option goes for 16 ... Seems a bit extreme?In particular this means that if I attack say 10 against 1 I'm advised that the odds of a successful attack are 100% (ie certain) which is patently not the case ... Whilst I'm all for reducing the number of decimal places perhaps 2 places would give a little more definition? In the case of my example this would then display 99.99% however 20 against 1 would still be rounded to 100%. In such a case perhaps the percentage should be preceded by a less than sign "<" or the word "almost" to make it clear that the outcome is still not a certainty?

chipv wrote:About your second suggestion, I am currently bashing my head doing that, as I did with the improved calculation.Most of the problem stems around releasing load on the browser, the maths is reasonably straightforward.

I will come up with something, but at the moment it may require an additional button to produce the extra stats as Idon't want to load the overall calculation as it's fast and needs to be.

It has been deliberately designed to be faster than other similar calculators and it will also handle larger numbers of armies.

How do you mean? Without parsing your code, I assume it's using the exact same algorithm as Gambit (or at least a very similar one which runs in the same time). Is it just because you drop all the intermediate steps where the attack fails, instead of counting up exactly how close it came to success?

Is there any support for bombardment? This is the only thing that's difficult to estimate with Gambit.

Can you arrange to stop attacks after a certain point? That is, I'd want to know the odds of winning without dropping below 3 armies, as I would with an autoattack. Gambit will tell me this by giving a distribution of the number of surviving armies, but this script just spits out the victory odds.

Can you stage multiple attacks to the same territory? This comes up a lot in team games, and in some smaller multiplayer escalating games, where you'll want to use a smaller force to weaken your opponent, then conquer the territory with your majority. You can get reasonable estimates by adding the smaller force to the larger one (less 3), but this ends up way off when the enemies force is small in comparison to yours, or by counting the attack as two stages, and averaging the number of surviving armies the enemy has after your smaller force attacks (only works in Gambit obviously, because you need to know how many survive).

It has been deliberately designed to be faster than other similar calculators and it will also handle larger numbers of armies.

How do you mean? Without parsing your code, I assume it's using the exact same algorithm as Gambit (or at least a very similar one which runs in the same time). Is it just because you drop all the intermediate steps where the attack fails, instead of counting up exactly how close it came to success?

Incorrect. This is dead easy to see by running both algorithms with the same set of numbers. As the numbers grow larger you can see a visible difference. Gambit also drops intermediate steps where attack fails, any algorithm is worthless unless you do this. The key difference is re-use of previously calculated odds. For example in order to calculate 10v4 you can see that the probability for 2v1 is calculated several times. So by eliminating this repetition, the algorithm is faster. Add to that there are at least 2 ways of recursing the answer (1 from top down and 1 from bottom up). Gambit in addition needs to calculate defensive odds which I don't, which is another saving. That also means I can terminate recursing failed attacks earlier than Gambit.If you do get round to examining the code you will see the algorithms are actually different in lots of ways. There are at least 3 algorithms that can calculate these numbers , all look very different. It is a fact that this algorithm is faster than Gambit, that was the whole point. You can spend your own time measuring this, but examining the code provides a watertight proof.

Is there any support for bombardment? This is the only thing that's difficult to estimate with Gambit.

I have put bombards in the pathfinder. Current support terminates the path after a bombard but I have been asked for a few variants.

Can you arrange to stop attacks after a certain point? That is, I'd want to know the odds of winning without dropping below 3 armies, as I would with an autoattack. Gambit will tell me this by giving a distribution of the number of surviving armies, but this script just spits out the victory odds.

I love the disdainful tone of your references to this script, especially since this is version 1.0.0. I find it unnecessary, especially from you. cicero has asked for this not a couple of posts before. Yes this is possible also.

Can you stage multiple attacks to the same territory? This comes up a lot in team games, and in some smaller multiplayer escalating games, where you'll want to use a smaller force to weaken your opponent, then conquer the territory with your majority. You can get reasonable estimates by adding the smaller force to the larger one (less 3), but this ends up way off when the enemies force is small in comparison to yours, or by counting the attack as two stages, and averaging the number of surviving armies the enemy has after your smaller force attacks (only works in Gambit obviously, because you need to know how many survive).

I cannot tell if you're asking for improvements to this script or attempting to point out where Gambit might be better. Gambit is an excellent algorithm, I have been studying it in depth. Assault Odds is a faster lightweight odds calculator at the moment and is open to genuine requests for improvements. It is supposed be tailored for CC (e.g. Pathfinder) in particular multiple attack paths (read this thread).

Yes it is possible to stage multiple attacks to the same territory and I fail to see any reason to estimate the odds when it is clearly possible to do it exactly.

chipv wrote:I love the disdainful tone of your references to this script, especially since this is version 1.0.0. I find it unnecessary, especially from you....I cannot tell if you're asking for improvements to this script or attempting to point out where Gambit might be better.

Not trying to cause a ruckus, I just know you like tinkering with changes and I figured I'd let you know what I'd find most useful. None of those things I suggested work in Gambit, which is why I'd like to see them in a new script.

chipv wrote:Yes it is possible to stage multiple attacks to the same territory and I fail to see any reason to estimate the odds when it is clearly possible to do it exactly.

What I mean is can it account for the additional attacks from a secondary territory? Suppose I've got two stacks of 6, and I want to kill a guy with 15, who also has 10 on the other side of the board. What I'd like to do is deploy some troops onto one stack of 6, and put the rest on the other side of the board to finish him. So what I need to know is how to distribute those troops so that my odds will be about the same on both sides, but in order to figure that out, I'd want to know how well my 6 stack will do against 15, before I attack with the bigger force. I'd be silly to assume this is a usual attack of Xv15 and Yv10, and place 3-4 extra armies on X when the smaller 6 can do that much damage.