Conquer Club

Greasemonkey Script Assault Odds

Archival storage to keep things organized and uncluttered. Can't find what you need? Search for old topics here.

Moderator: Tech Team

Forum rules
Please read the Community Guidelines before posting.

Re: NEW: Assault Odds

Postby The Fuzzy Pengui on Fri Apr 10, 2009 7:24 pm

Timminz wrote: Combined odds would be cool

Definitely! The only thing better than combined odds would be having two columns; one for separate odds for that attack, and one for combined odds. :)
Gilligan wrote:I'M SO GOOD AT THIS GAME
My stepmom locked the bathroom door
So I opened the lock with my shoelace
User avatar
Corporal 1st Class The Fuzzy Pengui
 
Posts: 2271
Joined: Mon Nov 27, 2006 6:52 pm
Location: Ohio

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 10, 2009 7:29 pm

The Fuzzy Pengui wrote:
Timminz wrote: Combined odds would be cool

Definitely! The only thing better than combined odds would be having two columns; one for separate odds for that attack, and one for combined odds. :)

I was thinking, one column for each individual front, with a total combined odds below the last line.
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: NEW: Assault Odds

Postby The Fuzzy Pengui on Fri Apr 10, 2009 7:32 pm

Timminz wrote:I was thinking, one column for each individual front, with a total combined odds below the last line.

I had thought about that way first, but then I realized if it was two columns there could be "progressive" combined odds (which would be really cool!).
Gilligan wrote:I'M SO GOOD AT THIS GAME
My stepmom locked the bathroom door
So I opened the lock with my shoelace
User avatar
Corporal 1st Class The Fuzzy Pengui
 
Posts: 2271
Joined: Mon Nov 27, 2006 6:52 pm
Location: Ohio

Re: NEW: Assault Odds

Postby chipv on Fri Apr 10, 2009 7:37 pm

Can do either - progressive or separate+combined total. Subtlely different.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 10, 2009 7:40 pm

As long as the total is there, it's all gravy. Total, and each line.
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: NEW: Assault Odds

Postby chipv on Fri Apr 10, 2009 8:29 pm

Ok, click on Latest version installed to get new version.

You can add as many quick calcs as you like and the total is the product of all the calcs.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby chipv on Fri Apr 10, 2009 9:19 pm

I've added 2 tips to the head post.

  • Do the biggest calculation first. This saves the calcs and will make subsequent calcs practically instantaneous.
  • Do a big calc just before you take your turn. Then you can calc as you go at speed without waiting for calcs.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 10, 2009 9:21 pm

Using it in a speed game. It seems to be working wonderfully.
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: NEW: Assault Odds

Postby prismsaber on Sat Apr 11, 2009 12:03 am

chip,

can't believe you and foxy decided to post this for public use. This is a weapon that could make every cook and striper who doesn't know what they're doing dangerous.
Colonel prismsaber
 
Posts: 370
Joined: Wed Nov 21, 2007 8:24 pm
Location: Illinois

Re: NEW: Assault Odds

Postby chipv on Sat Apr 11, 2009 5:24 am

prismsaber wrote:chip,

can't believe you and foxy decided to post this for public use. This is a weapon that could make every cook and striper who doesn't know what they're doing dangerous.


Don't blame Foxy for having an awesome idea. I wrote this script and informed her I was publishing it, decision was mine, idea was hers,so you can blame me.

What do you want me to do, render the script useless?
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby ahunda on Sat Apr 11, 2009 10:37 am

Very nice. :)

Referring to our little chat on Messenger last night:

IĀ“d still like the order of terrs in the 1st drop-down window to be changed to alphabetical order.

Or maybe even better: All my terrs on top (in alphabetical order), then the rest of the terrs (in alphabetical order) ?
Field Marshal ahunda
 
Posts: 411
Joined: Fri Apr 13, 2007 9:52 am

Re: NEW: Assault Odds

Postby cicero on Sat Apr 11, 2009 3:15 pm

chipv wrote:
prismsaber wrote:chip,

can't believe you and foxy decided to post this for public use. This is a weapon that could make every cook and striper who doesn't know what they're doing dangerous.


Don't blame Foxy for having an awesome idea. I wrote this script and informed her I was publishing it, decision was mine, idea was hers,so you can blame me.

