Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
Defending by running away megathread

No, I've said that I see your point. Let me clarify: I still think that the potential issue of the proposal towards the end of the game is less damaging than the actual issue right now, but we can try to do this in such a way that it avoids the problem that you bring up, and therefore prevents that your entertainment is reduced. If we can't find a way then at least we can try to minimise it on both sides. Yes, if there's no way then it might be necessary to make them count. But we're not there yet.

So. I've possibly thought of a way to avoid the issue. The characteristic of baiting tactics is that there's at least 1 unit outside. What if that prevented capture? How? Simple: by making it necessary that every unit is in the city for the counter to increase.
Result: if the drakes are around following a teleporting ranged hero then the city isn't captured, but only damaged (as now), because of the hero.
If the hero goes to the city then the drakes go back too. This introduces a delay, of the drakes, compared with the teleporters, and so the need for the defender advantage, already identified. This avoids that a few times in the city with the teleporter are enough to capture the city.

start:
a_c=0 ; attacker counter
a_d=10 ; defender counter (initial value for the advantage, subject to testing)

each turn:
count total_attackers
count total_defenders
count defenders_in_city
count attackers_in_city
a_d=a_d+defenders_in_city/total_defenders
if attackers_in_city=total_attackers:
 a_c=a_c+1

Capture happens if a_c>a_d at turn 25. Maybe for further improvement, we could instead make it immediate? Just to avoid those last few clicks on done. Unless there are counterpoints to this.
Results:
1. To conquer I need to commit all of my troops, if I leave even a single one outside of the city then that turn doesn't count.
2. I need this for 15 turns to conquer. (we can even make this 20)

This is a compromise as it makes the capture more difficult, but still makes it unnecessary to count flyers. In the situations of baiting, in any case the AI brings the flyers back towards the city at turn 10. So, even the teleporting unicorns won't be enough to get the city, as all the troops (and not all the troops minus one) need to stay inside for 15 turns at least. I need to check the formulas a bit more, but that's the idea.

In a way, this makes flyers count: if there are flyers occupying the city area then a big army of attackers won't fit completely inside. This makes it possible to hold onto a city with flyers without engaging, but this is already possible right now. I don't like it but that's for another thread, as it's a similar issue to the gate.

I believe that this also sorts out any other type of baiting tactic, is that what you mean with the ranged units point? So far your examples haven't made it possible to win a city by baiting with ranged troops. Let me know if there's anything left...

... that idea doesn't work at all. Now the ai has the same problem with melee units and ranged. 

What algorithm will you use to tell the AI when they need to move into the city? Assume the human attacks with 9 units with 8 ammo each. As soon as the AI leaves with one unit, it no longer increases the counter. So it has to know when to retreat to the city to get all of its units back in time.

What about if the AI attacks with ranged units - when does it know to start moving those units into the city instead of retreating in order to attack safely?

What if the AI summons a catapult? It will always summon those into the corner of the map - this could take 15 turns just to get into the city, so it probably couldn't even attack, defeating the purpose of summoning it in the first place.

The basic problem with ranged units is that they want to be as far from the city as possible. And worse, the human knows it can get as close to the city as possible as long as they aren't in melee range, because the AI won't come out, allowing the human to ignore the ranged penalty to hit, while still being 'invincible'.

(Fliers still have to count. Otherwise your cavalry trick works perfectly whenever the ai attacks with fliers. Like draconian units or chimera or sprites or cockatrices or basically more than half of all intercontinental units - or units with chaos channels flight. Say from doom mastery.)

Good point on the summons, but it's quite easily solved: combat summons aren't considered when counting the number of present units part. Done smile

The other part is not consistent with the proposal: if the human has a bait, then the human has something away from the city and not all of the human's units are capturing. Therefore, the human's counter is not increased. I have solved the issue for any kind of baiting tactic (flying, ranged, whatever).

So no need to teach the AI anything. If at a certain point all the human units jump in the city (say, teleporting unicorns) then the AI goes back there already. We just need to ensure - by testing - that the initial defender advantage is high enough that that delay won't matter. Keep in mind that in this last evolution of the proposal, defenders don't need to all be in the city, as opposed to attackers.

(February 10th, 2018, 09:31)Nelphine Wrote: (Fliers still have to count. Otherwise your cavalry trick works perfectly whenever the ai attacks with fliers. Like draconian units or chimera or sprites or cockatrices or basically more than half of all intercontinental units - or units with chaos channels flight. Say from doom mastery.)

The trick already works in that case, I can't fix every issue present in game with just one proposal...  The problem is that if we make flyers count then we introduce the possibility of using the trick in attack with flyers which we obviously don't want. So, better to stay conservative and avoid that. Unfortunately that means accepting that the trick will still be there against an AI attacking with flyers. That's already a lot less than now - now it's always there.

