A "real" AI cheat

Let me come up with a truly contrived example: 2 Drill4 MCs and a Tactical Nuke ;)

If that last unit had been a combat III, blitz unit, then results wouldn't have been really different even with DanF5771's new patrol code.
Quick test revealed that the C3-Blitz MC is lucky to kill 3 damaged MCs. (Yes, this is where Drill4 really shines, when it gets a free Blitz.)
Result: 5 of Woody's MCs survive and all Fishing Boats stay intact --> my Patrol code saved 1390 :hammers:! I classify this as a selling point.
 
Let me come up with a truly contrived example: 2 Drill4 MCs and a Tactical Nuke ;)

Yes, I had also thought about the tactical nuke. Several tactical nukes on a stack of 12 MC's is always a cheap way to kill them, no matter where they are (as long as they're not protected by bunkers or SDI).


Quick test revealed that the C3-Blitz MC is lucky to kill 3 damaged MCs. (Yes, this is where Drill4 really shines, when it gets a free Blitz.)
Result: 5 of Woody's MCs survive and all Fishing Boats stay intact --> my Patrol code saved 1390 :hammers:! I classify this as a selling point.

Yes, I know that a drill IV unit performs perfectly against heavily wounded units, although in general no unit will become seriously wounded from fighting units below 50% hitpoints (and of equal basic strength). Still, the normal blitz unit will be weakened by subsequent fights and eventually die.

My point was that the real damage is not from the patrol ships stupid reaction, but because of the halving of their hitpoints by missiles and barrage promoted units. In this case the crippled units can be easily finished because they were stupidly ordered to attack anything that tried to pillage and that's why you can do it with 1 drill IV unit. But anything could finish them at that point. Destroyers could even easily kill them and if you didn't have enough units in the neighbourhood, then they'd have to flee the scene or die the next turn. It's just their stupid order to attack anything that pillages that makes them die quicker.

(Most contrived example: lots of bombers which can't be intercepted + 2 drill IV MC's.)

What we're merely proving here is that the order: attack anything in the neighbourhood until you die or it dies (generalisation) is often not the best order. We don't need examples for that. It's pretty clear that the order isn't very smart. The question is: should we the exploitation of the dumb order?

Note that if I use a tactical nuke on a city with 8 fighters on aerial interception and then send in a bunch of my own (jet) fighters on bombing/striking missions, then this aerial interception order is pretty suicidal. It's just that airplanes only have 1 movement point.
 
I haven't posted in this thread for a while.

