Re: too early

DoomPope schreef:
Demonic schreef:
whamra1987 schreef:

lazarus, sometimes too fast, sometimes they dont run and get massacred, and whichever is the one that hurts more, is what's happening, lol.
there's a conspiracy against me, when i want them to stay, they leave, when i want them to leave, they stay to die tongue

Hmm.. you moved to belgium?
I thought we agreed on the conspiracy against belgiums only?

There are only two types of people in this world I hate.
People who are intolerant of others cultures and believes.... and the Dutch.

Love you too Doom smile

Me and myself hate vmode

Re: too early

here's what *should* happen.
i believe you are knowlegeable of the past stable battle model, which basically states that a regiment flees once 50% of it dies, that's a static number, that doesn't change, and has no *luck* in it.
on speed, it's somewhat different.
the regiment fights as normal, till 10% of it is dead.
the moment 10% are dead, the regiment *thinks* whether it should flee or not. battle circumstances have no effect here on deciding, it's a random 50% chance of either staying or leaving.
if it decided to stay, so be it, it fights.
on next round, it asks same question, with same 50% chance.
and so on.
before the 10% loss, it should NOT question this at all.
spells that effect fleeing, usually affect the 50% chance, make it 60% or more in favour of fleeing, but the 10% does NOT, and should NOT get touched. (at least, following the model Vilmore has designed)
as you can see, a regiment fighting 2 rounds after losing 10% has a 25% chance, fighting 3 rounds is 12.5%, and it keeps decreasing, have 3 regiments in a battle fighting 8~9 rounds after losing their 10% is just.... weird, specially when it happens in the most gruesome of battle, and *twice*, with a battle in between them in which they fled way too early when i wished they would have stayed...
i am NOT from belgium, i swear!!!!

just that guy... remember him? didn't expect you to...

28

Re: too early

DoomPope schreef:
Demonic schreef:
whamra1987 schreef:

lazarus, sometimes too fast, sometimes they dont run and get massacred, and whichever is the one that hurts more, is what's happening, lol.
there's a conspiracy against me, when i want them to stay, they leave, when i want them to leave, they stay to die tongue

Hmm.. you moved to belgium?
I thought we agreed on the conspiracy against belgiums only?

There are only two types of people in this world I hate.
People who are intolerant of others cultures and believes.... and the Dutch.

LOL
Are there dutch here?
I thought they were from belgium tongue
But i understand your hate, i feel your pain!! tongue

Your village is 38100% bigger than the defending village. You will probably lose 90 honour by attacking this village. If someone of your clan attacked this village earlier, every clan member will lose honour.

29

Re: too early

whamra1987 schreef:

a regiment fighting 2 rounds after losing 10% has a 25% chance, fighting 3 rounds is 12.5%, and it keeps decreasing, have 3 regiments in a battle fighting 8~9 rounds after losing their 10% is just.... weird, specially when it happens in the most gruesome of battle, and *twice*, with a battle in between them in which they fled way too early when i wished they would have stayed...
i am NOT from belgium, i swear!!!!

I still think you might have some belgium blood! tongue

Anyways, you are not correct in the things you say.
After 3 rounds you don't have a 12.5% chance they stay... you have 3 times 50% chance.
There is a big difference, and it's even bigger for belgiums! wink

Your village is 38100% bigger than the defending village. You will probably lose 90 honour by attacking this village. If someone of your clan attacked this village earlier, every clan member will lose honour.

Re: too early

3 times 50% chance= 50%x50%x50%=(50/100)^3=125000/1000000=12.5/100=12.5% :\

just that guy... remember him? didn't expect you to...

31

Re: too early

As requested, the formula for morale checking:

/*
    Returns TRUE if this troop keeps fighting
    @param $unit: A unit (regiment) object.
    @param $morale: Morale of the unit (default 100)
    @param $orgAmount: Original amount of units before the fight started
    @param $curAmount: Current amount of living units
    @param $killedLastRound: Amount of units killed in current (last) round.
    TODO: Make a better morale check.
*/
private function checkMorale ($unit, $morale, $orgAmount, $curAmount, $killedLastRound)
{
    $percentage = $curAmount / $orgAmount;
    
    $chk = true;
    
    if ($percentage < 0.9 && $killedLastRound > 0)
    {
        $chanse = 100;
            
        foreach ($unit->getEffects () as $v)
        {
            $chanse = $v->procMoraleCheck ($chanse, $this);
        }
    
        $chk = mt_rand (0, 200) < $chanse;
    }    
    
    return $chk;
}

This function is called after every "round", that means, after all attackers and defenders have attacked.

And, yes, I don't like random factors in the game, but this is something Vilmore came up with smile

I'm guessing something goes wrong in one of the effects (spells). I'm going to add a large amount of debug data to sort this out and also to give extra details about the troops during battles.

Laatst bewerkt door Daedeloth (2010-01-21 00:48:45)

32

Re: too early

whamra1987 schreef:

3 times 50% chance= 50%x50%x50%=(50/100)^3=125000/1000000=12.5/100=12.5% :\

Nope, they either run or the stay, 50% chance!
They stay 3 rounds or they run, 50% chance
You win the lotery or you don't, 50% chance tongue

Your village is 38100% bigger than the defending village. You will probably lose 90 honour by attacking this village. If someone of your clan attacked this village earlier, every clan member will lose honour.

33

Re: too early

whamra1987 schreef:

3 times 50% chance= 50%x50%x50%=(50/100)^3=125000/1000000=12.5/100=12.5% :\

I don't think that's correct... If I'm understanding how the code works, it's a conditional probability, correct?  Bayes' Law with P(A|B,C) ... I am so not willing to solve that tonight

7 x 13 = 28

Economics today is a race between economists striving to build bigger and better idiot-proof economic or financial models or programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning...

Re: too early

what is wrong with people from belgium? and may i say that there is a difference between BELGIANS and DUTCH people? tongue
and about these chances: 3 rounds means 3 times a chance of 50%, 50%^3=12.5% believe me, i learned that in statistics at school, i should know wink
@demonic: the chance of winning the lottery is about 1/6.000.000.000 xD

Stable didn't last, goodbye Dolumar.
mods can delete this account if they want to, maybe they'll do something usefull for once.

35

Re: too early

DoomPope schreef:
whamra1987 schreef:

can we... move this to another thread? i still want to know why my regiment fled early, if it's a bug, i want it dead, regiments fleeing so early is devastating in other scenarios, and i'd rather not see this... so far, my last 5 attacks, have all had bugs of some sort in them sad

Do we know the equation for fleeing?  Or could we know it wink

The situation you describe sounds semi-random, and I have heard in the past daed is not a fan of random numbers so something tells me it is a bug.

For those who do not know, its from a movie.  big_smile

Next post here will be constructive, I swear.  wink

And God Said:
Δ*D = ρf                   Δ*B = 0
ΔxE = -δB/δt            ΔxH = Jf + δD/δt
and THEN there was light.

36

Re: too early

Fatal_Error_shutdown schreef:

what is wrong with people from belgium? and may i say that there is a difference between BELGIANS and DUTCH people? tongue
and about these chances: 3 rounds means 3 times a chance of 50%, 50%^3=12.5% believe me, i learned that in statistics at school, i should know wink
@demonic: the chance of winning the lottery is about 1/6.000.000.000 xD

There is a difference between people?
Really?
So you are telling me that people are not unique?
All belgiums are the same yet very different to the dutch?
Please explain cause i'm a little confused now.

And for the lottery, there a chance you win it, and there's a chance you don't win it.
The amount of chance was not part of discussion was it? wink

By the way, statistics are different then chance calculations, read about it.... perhaps wiki can help! big_smile

Your village is 38100% bigger than the defending village. You will probably lose 90 honour by attacking this village. If someone of your clan attacked this village earlier, every clan member will lose honour.

Re: too early

demonic needs a math class tongue

just that guy... remember him? didn't expect you to...

Re: too early

whamra1987 schreef:

demonic needs a math class tongue

demonic needs alot

Me and myself hate vmode

39

Re: too early

Am I to assume that

$chanse = $v->procMoraleCheck ($chanse, $this);

is where the spells and whatnot get applied?

Also on what condition does a unit flee?  true/false?

If I had to take a guess at it I would say the function is not behaving as it should or mt_rand().... but I am not 100% what that is.  ( I assume random number between 0 and 200).

edit.

Looking back through it a 6% loss should not even call either of those functions.  treachery is afoot.

Laatst bewerkt door DoomPope (2010-01-22 01:50:45)

And God Said:
Δ*D = ρf                   Δ*B = 0
ΔxE = -δB/δt            ΔxH = Jf + δD/δt
and THEN there was light.

40

Re: too early

whamra1987 schreef:

demonic needs a math class tongue

Math classes for everybody!

I am just happy this is the last semester I have to take math.  Except for statistics but really, who considers stats math?

And God Said:
Δ*D = ρf                   Δ*B = 0
ΔxE = -δB/δt            ΔxH = Jf + δD/δt
and THEN there was light.

Re: too early

Demonic schreef:
Fatal_Error_shutdown schreef:

what is wrong with people from belgium? and may i say that there is a difference between BELGIANS and DUTCH people? tongue
and about these chances: 3 rounds means 3 times a chance of 50%, 50%^3=12.5% believe me, i learned that in statistics at school, i should know wink
@demonic: the chance of winning the lottery is about 1/6.000.000.000 xD

There is a difference between people?
Really?
So you are telling me that people are not unique?
All belgiums are the same yet very different to the dutch?
Please explain cause i'm a little confused now.

And for the lottery, there a chance you win it, and there's a chance you don't win it.
The amount of chance was not part of discussion was it? wink

By the way, statistics are different then chance calculations, read about it.... perhaps wiki can help! big_smile

well, you said there was a 50% chance of winning the lottery, so that explains why i mentioned how small that chance is... tongue
and about the difference belgian-dutch: belgians are from belgium, dutch are from the netherlands, that is all i was saying big_smile you make me feel smart around here xD
and i know there is a difference between statistics and math calculations, but english is the 3rd language i learned, so sorry if i make any mistakes speaking or writing it tongue

Stable didn't last, goodbye Dolumar.
mods can delete this account if they want to, maybe they'll do something usefull for once.

Re: too early

and btw: wiki isn't always reliable because the articles aren't checked by professionals tongue

Stable didn't last, goodbye Dolumar.
mods can delete this account if they want to, maybe they'll do something usefull for once.

Re: too early

strange. I'm from Belgium and I speak Dutch.
Now I'm confused.

Me and myself hate vmode

44

Re: too early

Wikipedia is a useful place for starting out when you are trying to learn about a topic... an article worth anything will have a lengthy citation list... go straight to the citation list and read those.  Personally, I prefer Google Scholar, but to each his own.

7 x 13 = 28

Economics today is a race between economists striving to build bigger and better idiot-proof economic or financial models or programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning...

Re: too early

i found the answer to original problem, Daed has been made aware.
troops aren't fleeing early... they are so embarrased they have been reporting their numbers wrong to avoid post-battle court martial....
basically, if i send a 100 troop regiment, i would expect it to start considering fleeing once it loses 10 troops at least....
suppose the regiment is losing 6 troops per turn, the log would look like:


some jerk (xxx troops) kill 6 troops from whamra's heroes (100 troops)
etc...
some jerk (xxx troops) kill 6 troops from whamra's heroes (94 troops)
whamra's heroes (94 troops) run away.

that 94 is deceiving... after a long bloody battle, one find difficulty doing a count on correct numbers, but they are in fact 88 when leaving in this scenario, not 94..

just that guy... remember him? didn't expect you to...

Re: too early

Wolfie_123 schreef:

strange. I'm from Belgium and I speak Dutch.
Now I'm confused.

dutch is both a nationality and a language, when you say in dutch 'ik spreek nederlands' doesn't mean 'ik ben nederlands' tongue (sorry for the people who don't speak dutch around here, but is the only way to say it big_smile) it is the same in english smile we speak dutch, but we aren't dutch, understand? tongue

Stable didn't last, goodbye Dolumar.
mods can delete this account if they want to, maybe they'll do something usefull for once.

47

Re: too early

Well, thank you very much for the explanation.
Your wise words really make me feel so dumb.
but i'm learning really fast, could you post some more of your wisdom?

Your village is 38100% bigger than the defending village. You will probably lose 90 honour by attacking this village. If someone of your clan attacked this village earlier, every clan member will lose honour.

Re: too early

look man, i didn't mean to insult you or something, i'm just mad because i've lost 42 runes last week, and believe me when i say that suck big time... just a little bit more and somebody is going to get hurt

Stable didn't last, goodbye Dolumar.
mods can delete this account if they want to, maybe they'll do something usefull for once.

Re: too early

Fatal_Error_shutdown schreef:
Wolfie_123 schreef:

strange. I'm from Belgium and I speak Dutch.
Now I'm confused.

dutch is both a nationality and a language, when you say in dutch 'ik spreek nederlands' doesn't mean 'ik ben nederlands' tongue (sorry for the people who don't speak dutch around here, but is the only way to say it big_smile) it is the same in english smile we speak dutch, but we aren't dutch, understand? tongue

So it's wrong to call a Dutch speaking person Dutchie?
(sorry but I'm blond)

Me and myself hate vmode

Re: too early

Wolfie_123 schreef:
Fatal_Error_shutdown schreef:
Wolfie_123 schreef:

strange. I'm from Belgium and I speak Dutch.
Now I'm confused.

dutch is both a nationality and a language, when you say in dutch 'ik spreek nederlands' doesn't mean 'ik ben nederlands' tongue (sorry for the people who don't speak dutch around here, but is the only way to say it big_smile) it is the same in english smile we speak dutch, but we aren't dutch, understand? tongue

So it's wrong to call a Dutch speaking person Dutchie?
(sorry but I'm blond)

i don't really care how we are called, as long as it isn't insulting... and i have never heard somebody say 'dutchie' tongue

Stable didn't last, goodbye Dolumar.
mods can delete this account if they want to, maybe they'll do something usefull for once.