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 chipv on Fri Apr 17, 2009 2:53 pm

Timminz wrote:
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


Give me some more, Timminz, I don't get what you mean.
So (3) is bombard, and don't reduce attacking force by one?
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby MrBenn on Fri Apr 17, 2009 3:59 pm

You wouldn;t be able to continue to attack from the bombarded territory, but you could choose another target from the 'bombardee'
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: NEW: Assault Odds

Postby chipv on Fri Apr 17, 2009 5:05 pm

MrBenn wrote:You wouldn;t be able to continue to attack from the bombarded territory, but you could choose another target from the 'bombardee'


If you mean bombarder then yes this is open and has been suggested before.
This is not a function of bombardment but allowing split attack paths (so doesn't necessarily have to have bombardment)

For emphasis, this is the not the same as 2 separate paths.

Key problem is how to specify this. Same problem for multiple attackers. Still pondering.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 17, 2009 6:35 pm

Perhaps I'm a bit confused, as I have done any coding in a while, but wouldn't adding bombardment into the quick calc be fairly simple? I assume, when you've conquered a territory in the current quick calc, you would count the attacking force as decreasing by 1 (left behind), and continue to the next territory to attack in the sequence. Wouldn't it just be a matter of being able to distinguish between an attack/bombard (why I recommended using brackets), and not decreasing the force by 1 on the bombard, since you don't need to leave any behind? With my previous example.
Timminz wrote:ex: 15 v 2,4,(3), 10

starting with an stack of 15, I wish to attack a territory with 2, then one with 4, then bombard a spot with 3, and finally attack a 10.
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 17, 2009 6:56 pm

Timminz wrote:Perhaps I'm a bit confused, as I have done any coding in a while, but wouldn't adding bombardment into the quick calc be fairly simple? I assume, when you've conquered a territory in the current quick calc, you would count the attacking force as decreasing by 1 (left behind), and continue to the next territory to attack in the sequence. Wouldn't it just be a matter of being able to distinguish between an attack/bombard (why I recommended using brackets), and not decreasing the force by 1 on the bombard, since you don't need to leave any behind? With my previous example.
Timminz wrote:ex: 15 v 2,4,(3), 10

starting with an stack of 15, I wish to attack a territory with 2, then one with 4, then bombard a spot with 3, and finally attack a 10.


chipv wrote:So (3) is bombard, and don't reduce attacking force by one?


No coding problem. Just how to allow user to specify no advance. As I said this is not confined to just bombardment.
The difference with bombardment is zero advance whereas attack and no advance is 1 advance but continue on another sequence.
Currently only attack and all advance -1 can be done.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 17, 2009 7:01 pm

chipv wrote:No coding problem. Just how to allow user to specify no advance. As I said this is not confined to just bombardment.
The difference with bombardment is zero advance whereas attack and no advance is 1 advance but continue on another sequence.
Currently only attack and all advance -1 can be done.

On the quick calc? I can see how that happens in the attack-route drop-downs, but with the quick one, it doesn't matter if I advance all and leave one behind, or advance zero (1 automatically), and then attack somewhere else from the first terit. All that would be needed is the ability to distinguish between having to populate the new terit or not, wouldn't it?
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 17, 2009 7:09 pm

Timminz wrote:
chipv wrote:No coding problem. Just how to allow user to specify no advance. As I said this is not confined to just bombardment.
The difference with bombardment is zero advance whereas attack and no advance is 1 advance but continue on another sequence.
Currently only attack and all advance -1 can be done.

On the quick calc? I can see how that happens in the attack-route drop-downs, but with the quick one, it doesn't matter if I advance all and leave one behind, or advance zero (1 automatically), and then attack somewhere else from the first terit. All that would be needed is the ability to distinguish between having to populate the new terit or not, wouldn't it?


The probabilities are different, so I need to be able to distinguish by looking at what the user has specified.
Using a bracket for non-advancement after bombard is fine.
What happens when someone asks for the same feature with regular attacks? I need to distinguish between bombardment non-advance
and regular attack non-advance because the number of armies being left behind are different and so are the probabilities.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 17, 2009 7:15 pm

chipv wrote:The probabilities are different, so I need to be able to distinguish by looking at what the user has specified.
Using a bracket for non-advancement after bombard is fine.
What happens when someone asks for the same feature with regular attacks? I need to distinguish between bombardment non-advance and regular attack non-advance because the number of armies being left behind are different and so are the probabilities.


The only 2 options I see, when looking at continuing the attack path with as many armies as possible are;
1- advance all/none (these are the same thing, if you're going to continue the attack from wherever the stack is)
2- bombard
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 17, 2009 7:23 pm

Timminz wrote:
chipv wrote:The probabilities are different, so I need to be able to distinguish by looking at what the user has specified.
Using a bracket for non-advancement after bombard is fine.
What happens when someone asks for the same feature with regular attacks? I need to distinguish between bombardment non-advance and regular attack non-advance because the number of armies being left behind are different and so are the probabilities.


The only 2 options I see, when looking at continuing the attack path with as many armies as possible are;
1- advance all/none (these are the same thing, if you're going to continue the attack from wherever the stack is)
2- bombard


This is true, I agree with this, very well explained.
Bombard with brackets will be added.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Fri Apr 17, 2009 8:29 pm

chipv wrote:Bombard with brackets will be added.

Sweet!
User avatar
Captain Timminz
 
Posts: 5579
Joined: Tue Feb 27, 2007 1:05 pm
Location: At the store

Re: NEW: Assault Odds

Postby AndrewB on Fri Apr 17, 2009 11:48 pm

Great job, chip,

You continue to amaze us all,

When we thought we had everything possible!
Image
User avatar
Lieutenant AndrewB
 
Posts: 1814
Joined: Mon Jun 12, 2006 5:02 pm
Location: Edmonton, Canada, MST

Re: NEW: Assault Odds

Postby chipv on Sun Apr 19, 2009 6:43 pm

BaldAdonis wrote: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.


Ok code is done but not published yet because I want to discuss whether this is going to be suitable for everyone:

In the quick calcs you will be able to specify multiple attackers.
They will all start attacking the first defending territory in the order that you specify.
No other assumptions are made so the odds are the overall odds of victory over the defence.
That means the possibility of the first army advancing is taken into account.

For example

Attack 4,6 vs 3,2 = 72%
Attack 6,4 vs 3,2 = 75%

The odds are slightly different because you've started attacking with a different territory.

I would rather not introduce assumptions of how you would actually attack, people should work this out on their own, I think.

Comments welcome.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby BaldAdonis on Mon Apr 20, 2009 11:27 am

As far as I can imagine, the odds on a long string of attacks are the same as long as the last few territories are the same. That is, permutations of the first few territories don't make a difference, so attacks like 20v1,1,1,6,1,1,1 should be the same as 20v6,1,1,1,1,1,1. That'll mean that no matter where the big stack is, I should be able to place it first in line on defense, then place my smaller attackers before the large force and have it all work out the same.

This solution you've got is perfect.

In this case
Attack 4,6 vs 3,2 = 72%
Attack 6,4 vs 3,2 = 75%
The odds in the first one include a win 4v3, so that the next attack will be 3v2, which is poor, hence worse odds. I don't think anyone is silly enough to make the mistake of auto-attacking with the small force, so this should be fine. If the force is small enough, the chance of victory is negligible and you can place it first. If it isn't, hmmm.... when the numbers are small I can't intuitively tell what the best attacks are. Let me get back to this.
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 Mon Apr 20, 2009 11:47 am

Ok, thanks for feedback. Maybe I just publish and let people play with the numbers.

The algorithm is as described above, I think the odds presented should be overall odds rather than second guessing method of attack
which might well vary from player to player. I'll wait for feedback from you or if you think it would help, publish and let you have a proper play with numbers.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby BaldAdonis on Mon Apr 20, 2009 2:47 pm

I agree they should be overall odds. As long as they players know what it means when they imput certain strings, they should be able to tailor their plan of attack accordingly. Publish what you've got now, I'm going to play around with some small numbers and compare what I get with what you get. Large numbers should be fine anytime, it's just the cases where the smaller force could conceivably win that might be strange. In any event, the odds would be better than expected, so it shouldn't bother many people if they do it the wrong way.
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 Mon Apr 20, 2009 2:55 pm

BaldAdonis wrote:I agree they should be overall odds. As long as they players know what it means when they imput certain strings, they should be able to tailor their plan of attack accordingly. Publish what you've got now, I'm going to play around with some small numbers and compare what I get with what you get. Large numbers should be fine anytime, it's just the cases where the smaller force could conceivably win that might be strange. In any event, the odds would be better than expected, so it shouldn't bother many people if they do it the wrong way.


Published. Click on Latest Version Installed to get this new version.

I will be doing version control after adding bombards in quick calc and stats by survivors.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Mon Apr 20, 2009 4:09 pm

Could you add a "Remove Calc" button, next to the "Add Calc"?
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 Mon Apr 20, 2009 4:10 pm

Timminz wrote:Could you add a "Remove Calc" button, next to the "Add Calc"?


I suppose so. Or refresh and start again?
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Mon Apr 20, 2009 4:25 pm

chipv wrote:
Timminz wrote:Could you add a "Remove Calc" button, next to the "Add Calc"?


I suppose so. Or refresh and start again?

F5 does that. Sometimes I add one more calc than I need, and having to start from scratch can be quite time consuming.

Also, I would like if whenever I clicked "Odds" on any of the quick calc lines, it refreshed all lines of the quick calcs, and total odds. Possibly just make one "odds" button, that refreshed all lines.
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 Mon Apr 20, 2009 4:32 pm

Timminz wrote:Could you add a "Remove Calc" button, next to the "Add Calc"?
Sometimes I add one more calc than I need, and having to start from scratch can be quite time consuming.


Ok.
Timminz wrote:Also, I would like if whenever I clicked "Odds" on any of the quick calc lines, it refreshed all lines of the quick calcs, and total odds. Possibly just make one "odds" button, that refreshed all lines.


They already do! If you click on any Odds it refreshes its line and also the total. They are separate odds and the total is the product.

I think you may be asking for cumulative odds again which I thought we decided against.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby Timminz on Mon Apr 20, 2009 6:41 pm

chipv wrote:I think you may be asking for cumulative odds again which I thought we decided against.

no, I mean, so that when I adjust my fronts (put 2 less here, and 2 more there), I don't have to click "odds" for both rows.
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 Mon Apr 20, 2009 6:52 pm

Timminz wrote:
chipv wrote:I think you may be asking for cumulative odds again which I thought we decided against.

no, I mean, so that when I adjust my fronts (put 2 less here, and 2 more there), I don't have to click "odds" for both rows.


Ah, I see, ok easy enough and a better idea than what is present, too, so will be done.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby chipv on Thu Apr 23, 2009 12:49 pm

Version 1.0.1 is available - click on Latest Version Installed.

This version will auto check for new version available, so you need this one to alert you of future versions.

Multiple Attackers and Statistics have been added (see head post for details).

What is to be done:

I'm thinking about creating statistics for quick calc combinations (not sure if necessary).
At present Statistics will show results from last individual calc which is why individual buttons are still there.
Remove calc
Bombards (sorry, stats was more important)
Possibly defender stats under a separate option.

Let me know if there is anything else on the to do list.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby chipv on Thu Apr 23, 2009 3:10 pm

Just thinking once people are up to v 1.0.1 then I can do version updates so get upgrading then things will get easier.
User avatar
Captain chipv
 
Posts: 2750
Joined: Mon Apr 28, 2008 5:30 pm

Re: NEW: Assault Odds

Postby chipv on Sat Apr 25, 2009 7:19 am

New version uploaded but still 1.0.1 because it's a bug fix. Click on latest Version Installed.

There was a problem with statistics for multiple defenders - this has been corrected now.

Just FYI at the moment you will only see surviving attacking statistics for successful assaults.

That means for example 6 v 1,2 will only show surviving numbers 3 and greater because it is
impossible to have a successful assault on 2 territories and have less than 3 armies remaining.

This is mostly for speed reasons, the algorithm even with statistics turned on is still very quick
and also makes re-use of old calcs.

There would be a speed hit (not that much as it would also re-use old calcs) if I allowed losing attacking survivors
and defenders statistics but I have a feeling I will have to do this anyway, the question is whether or not to include
by default or have an option for defender stats.
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