What do you want me to do, render the script useless?
In the hands of anyone who "doesn't know what they're doing" I'm guessing they are likely to continue being most dangerous to themselves :)
User avatar
Sergeant cicero
 
Posts: 1358
Joined: Wed Mar 07, 2007 1:51 pm
Location: with the infected neutrals ... handing out maps to help them find their way to CC

Re: NEW: Assault Odds

Postby chipv on Sat Apr 11, 2009 3:55 pm

ahunda wrote:Very nice. :)

Referring to our little chat on Messenger last night:

IĀ“d still like the order of terrs in the 1st drop-down window to be changed to alphabetical order.

Or maybe even better: All my terrs on top (in alphabetical order), then the rest of the terrs (in alphabetical order) ?


Ok, well it's alphabetical now, click on Latest version installed.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby cicero on Sun Apr 12, 2009 3:38 pm

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.]

Cicero
User avatar
Sergeant cicero
 
Posts: 1358
Joined: Wed Mar 07, 2007 1:51 pm
Location: with the infected neutrals ... handing out maps to help them find their way to CC

Re: NEW: Assault Odds

Postby chipv on Sun Apr 12, 2009 3:57 pm

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 I
don't want to load the overall calculation as it's fast and needs to be.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby guylian on Sun Apr 12, 2009 4:35 pm

I have to say, I LOVE THIS ADD-ON, amazing work just used it to make a kill run in an 8 player esc game. now i never need to be undecided on order or path of kills again.


thankyou chipv. my new favourite add-on right here 8-)
Image
User avatar
Major guylian
 
Posts: 93
Joined: Thu Mar 27, 2008 12:59 pm

Re: NEW: Assault Odds

Postby cicero on Mon Apr 13, 2009 4:04 am

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

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 I
don't want to load the overall calculation as it's fast and needs to be.
Sounds promising. I'm already looking forward to an update :)
User avatar
Sergeant cicero
 
Posts: 1358
Joined: Wed Mar 07, 2007 1:51 pm
Location: with the infected neutrals ... handing out maps to help them find their way to CC

Re: NEW: Assault Odds

Postby BaldAdonis on Mon Apr 13, 2009 4:28 am

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).
User avatar
Captain BaldAdonis
 
Posts: 2334
Joined: Fri Aug 24, 2007 1:57 am
Location: Trapped in Pleasantville with Toby McGuire

Re: NEW: Assault Odds

Postby ODWO on Mon Apr 13, 2009 4:50 pm

(note to self: mark this)
User avatar
Major ODWO
 
Posts: 285
Joined: Sat Jan 17, 2009 10:25 am

Re: NEW: Assault Odds

Postby chipv on Mon Apr 13, 2009 10:37 pm

BaldAdonis wrote:
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.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby BaldAdonis on Tue Apr 14, 2009 6:42 am

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.
User avatar
Captain BaldAdonis
 
Posts: 2334
Joined: Fri Aug 24, 2007 1:57 am
Location: Trapped in Pleasantville with Toby McGuire

Re: NEW: Assault Odds

Postby chipv on Tue Apr 14, 2009 11:36 am

Great suggestion , will be done.

I will allow Attackers to have multiple numbers so for your example

6,6 v 15
15 v 10

and you can tinker with that.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Tue Apr 14, 2009 1:16 pm

chipv wrote:Great suggestion , will be done.

I will allow Attackers to have multiple numbers so for your example

6,6 v 15
15 v 10

and you can tinker with that.

That's awesome! As for the bombardment, would it be possible to use a number in brackets (or something similar), on the quick calc section, and just not reduce the attacking force for a win?

ex: 15 v 2,4,(3), 10
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: NEW: Assault Odds

Postby yeti_c on Tue Apr 14, 2009 2:19 pm

I love it - Bombardments don't need to be the end of a run though...

C.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: NEW: Assault Odds

Postby chipv on Fri Apr 17, 2009 2:52 pm

yeti_c wrote:I love it - Bombardments don't need to be the end of a run though...

C.


It is not possible to continue a sequence of attacks from a bombarded territory.
That's the reason for the current limitation.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

PreviousNext

Return to Tool Archives

Who is online

Users browsing this forum: No registered users

cron