WOK4 Online Battle Odds Calculator

Its all WOK here.

Moderators: Duke, trewqh, korexus, Egbert

Post Reply
User avatar
Mullog
Veteran
Veteran
Posts: 330
Joined: Mon Sep 29, 2003 7:00 am
Location: Aalesund, Norway (freezing!). Member of the Vulkings

WOK4 Online Battle Odds Calculator

Post by Mullog » Wed Jan 07, 2004 9:04 pm

Just for fun I have written a new battle odds calculator for WOK4. It will run 5000 battles and report the average results. The number of armies, levels, and so on, you specify.

The calculator can be found on my web server: http://rag.no/wok/AttCalc.php

You are free to use this as much as you want, but please tell me what you think of it!



Mullog
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

User avatar
gm_al
Creator
Creator
Posts: 1479
Joined: Tue Sep 03, 2002 7:00 am
Location: Vienna, Austria

Post by gm_al » Wed Jan 07, 2004 9:15 pm

Alternative link on the WOK server:

http://kaomaris.com/AttCalc.php

Thanx for that great tool, Rune !! A showcase of what KaoBase V2 will be in terms of good work....

User avatar
Polymorphic
Trooper
Trooper
Posts: 159
Joined: Thu Jan 30, 2003 8:00 am
Location: Oxfordish
Contact:

Post by Polymorphic » Thu Jan 08, 2004 11:06 am

And there I was ThinKing this had been done before...

User avatar
Saladin
Moderator
Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands

Post by Saladin » Thu Jan 08, 2004 11:48 am

Yeah Martijn van der Kooij had one in his MKKaoView, but Rune's battle calculator is an online version! :D
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

User avatar
Mullog
Veteran
Veteran
Posts: 330
Joined: Mon Sep 29, 2003 7:00 am
Location: Aalesund, Norway (freezing!). Member of the Vulkings

Post by Mullog » Sat Jan 10, 2004 10:42 pm

Saladin wrote:Yeah Martijn van der Kooij had one in his MKKaoView, but Rune's battle calculator is an online version! :D
I hadn't noticed this version until now, but I must agree that they are remarkably similar! The only one I knew of was the one called Battle Calculator for WOK4 (V2.5). I tried to use it once, but it was so slow that it took several minutes to calculate the results on a fast computer! That was my reason to write my own... I actually wrote two calculators. The first one was in Excel, but then I got the idea that I could write an online version! And here it is...



Mullog
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

User avatar
Saladin
Moderator
Moderator
Posts: 1652
Joined: Tue Sep 03, 2002 7:00 am
Location: The Netherlands

Post by Saladin » Sun Jan 11, 2004 6:47 pm

Mullog wrote:The only one I knew of was the one called Battle Calculator for WOK4 (V2.5). I tried to use it once, but it was so slow that it took several minutes to calculate the results on a fast computer!
Yeah it was pretty crap...but still thumbs up for the effort Craig. :lol:
"Never attribute to malice what can satisfactorily be explained away by stupidity."

"To speak ill of others is a dishonest way of praising ourselves."

User avatar
korexus
Moderator
Moderator
Posts: 2830
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Sun Jan 25, 2004 3:06 pm

The old calculator is slow because it runs in Q-Basic, which is DOS based and windows doesn't like it. :wink: It used to be faster, honest.

I just tried using the online version and spotted a bug. You appear to be rounding the PATT and PDEF to the nearest integer for calculations, wheras WoK 4 uses the smallest integer less than or equal to the power. It doesn't make a huge difference andisn't hard to fix. But i htough you should know... :)


korexus.
With Great Power comes Great Irritability

User avatar
korexus
Moderator
Moderator
Posts: 2830
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Sun Jan 25, 2004 3:19 pm

Two more points:

If both the PATT and PDEF are 0, the manager will set them both to 1 in order to stop a continuous draw. (TK's calculator doesn't do this either but I never could get him to change it...)

And, rather weirdly, when I tried inputting EFFs of 1 for attackers and defenders, they got change to 100 and 99 respectively.

Neither of these points is especially important as they'll only ever come up if both people fighting have EFFs of less than 10. (Even lower if level or defence are good) But if you want everything to be neatened up you may want to check them. :wink:

~korexus. Bug finder extraordinaire!
With Great Power comes Great Irritability

User avatar
Bjorn
Veteran
Veteran
Posts: 414
Joined: Sun Sep 15, 2002 7:00 am
Location: Baltimore, Maryland
Contact:

Post by Bjorn » Sun Jan 25, 2004 4:09 pm

I didn't use the WOK4 calculator much, as it is fairly easy to come up with the expected loss ratio if you know the PATT and PDEF at the start of the battle. Sure, there might be a slight change due to the loss of DEF along the way, but nothing major. Given the chance of a slight rounding error, then if PATT>PDEF, then the expected loss ratio is ((PATT/PDEF)-.55)/.45). The loss ratio is number of expected defender losses for each attacker lost.

If PDEF is greater then just swap PATT and PDEF in the equation and the result is the expected number of attackers lost for each defender.

Still waiting for the WOK5 battle calculator. Now THERE is something useful.
"We do not stop playing because we grow old, we grow old because we stop playing" - Oliver Wendell Holmes

User avatar
Brykovian
Moderator
Moderator
Posts: 1045
Joined: Tue Sep 03, 2002 7:00 am
Location: Minneapolis, MN USA ... Clan: Scholars
Contact:

Post by Brykovian » Sun Jan 25, 2004 5:32 pm

Bjorn wrote:Still waiting for the WOK5 battle calculator. Now THERE is something useful.
Yeah -- something like that would be *amazing*! ;)

-Bryk
Matt Worden Games ... Gem Raider, DareBase, Castle Danger, Keeps & Moats Chess

User avatar
Polymorphic
Trooper
Trooper
Posts: 159
Joined: Thu Jan 30, 2003 8:00 am
Location: Oxfordish
Contact:

Post by Polymorphic » Sun Jan 25, 2004 7:36 pm

Brykovian wrote:
Bjorn wrote:Still waiting for the WOK5 battle calculator. Now THERE is something useful.
Yeah -- something like that would be *amazing*! ;)

-Bryk
Just give me until I've learnt the WOK5 rules then :)

User avatar
Mullog
Veteran
Veteran
Posts: 330
Joined: Mon Sep 29, 2003 7:00 am
Location: Aalesund, Norway (freezing!). Member of the Vulkings

Post by Mullog » Mon Jan 26, 2004 7:50 pm

Ah! Bugs!

They will always be there. But I will try to fix them. :)

I am sure a WOK5 calculator would be useful, but there wont be one unless I have a WOK5 game to play... Still waiting for a certain game to start...
Quidquid latine dictum sit, altum sonatur.
- Whatever is said in Latin sounds profound.

User avatar
korexus
Moderator
Moderator
Posts: 2830
Joined: Tue Nov 12, 2002 8:00 am
Location: Reading
Contact:

Post by korexus » Mon Jan 26, 2004 10:39 pm

No, I can't imagine how long it would take to write a WoK 5 calculator. With all the troop types and everything combat would be a nightmare!
And if you got tempted to put in bits for the other parts of WoK 5. (economy and so on) it could take *years*...

korexus

:wink:
With Great Power comes Great Irritability

Post Reply