stocksr wrote:andreweberman wrote:how about an odds calculator in the next update?
You mean something like: you set up your attack in the two drop downs and next to the auto attack button appears some text saying
You have a 1 in 200 chance of taking the territory if you auto-attack, and will have on average 5.45 armies leftI like the idea, but I will need some help from the maths bods (tahitiwahini?) could you provide the body for this function
- Code: Select all
function willIWin (attackingWith, attackingAgainst)
{
var n = 1;
var d = 100;
var a = 5.75;
// I Need some maths here
return "You have a " + n + " in " + d + " chance of winning if you auto-attack, and will have on average " + a + " armies left"
}
If we do this it will be in BOB v1.1 not the next release which is BOB v1.0
Some initial thoughts about this:
1) The calculations are accomplished through recursion (I believe) so it's a computationally expensive operation. If you get up in the range of more than 50 armies it becomes a slow operation. I'm not sure it's the sort of thing you want running whenever a user picks a country to attack in a drop down list.
2) The main reason I use the battle odds calculator (Gambit) is to calculate my odds of success for eliminating one of my opponents. That is, I identify an attacking force and then a comma-separated list of the defender's remaining armies. The user interface suggested above wouldn't really support this use.
3) There's no callable interface to either the Gambit or Bartell battle odds calculators, so one would have create a battle odds calculator from scratch. Since I'm basically lazy I'm not sure I'd want to tackle this. If someone wanted to pursue this I could offer some suggestions and ideas on how to go about it. [Basically there are six attacks (3v2, 3v1, 2v2, 2v1, 1v1, 1v2) for which the probabilities are known and it's possible to reduce any attack to a combination of these known attack probabilities.]
4) As an alternative, perhaps you could offer a link to a battle odds calculator on the game page. I would suggest the Gambit one. As a practical matter if I'm going to use Auto-Attack (which I don't by the way) I would be willing to click on the link to the Gambit calculator, enter my armies and the defender's armies and click calculate, before using the Auto-Attack button.
5) Both the Gambit and Bartell calculators are capped at a certain number of armies. Bartell is limited to 50 armies. Not sure what the limit for Gambit is, but it is limited also. There might be a very good reason for these limits as the calculation may take an unacceptably long time if they are exceeded.