No I mean just standard. Human attacks ai with 9 ranged units with ammo. How does the battle go? What algorithm do you use to decide whether the AI leaves the city (and thus stops being counted)?

And combat summons have no tag telling the game they are summons. All units are just units. And there is no room for a new tag. You can't seperate them for purposes of AI decisions. So summoning a catapult must be accounted for. And yes I've seen catapults summoned on turn 16+. So that needs to be accounted for.

Actually, combat summons are clearly marked as such, otherwise they'd remain in play at end of combat.
The game marks them by setting their "plane" position to 9. It's on the overland unit though, not on the combat one, so checking it does mean some 6-8 extra lines of code.

(February 10th, 2018, 12:35)Nelphine Wrote: No I mean just standard. Human attacks ai with 9 ranged units with ammo. How does the battle go? What algorithm do you use to decide whether the AI leaves the city (and thus stops being counted)?
We don't need to change anything. Seravy's current algorithm as it is now is perfectly fine, thanks to the defender's advantage in counting which we can fine tune with testing it won't allow even baiting to cause the loss of the city.

(February 10th, 2018, 12:52)Seravy Wrote: Actually, combat summons are clearly marked as such, otherwise they'd remain in play at end of combat.
The game marks them by setting their "plane" position to 9. It's on the overland unit though, not on the combat one, so checking it does mean some 6-8 extra lines of code.

Nice. I think that it's already marked in combat: the AI seems to avoid them - even ignoring them sometimes, in favour of normal units, when it's going for max damage.

Oh I didn't realize it knew that during the combat. Interesting.

And no the current algorithm doesn't work. Right now, the AI moves out of the city based on the speed and strength of the human units. There are absolutely times when they do not return to the city. So the human could maneuver into the city, get the count up, then leave the city, and the AI has no concept that it needs to go back to the city to get this count up.

The easiest time this would happen is if the human has a small number of fast units, but it would also work with low numbers of very strong defensive units such as dragon turtles. Killing the AI units would stop being required. Going for maximum defensive strength would be the only thing that matters. Hell golems are already a huge problem, and this would just exacerbate that.

So there has to be an algorithm for dictating when the ai goes back to the city. Otherwise the human will just abuse this proposal to gain cities, and we're back to 'offensive abuse is worse than defensive abuse'.

Quote:Right now, the AI moves out of the city based on the speed and strength of the human units.

Nope, it moves out based on the ranged advantage on the human's side and a dozen other things.

-If the human has at least X more total ranged attack power (including attack power, figures, hit, and ammo in the formula) then it sets "leavewalls" to 1.
-If there is a Mana Leak, Call Lightning or Wrack in play on the enemy side, it also sets "leavewalls".
-If the unit to move next is on the list of "leave walls units", generally big, flying creatures or teleporters, then it is set to leave walls for that unit only, then restored to original status.
-If the unit to move is ranged and the enemy has no melee superiority, leave walls is set to 0 for that unit, but restored to the original afterwards

Do note that while units can override it, globally, once set, "leave walls" stays on for the rest of the battle.

On the other hand the AI "returns" in reality "moves to any city tile" as it can also trigger for the attacker, if the attacking unit is melee, and its chosen attack target has equal or higher movement than itself past turn 10.

So all it takes is Mana Leak to force the AI to abandon the city tiles permanently, and unless the "bait" is too fast to catch, they'll never return. But being slow doesn't mean the AI is actually capable of catching the unit - terrain obstacles or Earth to Mud can easily prevent that - or the player can just let it die and summon something else the AI can chase instead.

More importantly you can block the tile the AI needs to go through to reenter their city with a flying (or webbed enemy) unit so they can't return even if they want to. As long as there is a city wall, they're stuck outside...

Which makes this whole concept even worse. Suriname needs to come up with an algorithm that accounts for everything Seravy already includes, AND somehow also teaches the ai to return the city in certain cases in order to avoid having the human strong defensive unit simply take the city away from them. 

And in the case of the invincible dragon turtle, they have to do it early enough to prevent the dragon turtle from standing in the gate and preventing the AI from getting back into the city.

Personally, I think it'd be really easy to just take ai cities with a few ranged units and a single common life buffed dragon turtle. The ai either let's all the human ranged units fire without fear, or at least 1 AI unit leaves the city (so the AI is no longer increasing count). Human slips the dragon turtle into the gate, then actively helps the ai kill the ranged units so the turtle is the only unit left, then the turtle racks up the count and wins the battle.



Forum Jump: