Page 16 of 38

Posted: Wed Sep 26, 2007 9:13 am
by yeti_c
The gangs one is a bit easier - as you only have to have 4, 7, 10, 13, 20 (out of 20) combinations... which are considerably less than having to have 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 & 32 (out of 32) for the guards?!

The collections functionality doesn't work because you can't guarantee that of the required number they've actually got the Warden! (Hence the optional components above)

The gang bonus will be a lot of work as it is - especially the 4 combos of 20...

However - using a bit of maths - I make that... 502146957312000 different combinations?!

http://www.andrews.edu/~calkins/math/webtexts/prod02.htm

Although I may be using the wrong formula?!

C.

Posted: Wed Sep 26, 2007 9:16 am
by yeti_c
Ignore that - I was wrong...

It's 116280 different combinations...

That's

N! / (R-N)!

where N = set size & R = number to choose...

I think this is the correct formula!? But I've gone crosseyed now!

C.

Posted: Wed Sep 26, 2007 9:18 am
by mibi
yeti_c wrote:Ignore that - I was wrong...

It's 116280 different combinations...

That's

N! / (R-N)!

where N = set size & R = number to choose...

I think this is the correct formula!? But I've gone crosseyed now!

C.


I think I'll just bow out of the xml discussion at this point...

Posted: Wed Sep 26, 2007 9:20 am
by Coleman
Copy paste with ctrl+h replacements make this not take as long as that number would suggest. Like I said in our pms, this would be a good test to see how large an xml file the site can handle. :lol:

Posted: Wed Sep 26, 2007 9:28 am
by yeti_c
Hmmm is this correct...

In essence it is...

20 x 19 x 18 x 17 = 116280

So... Combinations of 4 is easier than combinations of 7? Surely not?

Nope - I got the first maths wrong it's...

4845

Which is 20! / (4!x16!)

So -
7 = 77520
10 = 184756
13 = 77520
20 = 1

Yowzers - that's a lot of XML...

C.

Posted: Wed Sep 26, 2007 9:30 am
by yeti_c
Bugger - all my numbers are a bit off - cos I thought there were 20 members - but there are 15...

However - that is still big... and I bet it's gonna be tricky guaranteeing all those combinations?

C.

Posted: Wed Sep 26, 2007 9:34 am
by yeti_c
So remaths is all...

Note as well each number drops by another 1 as the gang leader is always there... so...

14! / (3! x 11!) = 5460

4 = 5460
7 = 45045
10 = 150150
13 = 1365
All = 1

= 202021 combinations of gang members - per gang...

C.

PS Apologies for multi posting...

Posted: Wed Sep 26, 2007 9:49 am
by Coleman
Trust me that isn't a big deal in this kind of forum. I much prefer it myself when each different idea is its own post. I may be alone on that though, so don't start triple posting or anything anywhere to be safe. :lol:

Posted: Wed Sep 26, 2007 7:18 pm
by ghostlygirl
mibi wrote:
yeti_c wrote:Hmmm - the problem is the requirement to have the leader...

I was thinking about just writing it out the old school way - but unless I'm mistaken - I make 496 different combinations of 2 guards!!

C.


so both the gang and guard bonus will be a problem?


when i first read this, (your reply),
i thought it said "gang bang"..
and i giggled.

Posted: Wed Sep 26, 2007 9:15 pm
by mibi
ghostlygirl wrote:
mibi wrote:
yeti_c wrote:Hmmm - the problem is the requirement to have the leader...

I was thinking about just writing it out the old school way - but unless I'm mistaken - I make 496 different combinations of 2 guards!!

C.


so both the gang and guard bonus will be a problem?


when i first read this, (your reply),
i thought it said "gang bang"..
and i giggled.


Im sure gang bangs will be a factor, even though the showers were taken out of previous version.

Posted: Thu Sep 27, 2007 3:14 am
by yeti_c
Do you know what - I'm thinking that it might be safer if I write a Java program to put together your combinations for you and output it into XML...

Annoyingly I'm not 100% sure I've got the time to do it...

If I do write one though I will make it easily configurable...

Then we can reuse it for future XML combination generation.

C.

Posted: Thu Sep 27, 2007 6:03 am
by mibi
yeti_c wrote:Do you know what - I'm thinking that it might be safer if I write a Java program to put together your combinations for you and output it into XML...

Annoyingly I'm not 100% sure I've got the time to do it...

If I do write one though I will make it easily configurable...

Then we can reuse it for future XML combination generation.

C.


that would certainly be useful.

Posted: Fri Sep 28, 2007 2:58 am
by yeti_c
Most definitely...

If I get time I'll see what I can hash out today!!

C.

Posted: Fri Sep 28, 2007 5:47 am
by yeti_c
I've put down some initial ground work - will code it up next week...

Click here

C.

Posted: Mon Oct 01, 2007 10:37 am
by yeti_c
2 guards XML -> 496 combinations...

Of course the problem is - we need to override all 2 guards with 3 guards and only have bonus of 1 too... need to do this all the way up the ladder...

C.

Code: Select all

XML removed as too big - Coleman send me a PM with your email address if you want copies of all combos for 2+ for the guards


Can also do all the Gangs too for ya?

C.

Posted: Mon Oct 01, 2007 10:45 am
by yeti_c
2 guards -> 496
3 guards -> 4960
4 guards -> 35960
5 guards -> 201376
6 guards -> Bah -> OOM'd my IDE!!!

I think we definitiely need the <optional_components> tag to complete the XML on this one?!

C.

Posted: Tue Oct 02, 2007 3:51 am
by yeti_c
Righto...
Recoded my app - to split out the XML files into smaller chunks - and thus free up memory at set intervals...

so

6 guards = 906192 -> 515MB file.

So far I've got about 650MB of XML and I've only defined bonuses for the 2,3,4,5 & 6 guards!!!

C.

Posted: Tue Oct 02, 2007 5:25 am
by yeti_c
7 Guards = 3365789 Combos...
8 Guards = 10518300 Combos...

Total (so far) = 10.1 GB ->
Winzipped down to... 292 MB
WINRAR'd down to... 40 MB

Just another 20 odd guard set combos to go?!

C.

PS - Get WINRAR - it's much better than WINZIP!!!

Posted: Tue Oct 02, 2007 7:40 am
by yeti_c
9 Guards = 28048800! (& it split into 561 files of 42 meg each - and took 50 minutes to create!!!)

That's almost 25 Gig!

C.

Posted: Tue Oct 02, 2007 8:50 am
by asl80
sorry to but in - just a quickie ...
... how big a file is a usual map file? (And does this all get stored online somewhere, and accessed everytime someone plays a game - do you have to store it multiple times, or are you just making an inital program/file for the writing/coding of an xml?)
(My addiction to cc is getting a little out of hand i think - i've been following these xml discussions and i don't even know anything about xml - it must be the sense of progression that gets me - seems like it's going alright.
Hmmm, maybe i should do some of my own work; essay deadline passed 3 days ago - damn you cc!)
{P.S. - if this post is annoyingly in the way i'll delete it after a response}

Posted: Tue Oct 02, 2007 8:59 am
by yeti_c
No worries...

The AOM.xml file is 85KB big... -> these get stored in http://www.conquerclub.com/maps/ and yes these are read by the server... quite how many times I don't know -> Lack could tell you...

I assume they probably get read once and get cached on the server.

C.

PS - so in answer - any XML file over 100 K big - is probably too big...

Posted: Tue Oct 02, 2007 10:45 am
by yeti_c
PS -> was generating Guards 10 -> got to file 567 wasn't even past combinations starting 002... and that's 50000 per file... and my HDD which was 40 GB free was down to 10GB free -> and running out quickly!! Decided to stop it before my PC melted!!

C.

Posted: Tue Oct 02, 2007 3:43 pm
by mibi
I have no problem with a terrabyte xml file.

Posted: Wed Oct 03, 2007 3:44 am
by yeti_c
mibi wrote:I have no problem with a terrabyte xml file.


Lack and his servers might though?!

C.

Posted: Fri Oct 05, 2007 6:22 am
by mibi
well then, i've marked this ON HOLD until the xml update...whenever that is.