Search found 31 matches

by Saphy
May 20th, 2013, 4:27 pm
Forum: Multiplayer Development
Topic: (1.10) A New Land Classic 0.14.4
Replies: 33
Views: 7314

Re: (1.10) A New Land Classic 0.14.4

I added some faction from Ageless era to the ANL to add more varity to the map. It may need some balancing, but here it is.
by Saphy
June 27th, 2010, 11:59 pm
Forum: Faction & Era Development
Topic: Ageless Era - Current Version: 4.25
Replies: 1867
Views: 283097

Re: Ageless Era - Released Version 4.2.2

Saphy : Really? I must have missed that. I will add them to Ageless RPG Era immediately. I will also see what I can do about the Feyborn line. I might mess with the Yokai a little while I do this. Jamini : If your sprites are better than the current ones, I will be glad to accept them. I will take ...
by Saphy
June 27th, 2010, 4:42 am
Forum: Faction & Era Development
Topic: Ageless Era - Current Version: 4.25
Replies: 1867
Views: 283097

Re: Ageless Era - Released Version 3.2

Quick update to tell you what I am doing.. Archaic Era, BEEM, Era of Myths, Era of Magic, Era of the Future, Feudal Era, and Imperial Era have had all the ids, race ids etc. changed. I am now working on Era of Strife. I will not be doing Extended Era until the next update because it is not needed. ...
by Saphy
March 27th, 2010, 12:45 pm
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

What I meant is that, for example, when defender have 6 strikes and 50% chance to hit, I am assuming attacker will take 3 strikes when determining if it will be killed before doing more strikes. And compares to the exact calculation when I summed the probability distribution of when attacker will ta...
by Saphy
March 27th, 2010, 2:36 am
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

Does anyone have the math skills to quantify the error when assuming target will hit back exactly n% of times instead of doing a summation of all possibility? I suspect it would be within 5% depending on the number of strikes. If the error is like less than 0.1%, I don't see why we need to waste tim...
by Saphy
March 22nd, 2010, 7:06 pm
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

The point of the patch is to reduce the calculation time at the expense of accuracy; such as when HP is high, strikes are high, damage is low. If hp_dist must be 100% accurate, the wait time would have to be exponential at the worst case.
by Saphy
March 22nd, 2010, 5:02 am
Forum: Coder’s Corner
Topic: Fast AI recruit patch
Replies: 1
Views: 660

Fast AI recruit patch

Hi people, In survivalXtreme, I found that AI takes a long time to recruit. I have traced the function call to find that unit_type_data::types().build_all(unit_type::HELP_INDEX) function is the culprit. Certainly, there is optimization that can be done inside build_all, but it is also possible to ca...
by Saphy
March 21st, 2010, 10:30 pm
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

Hi people, I think I will start creating the patch. Can someone show me which file(s) needs to be changed? I believe it is attack_prediction.cpp, is that the only one? I see that it should return a HP distribution in vector<double>hp_dist, is that the probability of each HP? But if that's the case, ...
by Saphy
March 21st, 2010, 3:21 am
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

For another, you forgot to take in the probability that the attacker dies during the attack. I see. How about this: Let aSTK, aDMG, aCTH, aHP = attacker's number of strikes, damage, chance to hit, HP: Let dSTK, dDMG, dCTH, dHP = defender's number of strikes, damage, chance to hit, HP: Let y = numbe...
by Saphy
March 20th, 2010, 2:20 am
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

I see. All A, B, and C can be solved in constant time O(1) by solving for the binomial series, which is trivial. Here's the calculation I came up with for A, please correct me if I am wrong: (a b) = a choose b n = number of strike for current unit i = number of strike connected for current unit (unk...
by Saphy
March 19th, 2010, 1:07 pm
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

Hmm, why not consider statistics? Like getting enough data and estimating a distribution with gaussian (mixture models). This might lead to more "natural" behaviour and improves calculation time and memory usage tremendously (only covar matrices and mean vectors). It is already gaussian, but the re...
by Saphy
March 18th, 2010, 3:44 pm
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

I see. I looked at the code, it isn't exponential as I thought it is because it does not need to compute all possible damage done. However, for SX, the HP and number of hits are high, which is why it still take a long time to predict the attack. Perhaps, when HP/damage_afflicted > 100, we will do on...
by Saphy
March 18th, 2010, 4:59 am
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

Sorry for the late reply, I was busy last week. There is no need to make EV 100%. The probability over all-strikes follow a binomial series: Let a = chance to hit, b = chance to miss, Let p(n) = probability of unit with n strikes, connecting n..0 times p(1) = a, b p(2) = a^2, 2ab, b^2 ... p(n) = (n ...
by Saphy
March 10th, 2010, 4:16 am
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Re: Calculation time for AI

Or perhaps, we can have another AI that always do rough estimation using probability model. Map such as survivalXtreme can select that AI branch?
by Saphy
March 5th, 2010, 5:07 am
Forum: Coder’s Corner
Topic: Calculation time for AI
Replies: 35
Views: 3974

Calculation time for AI

Currently, AI is slow when berserker is involved, and even worse when there is drain on both side. Currently, AI calculated the chance to kill by running a simulation per unit for all permutation. Instead, why don't we use a rough estimation, to see if a unit can be killed by doing damage x strike x...