Jump to content


Photo

Bug found (2.0) in the building unit process


3 replies to this topic

#1 Kaiser Soze

Kaiser Soze
  • Members
  • 16 posts

Posted 05 February 2007 - 11:21 PM

Hi,
this bug maybe solved in 2.2 but I feel this should be reported.

CalculateEffectivenessDemand
and
CalculateClassDemand
(both on buildbasestrategy)
may have a bug.

Both functions calculates the demand required for classes. But they do use the difference wrong (or so I think).
the result is that the AI focus the demand on classes that the enemy can counter and reduces the demand on classes to counter the enemy. Unit ratings may compensate this, as well as buildprograms, but I feel it should be reported.
I have added a few traces to prove that.

#2 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 06 February 2007 - 01:40 AM

This is possible. I never analysed those methods very close since they seemed to work okay for the most part. I've fixed a bug in 2.2 that they don't build units with unit demand 0, but that's all in this section. I have a look at it in time. Thanks for reporting. :)

#3 Kaiser Soze

Kaiser Soze
  • Members
  • 16 posts

Posted 06 February 2007 - 09:00 AM

In fact I'm currently reworking how the AI decides which unit is better to be built. I've found they do not work properly. In DC maybe (because most units are good vs all and they scale in strength during the game), but in Dc: Pro unit can be good agaisnt one thing, but suck against another. And I've found that many time the Ai decides to buld the wrong kind of unit. Mostly because it reduces the demand of the unit that are good against what the enemy has. So if the Ai can build 2 units with same armor and rating it chooses to built the unit that is more effective against the armor that the enemy has not units, and this leads to a disaster :), so for me it's a must the change of that functions.

First simplified version of these function will be ready in a matter on days (1-2 days). I can pass you if you like. It will only focus a little more on building unit that are effective against what the enemy already has.

The problem is that while I was changing them I realized a few things. For instance, the unit rating and the weapon effectiveness are squad values. Meaning that the AI thinks that a squad with 1 tac is as powerful than a squad with 8 tacs. And try them with the same importance (regarding issues like building units for counter them or avoid unit that they can counter pretty well). So I'm trying to change that using the number of troop in the squad (and maybe taking into account the leader of the squad somehow). This way the AI will have a more realistic idea of the effectiveness of the enemy army and of its own army. This will lead to more changes (even in the unitstats.ai file), but I think I can handle them.

Also I've think that a unit with more than 1 weapon (like tanks) only uses 1 of them (the best available) in order to calculate its overall effectiveness (not testet yet, but I'm 90% sure). So the Ai may underestimate the efectiveness of units like predators or baneblade. I think this can be handled with the rating value of the unit. But I'll try to figure out how to deal with it.

Once I finished all these changes I can report them to you. But not sure if they will be of any use to you because I'm quite focus on DC: PRo and it has a few thing that the basic game does need (unit scales a lot more in DC: PRO, so the squad size it's a factor that changes during game and not a constant; we have a lot more specific counters and less "good vs all", so its important to build the right unit, etc.).

#4 ArkhanTheBlack

ArkhanTheBlack

    title available

  • Members
  • 814 posts

Posted 06 February 2007 - 12:55 PM

I'll certainly have a look at it. Though weapon upgrades can indeed be difficult since they can change the entire purpose of the unit.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users