First of all, I don't really object to the change proposed by DanF5771 if some mouseovers are added like he describes in his latest example post. If that were the way that it had been designed in the first place, then I wouldn't have started a thread to change it. (Although, I also wouldn't have started a thread to change the way patrol functions now.)

However, I do object to these contrived examples that are being produced in order to exaggerate the influence of the patrol function on combat. In the example produced by DanF5771, the 5 fully loaded missile cruisers seem the inferior force compared to the 12 unloaded missile cruisers to players not experienced in the combat mechanics of civilisation IV. But they really aren't. The 5 fully loaded missile cruisers are the superior force. The effect of the 20 missiles and barrage promotions are devastating. Missiles are more than worth their cost for wounding expensive units like missile cruisers and the barrage promotions are ideal to cripple the stack. A drill IV unit is ideal to finish them off.
If that last unit had been a combat III, blitz unit, then results wouldn't have been really different even with DanF5771's new patrol code.

Now, don't reply with 'that was the point, free blitz'. No that wasn't the point that was being made here. The example tried to show how the current patrol function leads to unbalanced combat results (3210 hammers versus 1200 hammers was exclaimed). That result could also be achieved without the patrol function. The unbalanced combat result was mainly achieved by using the strength of missiles to weaken expensive units and by using the strength of collateral damage attacks. The example isn't fundamentally different than the earlier example of a destroyer versus three frigates. It shows how giving the command 'attack anything that tries to pillage these tiles' is fairly stupid when the pillagers are stronger.

I don't oppose the old patrol rule, I don't oppose the new rule proposed by DanF5771 if well documented ingame, but I do oppose exaggeration and misrepresentation of game mechanics to make your point.

And SirNuggles, is this a "logical, cogent response that could possibly be brought to bear against your latest proof"? (I didn't really appreciate your reasoning method of 'anyone who disagrees to this example must be dumb'.)

Roland, I appreciate that you came out of hibernation to post a response, But you still haven't overcome the power of the "contrived" examples. Yes, guilded missiles unbalance the equation, but the defending MC's would also have GM's that they would never be able to fire since their entire force would be wiped out by a handful of units. As to the promotions, you would achieve nearly the same results if none (both sides) of the ships possessed any promotions.

At worst, the attacking force might lose 1-3 MC's, but they would still destroy the defending stack. The fact that cannot be gotten around, that cannot be dispelled, that should not be continually dismissed is that a smaller force of attacking units can still slaughter a much larger number of defending units--a number normally disallowed by all other game mechanics. When a force of 5 units attacks a force of 12 or more units and slaughters them (whatever the casualties to the attacking force), that's wrong. Only 5 of those 12 defenders should die, who should then be able to counter-attack the following turn and kill the original 5 attackers.

Until someone provides an adequate argument to reasonably permit this malfunction, then (with my apologies) I cannot assign any merit to an opposing point of view.

It is a fact: it violates normal game mechanics, thus that makes it a broken feature.

And, as I've stated repeatedly in my posts, I have experienced these "contrived" situations repeatedly in my games. They are not unlikely or trivial. They might be rare occurrences on pangaea maps on easy difficulties, or rare for ppl who do not protect their fisheries (bcz fisheries are not important to their overall strategy), but for water maps on higher difficulties, who (bcz it's a water map) depend upon sushi, it can be a substantial problem.

As to Woody, I will no longer dignify any of his posts with a response.
 
i am confused. Are you saying the "patrolling" boats came in and attacked because you attacked a boat defended "illegally" by "patrollers?"
 
At worst, the attacking force might lose 1-3 MC's, but they would still destroy the defending stack. The fact that cannot be gotten around, that cannot be dispelled, that should not be continually dismissed is that a smaller force of attacking units can still slaughter a much larger number of defending units--a number normally disallowed by all other game mechanics. When a force of 5 units attacks a force of 12 or more units and slaughters them (whatever the casualties to the attacking force), that's wrong. Only 5 of those 12 defenders should die, who should then be able to counter-attack the following turn and kill the original 5 attackers.

The problem we face with patrol is that it is not as clear as you make it that the pillager is the attacker. I am still convinced that the is supposed to be the defender. The command you give for the patrol unit is to attack anyone pillaging - if this was implemented this way we would not have to argue about this problem - since of course then in your examples you'd have 5 defender (pillagers) that kill 12 attackers (patrols) - and no problem.
Now the implementation of this feature is bad. I firmly believe that it was implemented this way because it is easier to have a unit of the player whose turn it currently is (pillager) attack than to make a unit of another player (patrol) attack.

I believe we can argue forever about this there are two reasonable points of view:
1) the implementation has the pillager as the attacker - thus he should only have one attack
2) game documentation has the patrol as the attacker - thus the pillager should be able to defend as often as he survives it
Now which one is "correct" - I do not know and frankly there is no way to determine this. However if you take position 2) then the actual bugs here are that the pillager gets the tile bonus and the patrol gets the flanking bonus. If you take position 1) then the bug obviously lies in allowing multiple pillage attempts.
Either way I believe any fix should ensure that it is not overpowering an option that the AI does not use.
The current situation is this:
if you have a sea resource you want to guard - you can either
1) park a couple of ships on it
or
2) have a few ships adjacent and give it the patrol function

1) ensures that any pillager has only one attack - but the ships can only guard one resource
2) allows a pillager multiple pillaging attempts (I hesitate to say attacks ;) - but at the same time the same number of ships can guard multiple resources AND gain terrain defence bonus even if the resource is not coastal

If you now use the currently proposed fix - then anyone using number 1) is out of his wits or an AI - since there is no reason to do so - since any patrol will always be more advantageous, basically forcing you to use the patrol function. There are two reasons I oppose this: first and most important - as long as the AI does not use patrol it just benefits the human player - and on sea heavy maps the AI is inept anyways, secondly I believe that this would go against the intended design of the patrol function - but that is a much softer argument I agree :)
 
Just found another clue that might reveal a piece of the developers' ideas about the Sea Patrol function:
Code:
bool CvUnit::canSeaPatrol(const CvPlot* pPlot) const
{
	...

	if (!canFight() || [B][COLOR="Red"]isOnlyDefensive[/COLOR][/B]())
	{
		return [B][COLOR="Red"]false[/COLOR][/B];
	}
	...
}
:cry: :cry: :cry:

;)
 
:hmm:
if I understand this correctly this means they do not want defense only ships (that do not seem to exist in the unmodded game) or non-fighters (I assume fishing boats) to patrol (is this right? my c++ knowledge is largely derived from reading civ code - so its not too sophisticated ;)).
 
^^Me confused ;)

A defensive only naval unit can't patrol, cool .... :crazyeye:

I would say that this poits to the idea that it was supposed that the patroling unit would be the attacker.... :p
 
Yes, this method excludes naval units that are unable to attack from Sea Patrol duty, which would be in line with the ingame docu.

Still the actual implementation is the other way around and reflects my idea of it--they are supposed to defend the improvements.

I wanted to check out what the roles are for air patrols. But that is a complete mystery--not even a single line in the combat log. :confused:
 
Do any of us have any connections with Solver? It'd be nice if we could get him to ask Firaxis concerning this issue...or even if he could throw in his 2 cents.

Or Bhruic too.
 
:)



xxxxxxxchar
 
I wanted to check out what the roles are for air patrols. But that is a complete mystery--not even a single line in the combat log. :confused:
I don't think that air patrols combat in the sense that sea and land unit do... perhaps they have a seperated code elsewhere?
 
I agree with Ori mostly again.

We must not take the word of any Firaxians in this manner as the absolute truth. While Firaxis has created a great game, I don't necessarily see their point of view as superior to any of the posters here. When confronted with the barrage promotion bug in BTS 3.17 they said 'remove it'. When confronted with a Glance Screen that wasn't universally considered a work of art, they said 'remove it'. They view this product as finished and thus will take a point of view that results in as little as work as possible. I don't really think that's bad or something from their point of view, but it shouldn't necessarily be our point of view.

I'm in favour of the following model:

The patrol ships are the attackers. They can intervene pillage attempts as long as they're alive (just like fighters can). They still get a coastal defence bonus when they're on coastal terrain (weird yes, but I want to give the advantage to the defender which I guess was the intention of making the patrol units de facto defend in BTS 3.17-patrol/pillage-initiated combat). The chance that the patrol ships intervene is directly related to their hitpoints (exactly as is true for fighters and jet fighters, 40 hitpoints = 40% chance of patrol-intervention). If no intervention takes place, then pillaging succeeds.

Result 1: The pillager cannot retreat from combat because defenders cannot retreat from combat. That removes one weird issue that some players have with the BTS 3.17 patrol mission.
Result 2: If the pillagers are stronger (by pure unit strength or after bombardment, missile attacks, nuke attacks), then the patrol ships might suicidally attack the pillaging fleet. However the patrol ships are unlikely to intervene when seriously wounded and thus might not suicidally attack in that case. So it would reduce the suicidal behaviour of the ships on patrol duty when faced with a more healthy pillaging fleet.

Motivation for this model: I like the aerial interception model and it would work fairly well for patrol. It doesn't really mess with other standard game rules. It's tested in slightly different circumstances.

Problem: I don't even have nearly enough knowledge about programming to implement this model. :crazyeye:
 
I agree with Ori mostly again.

We must not take the word of any Firaxians in this manner as the absolute truth. While Firaxis has created a great game, I don't necessarily see their point of view as superior to any of the posters here. When confronted with the barrage promotion bug in BTS 3.17 they said 'remove it'. When confronted with a Glance Screen that wasn't universally considered a work of art, they said 'remove it'. They view this product as finished and thus will take a point of view that results in as little as work as possible. I don't really think that's bad or something from their point of view, but it shouldn't necessarily be our point of view.

Interesting and well-stated thoughts, I suppose I'm just trying to find an "impartial" arbiter that we could all agree upon to resolve the issue.

I'm in favour of the following model:

The patrol ships are the attackers. They can intervene pillage attempts as long as they're alive (just like fighters can). They still get a coastal defence bonus when they're on coastal terrain (weird yes, but I want to give the advantage to the defender which I guess was the intention of making the patrol units de facto defend in BTS 3.17-patrol/pillage-initiated combat). The chance that the patrol ships intervene is directly related to their hitpoints (exactly as is true for fighters and jet fighters, 40 hitpoints = 40% chance of patrol-intervention). If no intervention takes place, then pillaging succeeds.

It's a solution that's better than the current mechanism, but I still don't like the way that it (in comparison to Dan's fix) lowers the effective power of the "idealized" patrol function, and it still leaves defenders open to a second (although not a third and fourth...) attack from units that have already attempted to pillage. Hence, it's only a partial fix.

Result 1: The pillager cannot retreat from combat because defenders cannot retreat from combat. That removes one weird issue that some players have with the BTS 3.17 patrol mission.
Result 2: If the pillagers are stronger (by pure unit strength or after bombardment, missile attacks, nuke attacks), then the patrol ships might suicidally attack the pillaging fleet. However the patrol ships are unlikely to intervene when seriously wounded and thus might not suicidally attack in that case.

Motivation for this model: I like the aerial interception model and it would work fairly well for patrol. It doesn't really mess with other standard game rules.

Problem: I don't even have nearly enough knowledge about programming to implement this model. :crazyeye:

Me either. I suppose we can at least agree that we both suck at that part, ha?! lol

At any rate, Roland, thanks for your continued (and at least considered) thoughts on the matter.
 
At any rate, Roland, thanks for your continued (and at least considered) thoughts on the matter.

You're welcome. :)

I actually don't think we'll agree since you're looking for a model that limits the number of patrol ships interceptions (against strong opponents) while I don't. We also have a different view on who is the attacker in the patrol interception.

I don't expect a Firaxian to come along (a very rare occasion) because the issue is not game unbalancing enough. And I actually also don't think Solver will make a decision. He will not want to meddle in an issue which is so hotly debated and has no clear solution. He tends to fix stuff that if clearly bugged or has a universally accepted fix. And that's probably a good thing since otherwise the unofficial patch would soon be accepted by only a tiny group of players.

However, I believe that DanF5771 already posted (the code for) a fix that you agreed with several pages ago. So why not just use that?
 
lol. I will, once I figure out what file he altered. :p
 
I like Roland's model, but I would suggest a slight modification: Let's make the patrol's behaviour not a function of its hitpoints but of the actual combat odds.

I have implemented it for a test as follows:
Code:
bool CvUnit::pillage()
...

if (pPlot->isWater())
{
    CvUnit* pInterceptor = bestSeaPillageInterceptor(pPlot);

    if ((NULL != pInterceptor) [B][COLOR="RoyalBlue"]&& (getCombatOdds(this, pInterceptor)<600)[/COLOR][/B])
    {
        setMadeAttack(false);

        attack(pInterceptor->plot(), false);

        return false;
    }
}
This lets the patrolling ship "decide" to jump in as a defender (getting the plot defense bonus) only if its chance to survive this interception is greater than 40% (the aggressors combat odds < 600). If it "thinks" that this would be a suicide mission, no interception is triggered and the superior aggressor can pillage the improvement.

I have furthermore disallowed withdrawal of a pillager from an interception combat, thus simulating that the patrol attacks and the pillager cannot escape.
Code:
int CvUnit::withdrawalProbability() const
if (getGroup()->headMissionQueueNode() != NULL)
{
    if ((getGroup()->headMissionQueueNode()->m_data.eMissionType) == MISSION_PILLAGE)
    {
        return 0;
    }
}
So e.g. an Attack Sub will of course still be able to withdraw from a regular attack, but a damaged ASub will be sunk by the patrolling ship during the interception combat when it attempts to pillage the protected improvement.

My C++-skills are also very limited, but in my tests I haven't encountered any problems yet. Maybe there are better ways to implement it. So what do you think about that? How would you adjust the "coward-threshold" (40%)? Did I miss any loopholes for exploits?
 
lol. I will, once I figure out what file he altered. :p

He changed one of the files which are compiled in the CvGameCoreDLL.dll and recompiled (I think). There is a guide in the Creation and Customization forum on how to do this. I did this for the first time a few months ago. Depending on how good you are with computers, the task can be somewhere from almost impossible to extremely easy. It took me some time to figure out how to recompile the CvGameCoreDLL.dll and I barely know anything about programming. I just learned how to do it to make a very basic change in the CvGameCoreDLL.dll (for some minor issue that bugged me). I should learn a bit more about programming so I can make more changes.
 
Top Bottom